Accepting request 1102050 from home:Andreas_Schwab:Factory

- gdcflags.patch: Use substituted GDCFLAGS
- Filter out -Werror=return-type from D compile flags

OBS-URL: https://build.opensuse.org/request/show/1102050
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc13?expand=0&rev=57
This commit is contained in:
Richard Biener 2023-08-03 13:34:13 +00:00 committed by Git OBS Bridge
parent 1708680044
commit 8705d0f16a
35 changed files with 1284 additions and 528 deletions

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -134,6 +134,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -338,6 +339,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -360,26 +362,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -461,9 +479,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -134,6 +134,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -338,6 +339,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -360,26 +362,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -461,9 +479,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -134,6 +134,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -338,6 +339,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -360,26 +362,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -461,9 +479,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -134,6 +134,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -338,6 +339,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -360,26 +362,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -461,9 +479,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -134,6 +134,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -338,6 +339,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -360,26 +362,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -461,9 +479,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -133,6 +133,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -337,6 +338,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -359,26 +361,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -460,9 +478,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -385,6 +385,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -1348,6 +1349,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -1370,26 +1372,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -1471,9 +1489,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -401,6 +401,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -539,6 +540,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -561,26 +563,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -662,9 +680,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Aug 2 08:01:18 UTC 2023 - Andreas Schwab <schwab@suse.de>
- gdcflags.patch: Use substituted GDCFLAGS
- Filter out -Werror=return-type from D compile flags
-------------------------------------------------------------------
Thu Jul 20 09:04:51 UTC 2023 - Richard Biener <rguenther@suse.com>

View File

@ -380,6 +380,7 @@ Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch
Patch18: gcc10-amdgcn-llvm-as.patch
Patch19: gcc11-gdwarf-4-default.patch
Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch
Patch21: gdcflags.patch
# A set of patches from the RH srpm
Patch51: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
@ -2356,6 +2357,7 @@ ln -s newlib-4.3.0.20230120/newlib .
%if %{suse_version} < 1550
%patch19 -p1
%endif
%patch21 -p1
%patch51
%patch60 -p1
%patch61 -p1
@ -2378,26 +2380,42 @@ echo "This is a dummy package to provide a dependency." > README
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector[^ ]*//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
# Filter out unwanted flags from $RPM_OPT_FLAGS
optflags=
optflags_d=
for flag in $RPM_OPT_FLAGS; do
add_flag=
case $flag in
-U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;;
-fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;;
-ffortify=*|-Wall|-m32|-m64) ;;
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
# -mcpu is superseded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseded by proper
# default compiler settings now.
-mcpu=i?86|-march=i?86|-mtune=i?86) ;;
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
-fsigned-char) ;;
-O1) add_flag=-O2 ;;
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
# Kill all -march/tune/cpu because that screws building the target libs
-march=*|-mtune=*|-mcpu=*) ;;
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
*) add_flag=$flag ;;
esac
if test -n "$add_flag"; then
optflags+=" $add_flag"
case $add_flag in
# Filter out -Werror=return-type for D (only valid for C and C++)
-Werror=return-type) ;;
*) optflags_d+=" $add_flag" ;;
esac
fi
done
languages=c
%if %{build_cp}
@ -2479,9 +2497,12 @@ export GDC=gdc-11
CONFARGS="$CONFARGS --disable-libsanitizer"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" \
../configure \
CFLAGS="$optflags" \
CXXFLAGS="$optflags" \
XCFLAGS="$optflags" \
TCFLAGS="$optflags" \
GDCFLAGS="$optflags_d" \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \

57
gdcflags.patch Normal file
View File

@ -0,0 +1,57 @@
From 1ed21e23d6d4da8201a09558b71d9a34281e54dd Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Sun, 16 Jul 2023 19:43:56 +0200
Subject: [PATCH] Use substituted GDCFLAGS
Use the substituted value for GCDFLAGS instead of hardcoding $(CFLAGS) so
that the subdir configure scripts use the configured value.
* configure.ac (GDCFLAGS): Set default from ${CFLAGS}.
* configure: Regenerate.
* Makefile.in (GDCFLAGS): Substitute @GDCFLAGS@.
---
Makefile.in | 2 +-
configure | 1 +
configure.ac | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 04307ca561b..144bccd2603 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -444,7 +444,7 @@ LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
GOCFLAGS = $(CFLAGS)
-GDCFLAGS = $(CFLAGS)
+GDCFLAGS = @GDCFLAGS@
GM2FLAGS = $(CFLAGS)
# Pass additional PGO and LTO compiler options to the PGO build.
diff --git a/configure b/configure
index 0d3f5c6455d..3269da9829f 100755
--- a/configure
+++ b/configure
@@ -12947,6 +12947,7 @@ fi
+GDCFLAGS=${GDCFLAGS-${CFLAGS}}
# Target tools.
diff --git a/configure.ac b/configure.ac
index dddab2a56d8..d07a0fa7698 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3662,6 +3662,7 @@ AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(GDC)
AC_SUBST(GDCFLAGS)
+GDCFLAGS=${GDCFLAGS-${CFLAGS}}
# Target tools.
AC_ARG_WITH([build-time-tools],
--
2.41.0