aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-10-21 14:55:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-10-21 14:55:05 +0000
commitc4c9ea7ad24a0cfac6f456f2396fa810abf89e82 (patch)
tree83dc8949c12a5a19038661a0108ca0fc9189d603 /main/gcc
parentcfc1f7b97e22e3aa72471cfa9e2427e523946501 (diff)
downloadaports-c4c9ea7ad24a0cfac6f456f2396fa810abf89e82.tar.bz2
aports-c4c9ea7ad24a0cfac6f456f2396fa810abf89e82.tar.xz
main/gcc: disable PIE for gcc
we hit some kind of bug in gcc when building gcc if PIE is enabled. Lets disable it for now.
Diffstat (limited to 'main/gcc')
-rw-r--r--main/gcc/APKBUILD14
1 files changed, 7 insertions, 7 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index b1260d5163..06e175175d 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -15,7 +15,7 @@ else
_with_arch="i486"
fi
-pkgrel=6
+pkgrel=7
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
license="GPL LGPL"
@@ -65,15 +65,15 @@ prepare() {
sed -i 's/use_fixproto=yes/:/' gcc/config.gcc || return 1
# enable hardened cflags by default
+ # building gcc wih PIE seem to hit some strange bug. we probably run
+ # out of some resource. so we disable PIE for gcc while enabling it
+ # by default for everything else.
local _hard_cflags="-DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW"
sed -e "/^ALL_CFLAGS/iHARD_CFLAGS = ${_hard_cflags}" \
- -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \
+ -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) -fno-PIE |' \
-i gcc/Makefile.in || return 1
- # in stage3 building insn-attrtab.o seems to run out of some kind
- # of resource. This doesnt happen in earlier stages due to PIE is
- # not enabled. It seems to also help to disable debug so we do so.
- sed -e '/^BOOT_CFLAGS/s/-g//' \
- -i Makefile.in || return 1
+ sed -e "/stage1_cflags=/s/-fno-stack-protector/-fno-stack-protector -fno-PIE/" \
+ -i configure
}
build() {