binutils,gcc: Add support to control LTO and Gold.

This commit is contained in:
Chris Johns 2016-09-12 12:31:33 +10:00
parent 7cdf319148
commit 534332f22a
2 changed files with 20 additions and 1 deletions

View File

@ -26,6 +26,16 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
# #
%define allow_cxc %define allow_cxc
#
# Default gold and LTO to disable.
#
%ifn %{defined with_gold}
%define with_gold 0
%endif
%ifn %{defined with_lto}
%define with_lto 0
%endif
# #
# Source # Source
# #
@ -60,6 +70,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
--target=%{_target} \ --target=%{_target} \
--verbose --disable-nls \ --verbose --disable-nls \
%{?with_deterministic_archives:--enable-deterministic-archives} \ %{?with_deterministic_archives:--enable-deterministic-archives} \
%{?with_gold:--enable-gold=yes} \
%{?with_lto:--enable-lto --enable-plugins}%{!?with_lto:--disable-lto} \
--without-included-gettext \ --without-included-gettext \
--disable-win32-registry \ --disable-win32-registry \
--disable-werror \ --disable-werror \

View File

@ -31,6 +31,13 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
# #
%global _gcclibdir %{_prefix}/lib %global _gcclibdir %{_prefix}/lib
#
# Default LTO to off.
#
%ifn %{defined with_lto}
%define with_lto 0
%endif
# #
# Prepare the source code. # Prepare the source code.
# #
@ -149,7 +156,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
--disable-nls --without-included-gettext \ --disable-nls --without-included-gettext \
--disable-win32-registry \ --disable-win32-registry \
--enable-version-specific-runtime-libs \ --enable-version-specific-runtime-libs \
--disable-lto \ %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
--enable-newlib-io-c99-formats \ --enable-newlib-io-c99-formats \
%{?with_iconv:--enable-newlib-iconv} \ %{?with_iconv:--enable-newlib-iconv} \
%{?with_iconv:--enable-newlib-iconv-encodings=%{_newlib_iconv_encodings}} \ %{?with_iconv:--enable-newlib-iconv-encodings=%{_newlib_iconv_encodings}} \