Skip to contentSkip to conversation

toolchain-external: clarify the comment about *-gcc-ar... LTO wrappers

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 2 messages Sep 11, 2015 – Sep 13, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain-external: clarify the comment about *-gcc-ar... LTO wrappers

---
 toolchain/toolchain-external/toolchain-external.mk | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
toolchain/toolchain-external/toolchain-external.mk +6 -5
index 4b4b463..967e9ec 100644
@@ -666,11 +666,12 @@ endif
 # Build toolchain wrapper for preprocessor, C and C++ compiler and setup
 # symlinks for everything else. Skip gdb symlink when we are building our
 # own gdb to prevent two gdb's in output/host/usr/bin.
-# When the link-time-optimization flag '-flto' is used, then the compiler
-# and binutils have to support lto. ar/ranlib need to be called with the
-# lto plugin. The wrappers *-gcc-ar and *-gcc-ranlib provided by GCC could
-# be used as drop-ins for ar/runlib when Makefiles are used which do not
-# pass the lto arguments.
+# The LTO support in gcc creates wrappers for ar, ranlib and nm which load
+# the lto plugin. These wrappers are called *-gcc-ar, *-gcc-ranlib, and
+# *-gcc-nm and should be used instead of the real programs when -flto is
+# used. However, we should not add the toolchain wrapper for them, and they
+# match the *cc-* pattern. Therefore, an additional case is added for *-ar,
+# *-ranlib and *-nm.
 define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
 	$(Q)$(call MESSAGE,"Building ext-toolchain wrapper")
 	$(Q)mkdir -p $(HOST_DIR)/usr/bin
Signature · 1 line
2.5.1
#1 lore raw

PATCH 1/1 toolchain-external: clarify the comment about *-gcc-ar... LTO wrappers

Dear Arnout Vandecappelle (Essensium/Mind),

Quoted 4 lines · Arnout Vandecappelle (Essensium/Mind)
---
 toolchain/toolchain-external/toolchain-external.mk | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com