When installing gcc 6.1.0 on Solaris 12, installation failed in libvtv:

libtool: install: /usr/gnu/bin/install -c .libs/libvtv.lai 
/var/gcc/gcc-6.1.0/12-gcc-gas/install/vol/gcc-6/lib/amd64/libvtv.la
libtool: install: /usr/gnu/bin/install -c .libs/libvtv.a 
/var/gcc/gcc-6.1.0/12-gcc-gas/install/vol/gcc-6/lib/amd64/libvtv.a
/usr/gnu/bin/install: cannot stat '.libs/libvtv.a': No such file or directory
make[10]: *** [install-toolexeclibLTLIBRARIES] Error 1
make[10]: Leaving directory 
`/var/gcc/gcc-6.1.0/12-gcc-gas/i386-pc-solaris2.12/amd64/libvtv'

The problem is that libvtv.a is created like this

libtool: link: ar rc .libs/libvtv.a 
libtool: link: ranlib .libs/libvtv.a

i.e. with no objects, when --enable-vtable-verify isn't specified, and
Solaris ar does nothing in this case, unlike GNU ar which creates an
archive containing only the 8-byte archive header.

Given that in this situation libvtv is useless anyway (the vtv_*.o files
in libgcc aren't built either), I've chosen to avoid the installation
completely.

Tested on i386-pc-solaris2.11 without and with --enable-vtable-verify.

Ok for mainline and gcc-6 branch?

Thanks.
        Rainer


2016-04-29  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * Makefile.am (toolexeclib_LTLIBRARIES): Only set if
        ENABLE_VTABLE_VERIFY.
        Simplify.
        * Makefile.in: Regenerate.

# HG changeset patch
# Parent  47d2bbf59155ec37a1fa565f8774657b7045ef41
Don't install libvtv without --enable-vtable-verify

diff --git a/libvtv/Makefile.am b/libvtv/Makefile.am
--- a/libvtv/Makefile.am
+++ b/libvtv/Makefile.am
@@ -38,10 +38,11 @@ AM_CXXFLAGS = $(XCFLAGS)
 AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
 AM_CXXFLAGS += -Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end
 
+if ENABLE_VTABLE_VERIFY
+  toolexeclib_LTLIBRARIES = libvtv.la
 if VTV_CYGMIN
-  toolexeclib_LTLIBRARIES = libvtv.la libvtv_stubs.la
-else
-  toolexeclib_LTLIBRARIES = libvtv.la
+  toolexeclib_LTLIBRARIES += libvtv_stubs.la
+endif
 endif
 
 vtv_headers = \
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to