mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 12:01:41 +02:00
main/gcc: expand cross-compiler lib symlinks as linker scripts
This makes gcc to search the actual library from libpath. Needed because cross-compiler's library is really in --sysroot path. Alternative is to move the .so files to separate new target arch specific gcc-dev package. But that'd require musl-dev or build-base to depend on it, so this is the easy fix around it.
This commit is contained in:
parent
9162ccbae9
commit
00e6630183
@ -382,6 +382,16 @@ package() {
|
||||
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "$pkgdir"/usr/share
|
||||
# libcc1 does not depend on target, don't ship it
|
||||
rm -rf "$pkgdir"/usr/lib/libcc1.so*
|
||||
|
||||
# fixup gcc library symlinks to be linker scripts so
|
||||
# linker finds the libs from relocated sysroot
|
||||
for so in "$pkgdir"/usr/$CTARGET/lib/*.so; do
|
||||
if [ -h "$so" ]; then
|
||||
local _real=$(basename $(readlink "$so"))
|
||||
rm -f "$so"
|
||||
echo "GROUP ($_real)" > "$so"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user