diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template index 2add994538e..cd522a9c235 100644 --- a/srcpkgs/gcc/template +++ b/srcpkgs/gcc/template @@ -3,7 +3,7 @@ _majorver=7.2 pkgname=gcc version=${_majorver}.0 -revision=3 +revision=4 short_desc="The GNU C Compiler" maintainer="Juan RP " homepage="http://gcc.gnu.org" @@ -80,21 +80,6 @@ replaces="gcc-c++>=0" pre_configure() { # _FORTIFY_SOURCE needs an optimization level. sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure - - if [ -n "$nopie" ]; then - # Fix configure failures by adding -no-pie when linking conftest.c/.cpp files - find -name configure -exec sed -i {} \ - -e 's;$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS;& -no-pie;' \ - -e 's;$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS;& -no-pie;' \ - \; - # Fix linking error for fixincl by adding -no-pie - sed -i fixincludes/Makefile.in \ - -e 's;-o $(FI);-no-pie &;' \ - -e 's;-o $@;-no-pie &;' - # Fix linking error for gotools by adding -no-pie - sed -i gotools/Makefile.in \ - -e 's;LINK = .*;& -no-pie;' - fi } do_configure() { local _langs _args _hash @@ -167,6 +152,10 @@ do_configure() { export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}" export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}" + # Disable explicit -fno-PIE, gcc will figure this out itself. + export CFLAGS="${CFLAGS//-fno-PIE/}" + export CXXFLAGS="${CXXFLAGS//-fno-PIE/}" + _args+=" --prefix=/usr" _args+=" --mandir=/usr/share/man" _args+=" --infodir=/usr/share/info"