gcc6: update template to workaround file-prefix-map and removed libssp package

This commit is contained in:
John 2023-04-03 00:41:41 +02:00 committed by John Zimmermann
parent 27fe27e96e
commit 4d29310104
3 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- a/gcc/config/i386/i386.c 2023-04-03 00:23:52.367607124 +0200
+++ - 2023-04-03 00:30:12.723657534 +0200
@@ -8747,7 +8747,7 @@
HOST_WIDE_INT words)
{
int res = 0;
- bool error_p = NULL;
+ bool error_p = false;
if (TARGET_IAMCU)
{

View file

@ -70,6 +70,9 @@ post_extract() {
pre_configure() {
# _FORTIFY_SOURCE needs an optimization level.
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
if [ "$XBPS_TARGET_LIBC" = musl ]; then
patch -p1 -i ${FILESDIR}/303-gcc-6.1-musl-libssp.patch
fi
# old isl normally tries to call aclocal-1.14 to reconfigure itself
pushd ${wrksrc}/isl
@ -108,6 +111,10 @@ do_configure() {
export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
# file-prefix-map isn't supported in gcc6
export CFLAGS="${CFLAGS/-ffile-prefix-map=$wrksrc=./}"
export CXXFLAGS="${CXXFLAGS/-ffile-prefix-map=$wrksrc=./}"
# Disable explicit -fno-PIE, gcc will figure this out itself.
export CFLAGS="${CFLAGS//-fno-PIE/}"
export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"