Changeset 2541 for trunk/kBuild/tools/GXX32.kmk
- Timestamp:
- Aug 3, 2011, 11:51:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/GXX32.kmk
r2534 r2541 101 101 102 102 103 104 103 ## Compile C source. 105 104 # @param $(target) Normalized main target name. … … 233 232 $(QUIET)$(APPEND) -n $(out).ar-script \ 234 233 $(foreach o,$(objs), 'ADDMOD $(o)') \ 235 $(foreach o,$(othersrc), 'ADDLIB $(o)') 234 $(foreach o,$(filter-out %.def %.imp,$(othersrc)), 'ADDLIB $(o)') 235 $(if $(filter %.def %.imp,$(othersrc))\ 236 ,$(TOOL_GXX3_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp,$(othersrc))\ 237 $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a') 236 238 $(QUIET)$(APPEND) $(out).ar-script 'SAVE' 237 239 $(QUIET)$(APPEND) $(out).ar-script 'END' … … 257 259 TOOL_GXX32_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug 258 260 TOOL_GXX32_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug 259 TOOL_GXX32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 261 TOOL_GXX32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\ 262 $(filter %.def, $(othersrc)) 260 263 TOOL_GXX32_LINK_PROGRAM_DEPORD = 261 264 define TOOL_GXX32_LINK_PROGRAM_CMDS … … 267 270 $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug 268 271 $(CHMOD) a-x $(outbase).debug 269 $(TOOL_GXX32_OBJCOPY) --strip-debug $(out) 270 $(TOOL_GXX32_OBJCOPY) --add-gnu-debuglink=$(outbase).debug $(out) 272 $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out) 271 273 endif 272 274 endef … … 288 290 TOOL_GXX32_LINK_DLL_OUTPUT = 289 291 TOOL_GXX32_LINK_DLL_OUTPUT_MAYBE = $(outbase).map 290 TOOL_GXX32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 292 TOOL_GXX32_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug 293 TOOL_GXX32_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug 294 TOOL_GXX32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\ 295 $(filter %.def, $(othersrc)) 291 296 TOOL_GXX32_LINK_DLL_DEPORD = 292 297 define TOOL_GXX32_LINK_DLL_CMDS … … 297 302 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\ 298 303 $(call TOOL_GXX32_LD_MAP,$(outbase).map) 304 ifeq ($(ld_debug),split) 305 $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug 306 $(CHMOD) a-x $(outbase).debug 307 $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out) 308 endif 299 309 endef 300 310 … … 315 325 TOOL_GXX32_LINK_SYSMOD_OUTPUT = 316 326 TOOL_GXX32_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map 317 TOOL_GXX32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 327 TOOL_GXX32_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug 328 TOOL_GXX32_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug 329 TOOL_GXX32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\ 330 $(filter %.def, $(othersrc)) 318 331 TOOL_GXX32_LINK_SYSMOD_DEPORD = 319 332 define TOOL_GXX32_LINK_SYSMOD_CMDS 320 333 $(QUIET)$(TOOL_GXX32_LD_SYSMOD) $(TOOL_GXX32_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\ 334 $(filter %.def, $(othersrc))\ 321 335 $(foreach p,$(libpath), -L$(p))\ 322 336 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\ 323 337 $(call TOOL_GXX32_LD_SYSMOD_MAP,$(outbase).map) 324 endef 325 338 ifeq ($(ld_debug),split) 339 $(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug 340 $(CHMOD) a-x $(outbase).debug 341 $(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out) 342 endif 343 endef 344
Note:
See TracChangeset
for help on using the changeset viewer.