From 3a6cd8da00365a6db5107b4d9eb43d4220141ad2 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 9 Apr 2009 12:21:36 +0200 Subject: [PATCH] Generate linker map files for shared libraries 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/linux.omk b/snippets/linux.omk index 9cf8f5c..63ac7a1 100644 --- a/snippets/linux.omk +++ b/snippets/linux.omk @@ -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 -- 2.39.2