aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-04-24 09:29:29 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-04-24 08:45:16 +0000
commit174ae1dd00b040e726010a3b2ef03f7ce86352f9 (patch)
tree65d9237748c5a4d725754439abcdeccd33369f8e
parent5b7f6210384796d1f77683ca0e960babe624e223 (diff)
downloadaports-174ae1dd00b040e726010a3b2ef03f7ce86352f9.tar.gz
aports-174ae1dd00b040e726010a3b2ef03f7ce86352f9.tar.bz2
aports-174ae1dd00b040e726010a3b2ef03f7ce86352f9.tar.xz
community/llvm-libunwind: fix build on x86 & cleanup
-rw-r--r--community/llvm-libunwind/APKBUILD20
-rw-r--r--community/llvm-libunwind/link-libssp.patch20
2 files changed, 30 insertions, 10 deletions
diff --git a/community/llvm-libunwind/APKBUILD b/community/llvm-libunwind/APKBUILD
index 80b92ee0d6..aa80cb5bb8 100644
--- a/community/llvm-libunwind/APKBUILD
+++ b/community/llvm-libunwind/APKBUILD
@@ -14,31 +14,29 @@ license="Apache-2.0"
depends_dev="!libunwind-dev"
makedepends="cmake llvm$_llvmver-dev"
subpackages="$pkgname-static $pkgname-dev"
-source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/libunwind-$pkgver.src.tar.xz"
+source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/libunwind-$pkgver.src.tar.xz
+ link-libssp.patch
+ "
builddir="$srcdir/$_pkgname-$pkgver.src"
options="!check"
build() {
- mkdir -p "$builddir/build"
- cd "$builddir/build"
-
local crossopts=''
[ "$CBUILD" != "$CHOST" ] && crossopts="
-DCMAKE_SYSTEM_NAME=Linux
-DCMAKE_HOST_SYSTEM_NAME=Linux
-DLIBUNWIND_SYSROOT=$CBUILDROOT"
- cmake .. \
+ cmake -B build \
-DCMAKE_BUILD_TYPE=MinSizeRel \
- -DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS -O2" \
- -DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS -O2" \
+ -DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
+ -DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- \
-DLLVM_CONFIG_PATH="/usr/lib/llvm$_llvmver/bin/llvm-config" \
-DLIBUNWIND_HAS_NODEFAULTLIBS_FLAG=OFF \
$crossopts
- make
+ make -C build
}
package() {
@@ -48,4 +46,6 @@ package() {
cp include/*.h "$pkgdir"/usr/include/
}
-sha512sums="cf75cd7daf6ccdfa6509440e6ef25995f6ebfab06bae62ccd3717c7039268921081db9a89d51bbb374a391623814406e682eecf79ae0310d3db29d1b3ddfc906 libunwind-10.0.0.src.tar.xz"
+
+sha512sums="cf75cd7daf6ccdfa6509440e6ef25995f6ebfab06bae62ccd3717c7039268921081db9a89d51bbb374a391623814406e682eecf79ae0310d3db29d1b3ddfc906 libunwind-10.0.0.src.tar.xz
+28063f237033006666491d8475d57f4c9cc998ac22ad06234fdb6cf54cc434d79ab1778c8dbb3ec02764096d5e65c31a7e3976f079fc56b702f3abd16ac93f0e link-libssp.patch"
diff --git a/community/llvm-libunwind/link-libssp.patch b/community/llvm-libunwind/link-libssp.patch
new file mode 100644
index 0000000000..b72eaf7ece
--- /dev/null
+++ b/community/llvm-libunwind/link-libssp.patch
@@ -0,0 +1,20 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -123,7 +123,7 @@
+ if(COMMAND llvm_setup_rpath)
+ llvm_setup_rpath(unwind_shared)
+ endif()
+- target_link_libraries(unwind_shared PRIVATE ${LIBUNWIND_LIBRARIES})
++ target_link_libraries(unwind_shared PRIVATE "${LIBUNWIND_LIBRARIES} -lssp_nonshared")
+ set_target_properties(unwind_shared PROPERTIES
+ CXX_EXTENSIONS OFF
+ CXX_STANDARD 11
+@@ -148,7 +148,7 @@
+ else()
+ target_compile_options(unwind_static PRIVATE -fno-rtti)
+ endif()
+- target_link_libraries(unwind_static PRIVATE ${LIBUNWIND_LIBRARIES})
++ target_link_libraries(unwind_static PRIVATE "${LIBUNWIND_LIBRARIES} -lssp_nonshared")
+ set_target_properties(unwind_static PROPERTIES
+ CXX_EXTENSIONS OFF
+ CXX_STANDARD 11