Uros pointed me at PR libgcc/59339 where make install tries to install
the vtv_*.o files even if they aren't built, leading to install
warnings.

The following patch fixes this by ensuring that the files are only
installed if built.

Tested with make install in libgcc on x86-64-unknown-linux-gnu
--enable-vtable-verify (files are installed) and i686-unknown-linux-gnu
(no installation attempted).

Ok for mainline?

        Rainer


2014-03-06  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        PR libgcc/59339
        * config.host (*-*-linux*, frv-*-*linux*, *-*-kfreebsd*-gnu)
        (*-*-knetbsd*-gnu, *-*-gnu*, *-*-kopensolaris*-gnu): Only add
        vtv_*.o to extra_parts if enable_vtable_verify.

# HG changeset patch
# Parent 4abfa544576aa354871a00d4ce08585ae72e8bce
 Don't install vtv_*.o unless --enable-vtable-verify (PR libgcc/59339)

diff --git a/libgcc/config.host b/libgcc/config.host
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -228,7 +228,10 @@ case ${host} in
   ;;
 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
-  extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
+  extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
+  if test x$enable_vtable_verify = xyes; then
+    extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
+  fi
   ;;
 *-*-lynxos*)
   tmake_file="$tmake_file t-lynx $cpu_type/t-crtstuff t-crtstuff-pic t-libgcc-pic"
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to