gcc 4: Disable ASLR for the executables

Makes pre-compiled headers work reliably.
This commit is contained in:
Ingo Weinhold
2013-12-02 17:05:32 +01:00
parent 0f33410a96
commit 664e3c050d

View File

@@ -10,7 +10,7 @@ SRC_URI="
git+file://$portBaseDir/../binutils/download/BuildtoolsPM.git#2d0a2c6404ffae1a46eb7e74daab08099b45af2c git+file://$portBaseDir/../binutils/download/BuildtoolsPM.git#2d0a2c6404ffae1a46eb7e74daab08099b45af2c
git+git://github.com/haiku/BuildtoolsPM.git#2d0a2c6404ffae1a46eb7e74daab08099b45af2c git+git://github.com/haiku/BuildtoolsPM.git#2d0a2c6404ffae1a46eb7e74daab08099b45af2c
" "
REVISION="3" REVISION="4"
ARCHITECTURES="x86 x86_64" ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building # x86_gcc2 is fine as primary target architecture as long as we're building
@@ -119,6 +119,21 @@ INSTALL()
done done
strip --strip-debug lib/*.a strip --strip-debug lib/*.a
### Disable ASLR ##########################################
echo "Add SYS:ENV attribute to disable ASLR"
cd $installDir
for f in bin/*; do
if [ -r "$f" ]; then
addattr SYS:ENV DISABLE_ASLR=1 $f
fi
done
for f in cc1 cc1plus collect2 lto1; do
addattr SYS:ENV DISABLE_ASLR=1 \
lib/gcc/$effectiveTargetMachineTriple/*/$f
done
### Symlinks ############################################## ### Symlinks ##############################################
echo "Creating required symlinks" echo "Creating required symlinks"