From 971aaaa9b0734a134141d47b3449f7ba370ffe8d Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Mon, 14 Feb 2022 20:02:34 +0100 Subject: [PATCH] disable PIE backports from 11.2.1-9.3/-9.4 partially for Ada/GNAT --- gcc-epel.spec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gcc-epel.spec b/gcc-epel.spec index a852b3b..c36779f 100644 --- a/gcc-epel.spec +++ b/gcc-epel.spec @@ -1037,7 +1037,11 @@ cd nvptx-tools-%{nvptx_tools_gitrev} rm -rf obj-%{gcc_target_platform} mkdir obj-%{gcc_target_platform} cd obj-%{gcc_target_platform} +%if 0 CC="$CC" CXX="$CXX" CFLAGS="%{optflags} -fPIE" CXXFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,now" \ +%else +CC="$CC" CXX="$CXX" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" \ +%endif ../configure --prefix=%{_prefix} make %{?_smp_mflags} make install prefix=${IROOT}%{_prefix} @@ -1059,7 +1063,11 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \ --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ --with-bugurl=http://bugzilla.redhat.com/bugzilla \ --enable-checking=release --with-system-zlib \ +%if 0 --with-gcc-major-version-only --without-isl --enable-host-pie --enable-host-bind-now +%else + --with-gcc-major-version-only --without-isl +%endif make %{?_smp_mflags} cd .. rm -f newlib @@ -1260,7 +1268,11 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \ CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g' \ | sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \ XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ +%if 0 ../configure --enable-bootstrap --enable-host-pie --enable-host-bind-now \ +%else + ../configure --enable-bootstrap \ +%endif --enable-languages=c,c++,fortran${enablelobjc}${enablelada}${enablelgo}${enableld},lto \ $CONFIGURE_OPTS @@ -1281,7 +1293,11 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \ CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g' \ | sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \ XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ +%if 0 ../../configure --disable-bootstrap --enable-host-shared --enable-host-bind-now \ +%else + ../../configure --disable-bootstrap --enable-host-shared \ +%endif --enable-languages=jit $CONFIGURE_OPTS make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" all-gcc cp -a gcc/libgccjit.so* ../gcc/ @@ -3450,6 +3466,7 @@ end %changelog * Mon Feb 14 2022 Robert Scheck 11.2.1-10 +- disable PIE backports from 11.2.1-9.3/-9.4 partially for Ada/GNAT - backport from 11.2.1-9.4: add --enable-host-bind-now, use it (#2044917) - backport from 11.2.1-9.3: add --enable-host-pie, build the compilers as PIE (#2044917) - backport from 11.2.1-9.3: use _thread_db_sizeof_pthread to obtain struct pthread size (#2034494)