From 9a7c55f1eec0ce50d7f655608bb7b13f3e500b9c Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Tue, 3 Sep 2024 15:51:56 +0000 Subject: user/llvm*: Generate less debug info on 32-bit Full debug-info for LLVM causes multiple failures on 32-bit builders, including with the linker, scanelf, and tar. On 32-bit only, use -ggdb1 to reduce the level of debuginfo output. Since debug information is reduced, we no longer need the `strip` command from #797. Closes: #1251, #1253 --- user/llvm14/APKBUILD | 9 ++++++++- user/llvm18/APKBUILD | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'user') diff --git a/user/llvm14/APKBUILD b/user/llvm14/APKBUILD index 86b4789ea..77a39f78d 100644 --- a/user/llvm14/APKBUILD +++ b/user/llvm14/APKBUILD @@ -110,6 +110,14 @@ build() { export CXXFLAGS="$CXXFLAGS -fexcess-precision=fast";; esac + case $CTARGET_ARCH in + pmmx|x86|ppc|armhf|armv7) + # 32-bit 2GB memory ceiling + # 'ld' chokes on 2GB .debug_info, 'scanelf' on binary size + # see also: #1251, #1253, abuild#20 + export CXXFLAGS="$CXXFLAGS -ggdb1";; + esac + cmake -G "Unix Makefiles" -Wno-dev \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/$_prefix \ @@ -213,7 +221,6 @@ libs() { mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/$_prefix/lib/$main_soname "$subpkgdir"/usr/lib/ ln -s $main_soname "$subpkgdir"/usr/lib/$ver_soname - strip "$subpkgdir"/usr/lib/$ver_soname #797 # And also symlink it back to the LLVM prefix. mkdir -p "$subpkgdir"/$_prefix/lib diff --git a/user/llvm18/APKBUILD b/user/llvm18/APKBUILD index d727afc2a..02a61d738 100644 --- a/user/llvm18/APKBUILD +++ b/user/llvm18/APKBUILD @@ -145,6 +145,14 @@ build() { export CXXFLAGS="$CXXFLAGS -fexcess-precision=fast";; esac + case $CTARGET_ARCH in + pmmx|x86|ppc|armhf|armv7) + # 32-bit 2GB memory ceiling + # 'ld' chokes on 2GB .debug_info, 'scanelf' on binary size + # see also: #1251, #1253, abuild#20 + export CXXFLAGS="$CXXFLAGS -ggdb1";; + esac + cmake -G "Unix Makefiles" -Wno-dev \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/$_prefix \ @@ -258,7 +266,6 @@ libs() { mv "$pkgdir"/$_prefix/lib/$_real_link "$subpkgdir"/usr/lib/ done ln -s $main_soname "$subpkgdir"/usr/lib/$ver_soname - strip "$subpkgdir"/usr/lib/$ver_soname #797 # And also symlink it back to the LLVM prefix. mkdir -p "$subpkgdir"/$_prefix/lib -- cgit v1.2.3-70-g09d2