summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2022-06-15 20:46:36 +1000
committerChris Johns <chrisj@rtems.org>2022-06-16 12:45:38 +1000
commit1a24c6cfdb38687bc9633b5b7a1de2e65e284d00 (patch)
treef222a73ca6ea1ddc57b351424056ad30f83b862d
parentsource-builder/sb/options.py: Change arc to arch in help (diff)
downloadrtems-source-builder-1a24c6cfdb38687bc9633b5b7a1de2e65e284d00.tar.bz2
tools/gnu: Enable LTO in RSB tools
The change enables the building of LTO into RTEMS tools. Compiler options are required to enable use in an application.
-rw-r--r--source-builder/config/binutils-2-1.cfg6
-rw-r--r--source-builder/config/gcc-common-1.cfg10
2 files changed, 4 insertions, 12 deletions
diff --git a/source-builder/config/binutils-2-1.cfg b/source-builder/config/binutils-2-1.cfg
index a49fa2a..6de33ae 100644
--- a/source-builder/config/binutils-2-1.cfg
+++ b/source-builder/config/binutils-2-1.cfg
@@ -26,14 +26,11 @@ URL: http://sources.redhat.com/binutils
%define allow_cxc
#
-# Default gold and LTO to disable.
+# Default gold to disable.
#
%ifn %{defined with_gold}
%define with_gold 0
%endif
-%ifn %{defined with_lto}
- %define with_lto 0
-%endif
#
# Source
@@ -72,7 +69,6 @@ URL: http://sources.redhat.com/binutils
%{?with_deterministic_archives:--enable-deterministic-archives} \
%{?with_64_bit_bfd:--enable-64-bit-bfd} \
%{?with_gold:--enable-gold=yes} \
- %{?with_lto:--enable-lto --enable-plugins}%{!?with_lto:--disable-lto} \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg
index 05e0e3c..694a1f3 100644
--- a/source-builder/config/gcc-common-1.cfg
+++ b/source-builder/config/gcc-common-1.cfg
@@ -34,7 +34,7 @@ URL: http://gcc.gnu.org/
# Default LTO to off.
#
%ifn %{defined with_lto}
- %define with_lto 0
+ %define enable_lto 1
%endif
#
@@ -165,11 +165,8 @@ URL: http://gcc.gnu.org/
%if %{enable_fortran}
languages="$languages,fortran"
%endif
-%if %{enable_java}
- languages="$languages,java"
-%endif
-%if %{enable_objc}
- languages="$languages,objc"
+%if %{enable_lto}
+ languages="$languages,lto"
%endif
%{host_build_flags}
@@ -193,7 +190,6 @@ URL: http://gcc.gnu.org/
--disable-win32-registry \
--disable-werror \
--enable-version-specific-runtime-libs \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
--enable-newlib-io-c99-formats \
%{?disable_MAKEINFO:MAKEINFO=missing} \
%{?with_iconv:--enable-newlib-iconv} \