Changeset 2541 for trunk/kBuild/tools/GCC32.kmk
- Timestamp:
- Aug 3, 2011, 11:51:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/GCC32.kmk
r2431 r2541 59 59 TOOL_GCC32_LD_SYSMOD_MAP ?= 60 60 endif 61 if1of ($(KBUILD_HOST), solaris) 62 TOOL_GCC32_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE) 63 else 64 TOOL_GCC32_OBJCOPY ?= objcopy$(HOSTSUFF_EXE) 65 endif 66 61 67 ifdef SLKRUNS 62 TOOL_GCC32_CC += -fmessage-length=063 TOOL_GCC32_CXX += -fmessage-length=068 TOOL_GCC32_CC += -fmessage-length=0 69 TOOL_GCC32_CXX += -fmessage-length=0 64 70 endif 65 71 … … 227 233 $(QUIET)$(APPEND) -n $(out).ar-script \ 228 234 $(foreach o,$(objs), 'ADDMOD $(o)') \ 229 $(foreach o,$(othersrc), 'ADDLIB $(o)') 235 $(foreach o,$(filter-out %.def %.imp,$(othersrc)), 'ADDLIB $(o)') 236 $(if $(filter %.def %.imp,$(othersrc))\ 237 ,$(TOOL_GCC32_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp,$(othersrc))\ 238 $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a') 230 239 $(QUIET)$(APPEND) $(out).ar-script 'SAVE' 231 240 $(QUIET)$(APPEND) $(out).ar-script 'END' … … 249 258 TOOL_GCC32_LINK_PROGRAM_OUTPUT = 250 259 TOOL_GCC32_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map 251 TOOL_GCC32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 260 TOOL_GCC32_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug 261 TOOL_GCC32_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug 262 TOOL_GCC32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\ 263 $(filter %.def, $(othersrc)) 252 264 TOOL_GCC32_LINK_PROGRAM_DEPORD = 253 265 define TOOL_GCC32_LINK_PROGRAM_CMDS … … 256 268 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\ 257 269 $(call TOOL_GCC32_LD_MAP,$(outbase).map) 270 ifeq ($(ld_debug),split) 271 $(TOOL_GCC32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug 272 $(CHMOD) a-x $(outbase).debug 273 $(TOOL_GCC32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out) 274 endif 258 275 endef 259 276 … … 274 291 TOOL_GCC32_LINK_DLL_OUTPUT = 275 292 TOOL_GCC32_LINK_DLL_OUTPUT_MAYBE = $(outbase).map 276 TOOL_GCC32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 293 TOOL_GCC32_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug 294 TOOL_GCC32_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug 295 TOOL_GCC32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\ 296 $(filter %.def, $(othersrc)) 277 297 TOOL_GCC32_LINK_DLL_DEPORD = 278 298 define TOOL_GCC32_LINK_DLL_CMDS … … 283 303 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\ 284 304 $(call TOOL_GCC32_LD_MAP,$(outbase).map) 305 ifeq ($(ld_debug),split) 306 $(TOOL_GCC32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug 307 $(CHMOD) a-x $(outbase).debug 308 $(TOOL_GCC32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out) 309 endif 285 310 endef 286 311 … … 301 326 TOOL_GCC32_LINK_SYSMOD_OUTPUT = 302 327 TOOL_GCC32_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map 303 TOOL_GCC32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 328 TOOL_GCC32_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug 329 TOOL_GCC32_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug 330 TOOL_GCC32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\ 331 $(filter %.def, $(othersrc)) 304 332 TOOL_GCC32_LINK_SYSMOD_DEPORD = 305 333 define TOOL_GCC32_LINK_SYSMOD_CMDS 306 334 $(QUIET)$(TOOL_GCC32_LD_SYSMOD) $(TOOL_GCC32_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\ 335 $(filter %.def, $(othersrc))\ 307 336 $(foreach p,$(libpath), -L$(p))\ 308 337 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\ 309 338 $(call TOOL_GCC32_LD_SYSMOD_MAP,$(outbase).map) 310 endef 311 339 ifeq ($(ld_debug),split) 340 $(TOOL_GCC32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug 341 $(CHMOD) a-x $(outbase).debug 342 $(TOOL_GCC32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out) 343 endif 344 endef 345
Note:
See TracChangeset
for help on using the changeset viewer.