This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcc/61097] New: Solaris linker change broke --disabled-shared support


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61097

            Bug ID: 61097
           Summary: Solaris linker change broke --disabled-shared support
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gnugcc at marino dot st

Regarding the patch "[build, libgcc] Ensure libgcc_s unwinder is always used on
64-bit Solaris 10+/x86 (PR target/59788)"
http://gcc.gnu.org/ml/gcc-patches/2014-01/msg01088.html

This change seems to have broken the --disabled-shared support for the native
solaris linker.

I am seeing this error on GCC 4.9.0 with that option set.
> gmake[5]: Entering directory
> /mech/pkgsrc-work/lang/gcc-aux/work/build/x86_64-aux-solaris2.11/32/libgcc'
> # If this is the top-level multilib, build all the other gmake[5]: *** No
> rule to make target 'libgcc-std.ver', needed by 'libgcc-unwind.map'.
> Stop.

It is caused by libgcc/config/t-slibgcc-sld excerpt:

> # Linker mapfile to enforce direct binding to libgcc_s unwinder
> # (PR target/59788).
> libgcc-unwind.map: libgcc-std.ver
>         @(echo "{";                             \
>         for f in `grep _Unwind_ $< | sort`; do  \
>           echo "        $$f = EXTERN DIRECT;";  \
>         done;                                   \
>         echo "};" ) > $@


But the libcgcc-std.ver target is only exposed on the condition that shared
library building is enabled per libgcc/Makefile.in:

> ifeq ($(enable_shared),yes)
>
> # Map-file generation.
> ifneq ($(SHLIB_MKMAP),)
> libgcc.map: $(SHLIB_MKMAP) $(SHLIB_MAPFILES) $(libgcc-s-objects)
>         { $(NM) $(SHLIB_NM_FLAGS) $(libgcc-s-objects); echo %%; \
>           cat $(SHLIB_MAPFILES) \
>             | sed -e '/^[       ]*#/d' \
>                   -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' \
>             | $(gcc_compile_bare) -E -xassembler-with-cpp -; \
>         } | $(AWK) -f $(SHLIB_MKMAP) $(SHLIB_MKMAP_OPTS) > tmp-$@
>         mv tmp-$@ $@
> libgcc_s$(SHLIB_EXT): libgcc.map
> mapfile = libgcc.map
> endif
>
> libgcc-std.ver: $(srcdir)/libgcc-std.ver.in
>         sed -e 's/__PFX__/$(LIBGCC_VER_GNU_PREFIX)/g' \
>             -e 's/__FIXPTPFX__/$(LIBGCC_VER_FIXEDPOINT_GNU_PREFIX)/g' < $< > $@


I found that moving the libgcc-std.ver target above the "ifeq
($(enable_shared),yes)" line to expose it unconditionally allowed the build to
continue.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]