summaryrefslogtreecommitdiffstats
path: root/source-builder/config/gcc-common-1.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'source-builder/config/gcc-common-1.cfg')
-rw-r--r--source-builder/config/gcc-common-1.cfg53
1 files changed, 42 insertions, 11 deletions
diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg
index 9154026..4e13efc 100644
--- a/source-builder/config/gcc-common-1.cfg
+++ b/source-builder/config/gcc-common-1.cfg
@@ -19,7 +19,6 @@ Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_targe
Version: %{gcc_version}
Release: %{release}
URL: http://gcc.gnu.org/
-BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Supports Candian Cross (Cxc).
@@ -32,6 +31,13 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%global _gcclibdir %{_prefix}/lib
#
+# Default LTO to off.
+#
+%ifn %{defined with_lto}
+ %define with_lto 0
+%endif
+
+#
# The GCC version depends on the type of build we are doing.
#
%if %{rsb_released}
@@ -41,6 +47,16 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%endif
#
+# Packages GCC requires
+#
+%if %{defined cloog_version}
+%source set cloog https://gcc.gnu.org/pub/gcc/infrastructure/cloog-%{cloog_version}.tar.gz
+%endif
+%if %{defined isl_version}
+%source set isl https://gcc.gnu.org/pub/gcc/infrastructure/isl-%{isl_version}.tar.bz2
+%endif
+
+#
# Prepare the source code.
#
%prep
@@ -59,8 +75,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
cd ${build_top}
# newlib
- source_dir_newlib="newlib-%{newlib_version}"
- %source setup newlib -q -D -n newlib-%{newlib_version}
+ source_dir_newlib=%{?newlib_external:%{newlib_expand_name}}%{!?newlib_external:"newlib-%{newlib_version}"}
+ %source setup newlib -q -D -n ${source_dir_newlib}
%patch setup newlib -p1
cd ${build_top}
@@ -68,6 +84,28 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%{__rmfile} ${source_dir_gcc}/newlib
%{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib
+%if %{defined cloog_version}
+ # CLooG
+ source_dir_cloog="cloog-%{cloog_version}"
+ %source setup cloog -q -D -n cloog-%{cloog_version}
+ %patch setup cloog -p1
+ cd ${build_top}
+ # Build MPFR one-tree style
+ %{__rmfile} ${source_dir_gcc}/cloog
+ %{__ln_s} $PWD/${source_dir_cloog} ${source_dir_gcc}/cloog
+%endif
+
+%if %{defined isl_version}
+ # ISL
+ source_dir_isl="isl-%{isl_version}"
+ %source setup isl -q -D -n isl-%{isl_version}
+ %patch setup isl -p1
+ cd ${build_top}
+ # Build MPFR one-tree style
+ %{__rmfile} ${source_dir_gcc}/isl
+ %{__ln_s} $PWD/${source_dir_isl} ${source_dir_gcc}/isl
+%endif
+
# MPFR
source_dir_mpfr="mpfr-%{mpfr_version}"
%source setup mpfr -q -D -n mpfr-%{mpfr_version}
@@ -131,12 +169,6 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
languages="$languages,objc"
%endif
-%if %{_host_os} == mingw32
- zlib_option=""
-%else
- zlib_option="--with-system-zlib"
-%endif
-
%{host_build_flags}
../${source_dir_gcc}/configure \
@@ -154,11 +186,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
--disable-libstdcxx-pch \
--with-gnu-as --with-gnu-ld --verbose \
--with-newlib \
- "$zlib_option" \
--disable-nls --without-included-gettext \
--disable-win32-registry \
--enable-version-specific-runtime-libs \
- --disable-lto \
+ %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
--enable-newlib-io-c99-formats \
%{?disable_MAKEINFO:MAKEINFO=missing} \
%{?with_iconv:--enable-newlib-iconv} \