libunwind: Use correct flags to link. The configure script only tests if CXX supports various flags, but then uses CC to compile and link various objects. While compiling only issues warnings about incorrect flags, attempting to link with the wrong front end causes fatal errors. Specifically fixes trying to link with gcc using "-nostdlib++".diff -r1.33 -r1.34 pkgsrc/lang/libunwind/distinfo
(jperkin)
@@ -1,12 +1,12 @@ | @@ -1,12 +1,12 @@ | |||
1 | $NetBSD: distinfo,v 1.33 2023/10/06 19:15:21 adam Exp $ | 1 | $NetBSD: distinfo,v 1.34 2023/12/01 18:27:22 jperkin Exp $ | |
2 | 2 | |||
3 | BLAKE2s (cmake-16.0.6.src.tar.xz) = a967225f31bcd98484d632a2d530c498131b0035f18b15e27915663b915dc6ba | 3 | BLAKE2s (cmake-16.0.6.src.tar.xz) = a967225f31bcd98484d632a2d530c498131b0035f18b15e27915663b915dc6ba | |
4 | SHA512 (cmake-16.0.6.src.tar.xz) = 52ecd941d2d85a5b668caa5d0d40480cb6a97b3bf1174e634c2a93e9ef6d03670ca7e96abb0a60cb33ba537b93d5788754dab1f2f45c1f623f788162717d088b | 4 | SHA512 (cmake-16.0.6.src.tar.xz) = 52ecd941d2d85a5b668caa5d0d40480cb6a97b3bf1174e634c2a93e9ef6d03670ca7e96abb0a60cb33ba537b93d5788754dab1f2f45c1f623f788162717d088b | |
5 | Size (cmake-16.0.6.src.tar.xz) = 9008 bytes | 5 | Size (cmake-16.0.6.src.tar.xz) = 9008 bytes | |
6 | BLAKE2s (libcxx-16.0.6.src.tar.xz) = 4ad216b6f725c6b3207f76a0b1bcdb2ef46bfcf9cef8cbe289b3c89632fcbf3d | 6 | BLAKE2s (libcxx-16.0.6.src.tar.xz) = 4ad216b6f725c6b3207f76a0b1bcdb2ef46bfcf9cef8cbe289b3c89632fcbf3d | |
7 | SHA512 (libcxx-16.0.6.src.tar.xz) = d5ccadcceb67815ad0537ec82d40fd52b0ac5e5b37acba8951d92d2f16f7e19adf517d7249f0fca448c9f60a740c63ddfe23630e519148e8d8f37693614830db | 7 | SHA512 (libcxx-16.0.6.src.tar.xz) = d5ccadcceb67815ad0537ec82d40fd52b0ac5e5b37acba8951d92d2f16f7e19adf517d7249f0fca448c9f60a740c63ddfe23630e519148e8d8f37693614830db | |
8 | Size (libcxx-16.0.6.src.tar.xz) = 3655520 bytes | 8 | Size (libcxx-16.0.6.src.tar.xz) = 3655520 bytes | |
9 | BLAKE2s (libunwind-16.0.6.src.tar.xz) = a34c9ff82a3d889c4b9278bca3a96429f285dd38961d49309570bc60600e5fb6 | 9 | BLAKE2s (libunwind-16.0.6.src.tar.xz) = a34c9ff82a3d889c4b9278bca3a96429f285dd38961d49309570bc60600e5fb6 | |
10 | SHA512 (libunwind-16.0.6.src.tar.xz) = abc1463bbebd771832c5da34aeb1dfe4c168b90c8257abfcfda573f495359b5968a2169f528dbf8276ed0b9bc1c42f27f4b4383d335d6e6416b6a536074b3f3f | 10 | SHA512 (libunwind-16.0.6.src.tar.xz) = abc1463bbebd771832c5da34aeb1dfe4c168b90c8257abfcfda573f495359b5968a2169f528dbf8276ed0b9bc1c42f27f4b4383d335d6e6416b6a536074b3f3f | |
11 | Size (libunwind-16.0.6.src.tar.xz) = 115032 bytes | 11 | Size (libunwind-16.0.6.src.tar.xz) = 115032 bytes | |
12 | SHA1 (patch-src_CMakeLists.txt) = a8ac316fddf0d71c75d7f64695335a6f4842fead | 12 | SHA1 (patch-src_CMakeLists.txt) = 84e31c445264c70b281374c43f46c5e9f1802bfa |
@@ -1,29 +1,49 @@ | @@ -1,29 +1,49 @@ | |||
1 | $NetBSD: patch-src_CMakeLists.txt,v 1.5 2023/01/12 22:47:25 wiz Exp $ | 1 | $NetBSD: patch-src_CMakeLists.txt,v 1.6 2023/12/01 18:27:22 jperkin Exp $ | |
2 | 2 | |||
3 | Fix building assembler files. | 3 | Fix building assembler files. | |
4 | https://github.com/llvm/llvm-project/issues/59978 | 4 | https://github.com/llvm/llvm-project/issues/59978 | |
5 | 5 | |||
6 | --- src/CMakeLists.txt.orig 2023-01-12 07:12:30.000000000 +0000 | 6 | Use correct flags to link. | |
7 | ||||
8 | --- src/CMakeLists.txt.orig 2023-06-10 22:58:16.000000000 +0000 | |||
7 | +++ src/CMakeLists.txt | 9 | +++ src/CMakeLists.txt | |
8 | @@ -1,4 +1,5 @@ | 10 | @@ -1,4 +1,5 @@ | |
9 | # Get sources | 11 | # Get sources | |
10 | +enable_language(ASM) | 12 | +enable_language(ASM) | |
11 | 13 | |||
12 | set(LIBUNWIND_CXX_SOURCES | 14 | set(LIBUNWIND_CXX_SOURCES | |
13 | libunwind.cpp | 15 | libunwind.cpp | |
14 | @@ -31,15 +32,6 @@ set(LIBUNWIND_ASM_SOURCES | 16 | @@ -31,15 +32,6 @@ set(LIBUNWIND_ASM_SOURCES | |
15 | UnwindRegistersSave.S | 17 | UnwindRegistersSave.S | |
16 | ) | 18 | ) | |
17 | 19 | |||
18 | -# See add_asm_sources() in compiler-rt for explanation of this workaround. | 20 | -# See add_asm_sources() in compiler-rt for explanation of this workaround. | |
19 | -# CMake doesn't work correctly with assembly on AIX. Workaround by compiling | 21 | -# CMake doesn't work correctly with assembly on AIX. Workaround by compiling | |
20 | -# as C files as well. | 22 | -# as C files as well. | |
21 | -if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR | 23 | -if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR | |
22 | - (MINGW AND CMAKE_VERSION VERSION_LESS 3.17) OR | 24 | - (MINGW AND CMAKE_VERSION VERSION_LESS 3.17) OR | |
23 | - (${CMAKE_SYSTEM_NAME} MATCHES "AIX")) | 25 | - (${CMAKE_SYSTEM_NAME} MATCHES "AIX")) | |
24 | - set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C) | 26 | - set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C) | |
25 | -endif() | 27 | -endif() | |
26 | - | 28 | - | |
27 | set(LIBUNWIND_HEADERS | 29 | set(LIBUNWIND_HEADERS | |
28 | AddressSpace.hpp | 30 | AddressSpace.hpp | |
29 | assembly.h | 31 | assembly.h | |
32 | @@ -160,7 +152,7 @@ if (LIBUNWIND_ENABLE_SHARED) | |||
33 | set_target_properties(unwind_shared | |||
34 | PROPERTIES | |||
35 | LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}" | |||
36 | - LINKER_LANGUAGE C | |||
37 | + LINKER_LANGUAGE CXX | |||
38 | OUTPUT_NAME "${LIBUNWIND_SHARED_OUTPUT_NAME}" | |||
39 | VERSION "1.0" | |||
40 | SOVERSION "1" | |||
41 | @@ -200,7 +192,7 @@ if (LIBUNWIND_ENABLE_STATIC) | |||
42 | set_target_properties(unwind_static | |||
43 | PROPERTIES | |||
44 | LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}" | |||
45 | - LINKER_LANGUAGE C | |||
46 | + LINKER_LANGUAGE CXX | |||
47 | OUTPUT_NAME "${LIBUNWIND_STATIC_OUTPUT_NAME}" | |||
48 | ) | |||
49 |