[Bug other/39888] TLS emutls not linked to automatically on Darwin

howarth at nitro dot med dot uc dot edu gcc-bugzilla@gcc.gnu.org
Wed Sep 23 16:51:00 GMT 2009



------- Comment #15 from howarth at nitro dot med dot uc dot edu  2009-09-23 16:50 -------
Look at gcc/libgcc/config/t-slibgcc-darwin, in particular...

SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
        -install_name @shlib_slibdir@/$(SHLIB_INSTALL_NAME) \
        -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
        -Wl,-exported_symbols_list,$(SHLIB_MAP) \
        $(SHLIB_VERSTRING) \
        @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC)

what would be perfect is finding a way to add libgcc_ext.dylib to...

INSTALL_FILES=libgcc_s.10.4.dylib libgcc_s.10.5.dylib libgcc_s.1.dylib

in that file and have the SHLIB_LINK command special case the instance of
libgcc_ext to execute as...

SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
        -install_name @shlib_slibdir@/$(SHLIB_INSTALL_NAME) \
        -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
        -Wl,-unexported_symbols_list,$(SHLIB_MAP) \
        $(SHLIB_VERSTRING) \
        @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC)

with $(SHLIB_MAP) set to gcc/config/i386/darwin-libgcc.10.5.ver or
gcc/config/rs6000/darwin-libgcc.10.5.ver in that case. Potentially this
can make the patch very small and completely scalable (if we can find a way to
code it).


-- 


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



More information about the Gcc-bugs mailing list