aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc
diff options
context:
space:
mode:
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() {