pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/llvm



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Jan  8 10:48:34 UTC 2018

Modified Files:
        pkgsrc/lang/llvm: Makefile distinfo
Added Files:
        pkgsrc/lang/llvm/patches: patch-CMakeLists.txt
            patch-include_llvm_Support_DataTypes.h.cmake

Log Message:
llvm: Change how sys/regset.h workaround is implemented.

Previously a special override header was used via an additional include path,
but this extra include path was not exported to llvm-config so while llvm was
ok, dependencies wouldn't find the header and fail.

Instead just pull the changes directly inline into DataTypes.h so that they
are available everywhere.  Fixes the clang build on SunOS.  Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/lang/llvm/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/lang/llvm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/llvm/patches/patch-CMakeLists.txt \
    pkgsrc/lang/llvm/patches/patch-include_llvm_Support_DataTypes.h.cmake

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/llvm/Makefile
diff -u pkgsrc/lang/llvm/Makefile:1.27 pkgsrc/lang/llvm/Makefile:1.28
--- pkgsrc/lang/llvm/Makefile:1.27      Sat Dec 30 10:39:24 2017
+++ pkgsrc/lang/llvm/Makefile   Mon Jan  8 10:48:34 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2017/12/30 10:39:24 adam Exp $
+# $NetBSD: Makefile,v 1.28 2018/01/08 10:48:34 jperkin Exp $
 #
 # when updating this, please also update:
 # devel/include-what-you-use
@@ -14,6 +14,7 @@
 
 DISTNAME=      llvm-5.0.1.src
 PKGNAME=       ${DISTNAME:S/.src//}
+PKGREVISION=   1
 CATEGORIES=    lang devel
 MASTER_SITES=  http://llvm.org/releases/${PKGVERSION_NOREV}/
 EXTRACT_SUFX=  .tar.xz

Index: pkgsrc/lang/llvm/distinfo
diff -u pkgsrc/lang/llvm/distinfo:1.12 pkgsrc/lang/llvm/distinfo:1.13
--- pkgsrc/lang/llvm/distinfo:1.12      Sat Dec 30 10:39:24 2017
+++ pkgsrc/lang/llvm/distinfo   Mon Jan  8 10:48:34 2018
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.12 2017/12/30 10:39:24 adam Exp $
+$NetBSD: distinfo,v 1.13 2018/01/08 10:48:34 jperkin Exp $
 
 SHA1 (llvm-5.0.1.src.tar.xz) = 43d3659f8a3cef43e7435a3a874b0711f5888052
 RMD160 (llvm-5.0.1.src.tar.xz) = 3d17de87813313b6eac5b5dc8592f676c5cee561
 SHA512 (llvm-5.0.1.src.tar.xz) = bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb
 Size (llvm-5.0.1.src.tar.xz) = 23428720 bytes
+SHA1 (patch-CMakeLists.txt) = 78e2dab2bf73f7e466ca2788fe6444e39b4ebd80
 SHA1 (patch-cmake_config-ix.cmake) = 4675b1dfca3850dbed6c494bf6a8f6fc6d500c20
 SHA1 (patch-cmake_modules_AddLLVM.cmake) = 4bfb98c5d99797155d0fb13a43352d31f6cfe783
 SHA1 (patch-cmake_modules_HandleLLVMOptions.cmake) = 271e6f5a8cebf8162c4e3b758e96f451b434269b
+SHA1 (patch-include_llvm_Support_DataTypes.h.cmake) = 18ebb1fcd2499d1216d5c3afe0bbb55fe63fe3ef
 SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 70d8f320f217d99e6f991709a080450bc05631cd

Added files:

Index: pkgsrc/lang/llvm/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/lang/llvm/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Mon Jan  8 10:48:34 2018
+++ pkgsrc/lang/llvm/patches/patch-CMakeLists.txt       Mon Jan  8 10:48:34 2018
@@ -0,0 +1,15 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2018/01/08 10:48:34 jperkin Exp $
+
+Don't implement sys/regset.h workaround, fix source instead.
+
+--- CMakeLists.txt.orig        2017-08-15 00:16:21.000000000 +0000
++++ CMakeLists.txt
+@@ -809,7 +809,7 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "(Fre
+ 
+ if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
+    # special hack for Solaris to handle crazy system sys/regset.h
+-   include_directories("${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/Solaris")
++   #include_directories("${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/Solaris")
+ endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
+ 
+ # Make sure we don't get -rdynamic in every binary. For those that need it,
Index: pkgsrc/lang/llvm/patches/patch-include_llvm_Support_DataTypes.h.cmake
diff -u /dev/null pkgsrc/lang/llvm/patches/patch-include_llvm_Support_DataTypes.h.cmake:1.1
--- /dev/null   Mon Jan  8 10:48:34 2018
+++ pkgsrc/lang/llvm/patches/patch-include_llvm_Support_DataTypes.h.cmake       Mon Jan  8 10:48:34 2018
@@ -0,0 +1,39 @@
+$NetBSD: patch-include_llvm_Support_DataTypes.h.cmake,v 1.1 2018/01/08 10:48:34 jperkin Exp $
+
+Implement sys/regset.h workaround directly.
+
+--- include/llvm/Support/DataTypes.h.cmake.orig        2017-06-06 11:49:48.000000000 +0000
++++ include/llvm/Support/DataTypes.h.cmake
+@@ -132,4 +132,32 @@ typedef signed int ssize_t;
+ #define HUGE_VALF (float)HUGE_VAL
+ #endif
+ 
++/*
++ * At some point sys/regset.h will be included, and on older releases
++ * of illumos it exports conflicting macros used by LLVM.  Include it
++ * early and ensure they are undefined first.
++ */
++#if defined(__sun)
++#include <sys/regset.h>
++#undef CS
++#undef DS
++#undef ES
++#undef FS
++#undef GS
++#undef SS
++#undef EAX
++#undef ECX
++#undef EDX
++#undef EBX
++#undef ESP
++#undef EBP
++#undef ESI
++#undef EDI
++#undef EIP
++#undef UESP
++#undef EFL
++#undef ERR
++#undef TRAPNO
++#endif
++
+ #endif /* SUPPORT_DATATYPES_H */



Home | Main Index | Thread Index | Old Index