%define build_java 0
%define build_libjava 0
-%define build_cp 1
-%define build_fortran 0
+# Also go and objc aren't needed right now
%define build_objc 0
%define build_objcp 0
%define build_go 0
+%define build_cp 1
+%define build_fortran !0%{?building_libjava:1}%{?building_libffi:1}
+
%if %{build_objcp}
%define build_cp 1
%define build_objc 1
%ifarch %vtv_arch
Requires: libvtv%{libvtv_sover} >= %{version}-%{release}
%endif
-Suggests: gcc49-info gcc49-locale
+Requires: gcc49-info gcc49-locale
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.bz2
Source1: change_spec
-Source2: gcc49-rpmlintrc
-Source3: ecj.jar
-Source4: baselibs.conf
+Source2: libffi49-rpmlintrc
+Source3: gcc49-rpmlintrc
+Source4: ecj.jar
+Source5: baselibs.conf
+Source6: libgcj49-rpmlintrc
Group: Development/Building
Summary: The GNU C Compiler and Support Files
Summary: The standard C++ shared library
License: GPL-3.0-with-GCC-exception
Group: Development/Building
-Suggests: libstdc++%{libstdcxx_sover}-locale
+Requires: libstdc++%{libstdcxx_sover}-locale
Provides: libstdc++%{libstdcxx_sover} = %{version}-%{release}
%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}
Summary: The standard C++ shared library
License: GPL-3.0-with-GCC-exception
Group: Development/Building
-Suggests: libstdc++%{libstdcxx_sover}-locale
+Requires: libstdc++%{libstdcxx_sover}-locale
Provides: libstdc++%{libstdcxx_sover}-32bit = %{version}-%{release}
%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit
Summary: The standard C++ shared library
License: GPL-3.0-with-GCC-exception
Group: Development/Building
-Suggests: libstdc++%{libstdcxx_sover}-locale
+Requires: libstdc++%{libstdcxx_sover}-locale
Provides: libstdc++%{libstdcxx_sover}-64bit = %{version}-%{release}
%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-64bit
Summary: Java Runtime Library for gcc
License: GPL-2.0-with-classpath-exception
Group: Development/Building
-Recommends: libgcj49-jar = %{version}-%{release}
+Requires: libgcj49-jar = %{version}-%{release}
Provides: libgcj%{libgcj_sover} = %{version}-%{release}
Provides: libgij%{libgcj_sover} = %{version}-%{release}
Provides: libgcj-tools%{libgcj_sover} = %{version}-%{release}
%package go
Summary: GNU Go Compiler
-License: GPL-3.0+
+License: GPL-3.0+
Group: Development/Languages
Requires: gcc49 = %{version}-%{release}
Requires: libgo%{libgo_sover} >= %{version}-%{release}
files based on the GNU GCC technology.
%package go-32bit
Summary: GNU Go Compiler
-License: GPL-3.0+
+License: GPL-3.0+
Group: Development/Languages
Requires: gcc49-32bit = %{version}-%{release}
Requires: libgo%{libgo_sover}-32bit >= %{version}-%{release}
files based on the GNU GCC technology.
%package go-64bit
Summary: GNU Go Compiler
-License: GPL-3.0+
+License: GPL-3.0+
Group: Development/Languages
Requires: gcc49-64bit = %{version}-%{release}
Requires: libgo%{libgo_sover}-64bit >= %{version}-%{release}
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' -e 's/-fexceptions//'`
+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' -e 's/-fexceptions//' -e 's/\([[:space:]]\+.*-D_FORTIFY_SOURCE=\)[[:alnum:]]\+/\10/g'
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
GCJ_EXTRA_FLAGS="-marm"
%endif
-export RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS | sed -e "s/ -Wp,-D_FORTIFY_SOURCE=2 / /g"`"
-
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
+ --disable-bootstrap \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
-%if "%{TARGET_ARCH}" == "armv7l"
+%if "%{TARGET_ARCH}" == "armv7l"
--with-arch=armv7-a \
--with-tune=cortex-a8 \
--with-float=softfp \
%else
STAGE1_FLAGS="-g"
# Only run profiled bootstrap on archs where it works and matters
-%ifarch x86_64 ppc64le s390x
+%ifarch ppc64le s390x
make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
%else
make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
echo "Urgs?"
exit 1
fi
-
+
cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF
#ifndef _CPP_CPPCONFIG_WRAPPER
#define _CPP_CPPCONFIG_WRAPPER 1
mv $l.new $l
done
-%if 0%{?run_tests:1}
+%if 0%{?run_tests:1}
cp `find . -name "*.sum"` ../testresults/
cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
chmod 644 ../testresults/*
%ifarch %itm_arch
mv $RPM_BUILD_ROOT%{_infodir}/libitm.info $RPM_BUILD_ROOT%{_infodir}/libitm%{binsuffix}.info
%endif
-%if %{build_fortran}
+%if %{build_fortran}
%ifarch %quadmath_arch
mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
%endif
%endif
%endif
+%ifnarch %quadmath_arch
+rm -vf $RPM_BUILD_ROOT%{_infodir}/libquadmath*.info*
+%endif
+
cd ..
%find_lang cpplib%{binsuffix}
%find_lang gcc%{binsuffix}
%install_info --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
-%if %{build_fortran}
+%if %{build_fortran}
%install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
%ifarch %quadmath_arch
%install_info --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz