pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/llvm llvm: Change how sys/regset.h workaround is ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9ba099f5dc3e
branches: trunk
changeset: 373683:9ba099f5dc3e
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Mon Jan 08 10:48:34 2018 +0000
description:
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.
diffstat:
lang/llvm/Makefile | 3 +-
lang/llvm/distinfo | 4 +-
lang/llvm/patches/patch-CMakeLists.txt | 15 +++
lang/llvm/patches/patch-include_llvm_Support_DataTypes.h.cmake | 39 ++++++++++
4 files changed, 59 insertions(+), 2 deletions(-)
diffs (96 lines):
diff -r 6485005d7481 -r 9ba099f5dc3e lang/llvm/Makefile
--- a/lang/llvm/Makefile Mon Jan 08 10:39:45 2018 +0000
+++ b/lang/llvm/Makefile Mon Jan 08 10:48:34 2018 +0000
@@ -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
diff -r 6485005d7481 -r 9ba099f5dc3e lang/llvm/distinfo
--- a/lang/llvm/distinfo Mon Jan 08 10:39:45 2018 +0000
+++ b/lang/llvm/distinfo Mon Jan 08 10:48:34 2018 +0000
@@ -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
diff -r 6485005d7481 -r 9ba099f5dc3e lang/llvm/patches/patch-CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/llvm/patches/patch-CMakeLists.txt Mon Jan 08 10:48:34 2018 +0000
@@ -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,
diff -r 6485005d7481 -r 9ba099f5dc3e lang/llvm/patches/patch-include_llvm_Support_DataTypes.h.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/llvm/patches/patch-include_llvm_Support_DataTypes.h.cmake Mon Jan 08 10:48:34 2018 +0000
@@ -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