mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
gcc: fix -fstack-protector on x86 (#6383)
linking stack-protected objects on x86 would fail if -fstack-protector wasn't passed to the linker. Only one symbol is missing, provided by libssp_nonshared. So merge it in libgcc.a, which is always linked in.
This commit is contained in:
@@ -358,6 +358,15 @@ INSTALL()
|
||||
$libDir/
|
||||
cp $gccLibDir/libgcc*.a $developLibDir/
|
||||
|
||||
# merge libssp_nonshared.a in libgcc.a on x86
|
||||
if [ "$targetArchitecture" = "x86_gcc2" ]; then
|
||||
(mkdir temp_libgcc; cd temp_libgcc; ar x ../$gccLibDir/libssp_nonshared.a;
|
||||
ar x ../$gccLibDir/libgcc.a; cd ..)
|
||||
ar -qc $developLibDir/libgcc.a temp_libgcc/*.o
|
||||
cp $developLibDir/libgcc.a $gccLibDir/libgcc.a
|
||||
rm -rf temp_libgcc
|
||||
fi
|
||||
|
||||
# gcc and c++ headers
|
||||
mkdir -p $includeDir/gcc
|
||||
cp -r $gccLibDir/include $includeDir/gcc/
|
||||
|
||||
Reference in New Issue
Block a user