diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-03-23 09:18:41 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-03-23 09:18:41 +0100 |
commit | b40d7528726cc97cf17ba6944842dc7975e60b4b (patch) | |
tree | 3079ee4822b3c1aafe34547169c4aa4a41417dc4 /pkgs/development/compilers/llvm | |
parent | 04066403aef0fe8c1b8123f862ed9f58f04583f7 (diff) | |
parent | 2cc644411361fcdde9c9b3b84d1ddd8d87c435af (diff) | |
download | nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.gz nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.bz2 nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.lz nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.xz nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.tar.zst nixlib-b40d7528726cc97cf17ba6944842dc7975e60b4b.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r-- | pkgs/development/compilers/llvm/7/crtbegin-and-end.patch | 30 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/clang/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/compiler-rt.nix | 11 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/crtbegin-and-end.patch | 30 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/libc++/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/libc++abi.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/lld.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/lldb.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/llvm.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/openmp.nix | 2 |
11 files changed, 51 insertions, 44 deletions
diff --git a/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch b/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch index 032b04708d16..e63be181f95c 100644 --- a/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch +++ b/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch @@ -156,7 +156,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt =================================================================== --- /dev/null +++ compiler-rt/lib/crt/CMakeLists.txt -@@ -0,0 +1,101 @@ +@@ -0,0 +1,102 @@ +add_compiler_rt_component(crt) + +function(check_cxx_section_exists section output) @@ -216,7 +216,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt + OUTPUT_VARIABLE CHECK_OUTPUT + ERROR_VARIABLE CHECK_ERROR + ) -+ string(FIND ${CHECK_OUTPUT} ${section} SECTION_FOUND) ++ string(FIND "${CHECK_OUTPUT}" "${section}" SECTION_FOUND) + + if(NOT SECTION_FOUND EQUAL -1) + set(${output} TRUE PARENT_SCOPE) @@ -231,6 +231,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt + SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n") + +append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS) ++append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC CRT_CFLAGS) + +foreach(arch ${CRT_SUPPORTED_ARCH}) + add_compiler_rt_runtime(clang_rt.crtbegin @@ -243,7 +244,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt + OBJECT + ARCHS ${arch} + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c -+ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC ++ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED + PARENT_TARGET crt) + add_compiler_rt_runtime(clang_rt.crtend + OBJECT @@ -255,14 +256,14 @@ Index: compiler-rt/lib/crt/CMakeLists.txt + OBJECT + ARCHS ${arch} + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c -+ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC ++ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED + PARENT_TARGET crt) +endforeach() Index: compiler-rt/lib/crt/crtbegin.c =================================================================== --- /dev/null +++ compiler-rt/lib/crt/crtbegin.c -@@ -0,0 +1,110 @@ +@@ -0,0 +1,108 @@ +/* ===-- crtbegin.c - Start of constructors and destructors ----------------=== + * + * The LLVM Compiler Infrastructure @@ -282,8 +283,8 @@ Index: compiler-rt/lib/crt/crtbegin.c +void *__dso_handle = (void *)0; +#endif + -+static long __EH_FRAME_LIST__[] __attribute__(( -+ section(".eh_frame"), aligned(sizeof(void *)), visibility("hidden"))) = {}; ++static long __EH_FRAME_LIST__[] ++ __attribute__((section(".eh_frame"), aligned(sizeof(void *)))) = {}; + +extern void __register_frame_info(const void *, void *) __attribute__((weak)); +extern void *__deregister_frame_info(const void *) __attribute__((weak)); @@ -292,9 +293,8 @@ Index: compiler-rt/lib/crt/crtbegin.c +typedef void (*fp)(void); + +static fp __CTOR_LIST__[] -+ __attribute__((section(".ctors"), aligned(sizeof(fp)), visibility("hidden"), -+ used)) = {(fp)-1}; -+extern fp __CTOR_LIST_END__[] __attribute__((visibility("hidden"))); ++ __attribute__((section(".ctors"), aligned(sizeof(fp)), used)) = {(fp)-1}; ++extern fp __CTOR_LIST_END__[]; +#endif + +#ifdef CRT_SHARED @@ -334,9 +334,8 @@ Index: compiler-rt/lib/crt/crtbegin.c + +#ifndef CRT_HAS_INITFINI_ARRAY +static fp __DTOR_LIST__[] -+ __attribute__((section(".dtors"), aligned(sizeof(fp)), visibility("hidden"), -+ used)) = {(fp)-1}; -+extern fp __DTOR_LIST_END__[] __attribute__((visibility("hidden"))); ++ __attribute__((section(".dtors"), aligned(sizeof(fp)), used)) = {(fp)-1}; ++extern fp __DTOR_LIST_END__[]; +#endif + +static void __attribute__((used)) __do_fini() { @@ -377,7 +376,7 @@ Index: compiler-rt/lib/crt/crtend.c =================================================================== --- /dev/null +++ compiler-rt/lib/crt/crtend.c -@@ -0,0 +1,23 @@ +@@ -0,0 +1,24 @@ +/* ===-- crtend.c - End of constructors and destructors --------------------=== + * + * The LLVM Compiler Infrastructure @@ -392,7 +391,8 @@ Index: compiler-rt/lib/crt/crtend.c + +// Put 4-byte zero which is the length field in FDE at the end as a terminator. +const int32_t __EH_FRAME_LIST_END__[] -+ __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)), used)) = {0}; ++ __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)), ++ visibility("hidden"), used)) = {0}; + +#ifndef CRT_HAS_INITFINI_ARRAY +typedef void (*fp)(void); diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix index ad6300942613..44ec6c376cdb 100644 --- a/pkgs/development/compilers/llvm/8/clang/default.nix +++ b/pkgs/development/compilers/llvm/8/clang/default.nix @@ -9,7 +9,7 @@ let name = "clang-${version}"; unpackPhase = '' - unpackFile ${fetch "cfe" "0z5si83w0i3l445c7624204mxsv82naps96icnv7v20s6njbsbsi"} + unpackFile ${fetch "cfe" "0svk1f70hvpwrjp6x5i9kqwrqwxnmcrw5s7f4cxyd100mdd12k08"} mv cfe-${version}* clang sourceRoot=$PWD/clang unpackFile ${clang-tools-extra_src} diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix index 4e7df060e503..4965b57b0d73 100644 --- a/pkgs/development/compilers/llvm/8/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { name = "compiler-rt-${version}"; inherit version; - src = fetch "compiler-rt" "1rxa1rcn7r3yfn9cj0sx5gd90kslbd13q080rdyqb6jr9a9i1avb"; + src = fetch "compiler-rt" "1c919wsm17xnv7lr8bhpq2wkq8113lzlw6hzhfr737j59x3wfddl"; nativeBuildInputs = [ cmake python llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}" "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}" - ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DCMAKE_C_FLAGS=-nodefaultlibs" "-DCMAKE_CXX_COMPILER_WORKS=ON" "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" @@ -20,13 +20,18 @@ stdenv.mkDerivation rec { "-DCOMPILER_RT_BUILD_PROFILE=OFF" "-DCOMPILER_RT_BAREMETAL_BUILD=ON" "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}" + ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" + "-DCOMPILER_RT_BUILD_XRAY=OFF" + "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" + "-DCOMPILER_RT_BUILD_PROFILE=OFF" ]; outputs = [ "out" "dev" ]; patches = [ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory - ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch + ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch; diff --git a/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch b/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch index 032b04708d16..e63be181f95c 100644 --- a/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch +++ b/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch @@ -156,7 +156,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt =================================================================== --- /dev/null +++ compiler-rt/lib/crt/CMakeLists.txt -@@ -0,0 +1,101 @@ +@@ -0,0 +1,102 @@ +add_compiler_rt_component(crt) + +function(check_cxx_section_exists section output) @@ -216,7 +216,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt + OUTPUT_VARIABLE CHECK_OUTPUT + ERROR_VARIABLE CHECK_ERROR + ) -+ string(FIND ${CHECK_OUTPUT} ${section} SECTION_FOUND) ++ string(FIND "${CHECK_OUTPUT}" "${section}" SECTION_FOUND) + + if(NOT SECTION_FOUND EQUAL -1) + set(${output} TRUE PARENT_SCOPE) @@ -231,6 +231,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt + SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n") + +append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS) ++append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC CRT_CFLAGS) + +foreach(arch ${CRT_SUPPORTED_ARCH}) + add_compiler_rt_runtime(clang_rt.crtbegin @@ -243,7 +244,7 @@ Index: compiler-rt/lib/crt/CMakeLists.txt + OBJECT + ARCHS ${arch} + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c -+ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC ++ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED + PARENT_TARGET crt) + add_compiler_rt_runtime(clang_rt.crtend + OBJECT @@ -255,14 +256,14 @@ Index: compiler-rt/lib/crt/CMakeLists.txt + OBJECT + ARCHS ${arch} + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c -+ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED -fPIC ++ CFLAGS ${CRT_CFLAGS} -DCRT_SHARED + PARENT_TARGET crt) +endforeach() Index: compiler-rt/lib/crt/crtbegin.c =================================================================== --- /dev/null +++ compiler-rt/lib/crt/crtbegin.c -@@ -0,0 +1,110 @@ +@@ -0,0 +1,108 @@ +/* ===-- crtbegin.c - Start of constructors and destructors ----------------=== + * + * The LLVM Compiler Infrastructure @@ -282,8 +283,8 @@ Index: compiler-rt/lib/crt/crtbegin.c +void *__dso_handle = (void *)0; +#endif + -+static long __EH_FRAME_LIST__[] __attribute__(( -+ section(".eh_frame"), aligned(sizeof(void *)), visibility("hidden"))) = {}; ++static long __EH_FRAME_LIST__[] ++ __attribute__((section(".eh_frame"), aligned(sizeof(void *)))) = {}; + +extern void __register_frame_info(const void *, void *) __attribute__((weak)); +extern void *__deregister_frame_info(const void *) __attribute__((weak)); @@ -292,9 +293,8 @@ Index: compiler-rt/lib/crt/crtbegin.c +typedef void (*fp)(void); + +static fp __CTOR_LIST__[] -+ __attribute__((section(".ctors"), aligned(sizeof(fp)), visibility("hidden"), -+ used)) = {(fp)-1}; -+extern fp __CTOR_LIST_END__[] __attribute__((visibility("hidden"))); ++ __attribute__((section(".ctors"), aligned(sizeof(fp)), used)) = {(fp)-1}; ++extern fp __CTOR_LIST_END__[]; +#endif + +#ifdef CRT_SHARED @@ -334,9 +334,8 @@ Index: compiler-rt/lib/crt/crtbegin.c + +#ifndef CRT_HAS_INITFINI_ARRAY +static fp __DTOR_LIST__[] -+ __attribute__((section(".dtors"), aligned(sizeof(fp)), visibility("hidden"), -+ used)) = {(fp)-1}; -+extern fp __DTOR_LIST_END__[] __attribute__((visibility("hidden"))); ++ __attribute__((section(".dtors"), aligned(sizeof(fp)), used)) = {(fp)-1}; ++extern fp __DTOR_LIST_END__[]; +#endif + +static void __attribute__((used)) __do_fini() { @@ -377,7 +376,7 @@ Index: compiler-rt/lib/crt/crtend.c =================================================================== --- /dev/null +++ compiler-rt/lib/crt/crtend.c -@@ -0,0 +1,23 @@ +@@ -0,0 +1,24 @@ +/* ===-- crtend.c - End of constructors and destructors --------------------=== + * + * The LLVM Compiler Infrastructure @@ -392,7 +391,8 @@ Index: compiler-rt/lib/crt/crtend.c + +// Put 4-byte zero which is the length field in FDE at the end as a terminator. +const int32_t __EH_FRAME_LIST_END__[] -+ __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)), used)) = {0}; ++ __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)), ++ visibility("hidden"), used)) = {0}; + +#ifndef CRT_HAS_INITFINI_ARRAY +typedef void (*fp)(void); diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix index f70585632e87..c5f2163450fe 100644 --- a/pkgs/development/compilers/llvm/8/default.nix +++ b/pkgs/development/compilers/llvm/8/default.nix @@ -6,14 +6,14 @@ let release_version = "8.0.0"; - version = release_version + "rc2"; # differentiating these is important for rc's + version = release_version; # differentiating these is important for rc's fetch = name: sha256: fetchurl { - url = "https://prereleases.llvm.org/${release_version}/rc2/${name}-${version}.src.tar.xz"; + url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz"; inherit sha256; }; - clang-tools-extra_src = fetch "clang-tools-extra" "1ypzbk7lf9dzkqh4p37dlr1bggjdrixr5gwb71jk9gh98grr2m5g"; + clang-tools-extra_src = fetch "clang-tools-extra" "0jwx6nnshp92pd5852y7ip7qhaqdf8az5g0440pli9q8whmi402g"; tools = stdenv.lib.makeExtensible (tools: let callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix index 52a1dc53d35e..84db33209ebd 100644 --- a/pkgs/development/compilers/llvm/8/libc++/default.nix +++ b/pkgs/development/compilers/llvm/8/libc++/default.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation rec { name = "libc++-${version}"; - src = fetch "libcxx" "1c8idvlqm4ik62q0llsndk9449yrgkj8hv5lz411hnbqjs09q9qq"; + src = fetch "libcxx" "1qlx3wlxrnc5cwc1fcfc2vhfsl7j4294hi8y5kxj8hy8wxsjd462"; postUnpack = '' unpackFile ${libcxxabi.src} diff --git a/pkgs/development/compilers/llvm/8/libc++abi.nix b/pkgs/development/compilers/llvm/8/libc++abi.nix index 9c3bfe5e1ff4..976c289e5bc5 100644 --- a/pkgs/development/compilers/llvm/8/libc++abi.nix +++ b/pkgs/development/compilers/llvm/8/libc++abi.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation { name = "libc++abi-${version}"; - src = fetch "libcxxabi" "0hdg7xw8vazw85i675qld7i6wqx502srny84cp0w6wi6pk44xiqr"; + src = fetch "libcxxabi" "1k875f977ybdkpdnr9105wa6hccy9qvpd9xd42n75h7p56bdxmn2"; nativeBuildInputs = [ cmake ]; buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind; diff --git a/pkgs/development/compilers/llvm/8/lld.nix b/pkgs/development/compilers/llvm/8/lld.nix index ba7f888f4dd7..7fff6843c5f4 100644 --- a/pkgs/development/compilers/llvm/8/lld.nix +++ b/pkgs/development/compilers/llvm/8/lld.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { name = "lld-${version}"; - src = fetch "lld" "14nganpwr5y111zhwws95p6ikp8kfiybfdr2yfz5cmhb3zkcgk4h"; + src = fetch "lld" "0dvf38pbm7jy88g66mz7ikkdfhm2qpj0iyzh62hzycifjbnciblw"; nativeBuildInputs = [ cmake ]; buildInputs = [ llvm libxml2 ]; diff --git a/pkgs/development/compilers/llvm/8/lldb.nix b/pkgs/development/compilers/llvm/8/lldb.nix index ead507ea2cae..d40eeb4a2074 100644 --- a/pkgs/development/compilers/llvm/8/lldb.nix +++ b/pkgs/development/compilers/llvm/8/lldb.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation { name = "lldb-${version}"; - src = fetch "lldb" "0r364w49m0l0808wm06g777qd14gwxnz0z267dbnwqkw6zc361lc"; + src = fetch "lldb" "0wq3mi76fk86g2g2bcsr0yhagh1dlf2myk641ai58rc116gqp4a9"; postPatch = '' # Fix up various paths that assume llvm and clang are installed in the same place diff --git a/pkgs/development/compilers/llvm/8/llvm.nix b/pkgs/development/compilers/llvm/8/llvm.nix index 273e33893fec..5d8d08167298 100644 --- a/pkgs/development/compilers/llvm/8/llvm.nix +++ b/pkgs/development/compilers/llvm/8/llvm.nix @@ -22,8 +22,8 @@ let inherit (stdenv.lib) optional optionals optionalString; - src = fetch "llvm" "1h9zqgf968si0nzdmsa9rz634zrmz6mprvz2ifw6ky0h7va5rcvq"; - polly_src = fetch "polly" "1wwnn0cxnrmiqb6kg577myz6kb8sm18jwc020lf0b1k5as7aw2kq"; + src = fetch "llvm" "0k124sxkfhfi1rca6kzkdraf4axhx99x3cw2rk55056628dvwwl8"; + polly_src = fetch "polly" "1x4xv3j226rqdddp7b61d71wsx2b8vmmri02ycx27y2fg7ba7xg3"; # Used when creating a version-suffixed symlink of libLLVM.dylib shortVersion = with stdenv.lib; @@ -71,6 +71,8 @@ in stdenv.mkDerivation (rec { substituteInPlace unittests/Support/CMakeLists.txt \ --replace "add_subdirectory(DynamicLibrary)" "" rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp + # valgrind unhappy with musl or glibc, but fails w/musl only + rm test/CodeGen/AArch64/wineh4.mir '' + '' patchShebangs test/BugPoint/compile-custom.ll.py ''; diff --git a/pkgs/development/compilers/llvm/8/openmp.nix b/pkgs/development/compilers/llvm/8/openmp.nix index 1a628cf6dd4a..bf85cae5abe7 100644 --- a/pkgs/development/compilers/llvm/8/openmp.nix +++ b/pkgs/development/compilers/llvm/8/openmp.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { name = "openmp-${version}"; - src = fetch "openmp" "1xxxclzizcrfh0k870n4n3hh0khw14sv5i7s2kbdwl099k8b96cv"; + src = fetch "openmp" "1mf9cpgvix34xlpv0inkgl3qmdvgvp96f7sksqizri0n5xfp1cgp"; nativeBuildInputs = [ cmake perl ]; buildInputs = [ llvm ]; |