]> rtime.felk.cvut.cz Git - omk/sssa.git/commitdiff
Generate linker map files for shared libraries
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 9 Apr 2009 10:21:36 +0000 (12:21 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 9 Apr 2009 10:21:36 +0000 (12:21 +0200)
Since linking of shared libraries is invoked from top-level directory,
all the map files are located in _build/user/ directory.

Formerly map files was generated only for programs.

snippets/linux.omk

index 9cf8f5c6206507d4b3aadaa28167210dcc4a596c..63ac7a159f439a3966ab36dbc90976d75fcf6a26 100644 (file)
@@ -387,7 +387,7 @@ $(1)_shared_libs = $$(patsubst %,$(USER_LIB_DIR)/lib%.$(SOLIB_EXT),$$(filter $$(
 #$$(warning $(1)_shared_libs = $$($(1)_shared_libs))
 $(USER_LIB_DIR)/lib$(1).$(SOLIB_EXT): $$($(1)_shared_libs) $$($(1)_objslo)
        @$(QUIET_CMD_ECHO) "  LINK    $$@"
-       $(Q)$(CC) --shared -Xlinker -soname=lib$(1).$(SOLIB_EXT) -o $$@ $$($(1)_objslo) $$(LOADLIBES) $$($(1)_libs:%=-l%)
+       $(Q)$(CC) --shared -Xlinker -soname=lib$(1).$(SOLIB_EXT) -Wl,-Map,$(USER_OBJS_DIR)/$(1).lib.map -o $$@ $$($(1)_objslo) $$(LOADLIBES) $$($(1)_libs:%=-l%)
 endef
 
 -include $(shell true; find $(USER_BUILD_DIR) -name 'lib*.omkvar') # `true' is a hack for MinGW