source: trunk/kBuild/tools/GXX3.kmk

Last change on this file was 3567, checked in by bird, 3 years ago

tools/*GCC*,tools/*GXX*: Removed the SLKRUNS/-fmessage-length=0 stuff as it triggers rebuilds when switching between SlickEdit and the command line. If really needed, it belongs in the project's Config.kmk.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 15.9 KB
RevLine 
[93]1# $Id: GXX3.kmk 3567 2022-06-26 20:00:02Z bird $
2## @file
[3391]3# kBuild Tool Config - Generic GCC v3.2+ using the system GCC and Binutils, for building C++ code.
[93]4#
[1547]5
6#
[3121]7# Copyright (c) 2004-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@anduin.net>
[93]8#
9# This file is part of kBuild.
10#
11# kBuild is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# kBuild is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with kBuild; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24#
25#
[1547]26# As a special exception you are granted permission to include this file, via
[1612]27# the kmk include directive, as you wish without this in itself causing the
28# resulting makefile, program or whatever to be covered by the GPL license.
[1547]29# This exception does not however invalidate any other reasons why the makefile,
30# program, whatever should not be covered the GPL.
31#
32#
[93]33
[971]34TOOL_GXX3 := Generic GCC v3.2.x or later using the system GCC and Binutils, for building C++ code.
[93]35
[667]36# Tool Specific Properties
[3391]37ifndef TOOL_GXX3_PREFIX
[3393]38 TOOL_GXX3_PREFIX :=
[3391]39endif
40ifndef TOOL_GXX3_SUFFIX
[3393]41 TOOL_GXX3_SUFFIX := $(HOSTSUFF_EXE)
[3391]42endif
[3393]43if1of ($(KBUILD_HOST), solaris)
44 TOOL_GXX3_PREFIX2 ?= g
[811]45else
[3393]46 TOOL_GXX3_PREFIX2 ?=
[811]47endif
[3393]48TOOL_GXX3_SUFFIX2 ?= $(HOSTSUFF_EXE)
49TOOL_GXX3_PREFIX3 ?=
50TOOL_GXX3_SUFFIX3 ?= $(HOSTSUFF_EXE)
51
52TOOL_GXX3_CC ?= $(TOOL_GXX3_PREFIX)gcc$(TOOL_GXX3_SUFFIX)
53TOOL_GXX3_CXX ?= $(TOOL_GXX3_PREFIX)g++$(TOOL_GXX3_SUFFIX)
54TOOL_GXX3_PCH ?= $(TOOL_GXX3_CXX)
55TOOL_GXX3_AS ?= $(TOOL_GXX3_PREFIX)gcc$(TOOL_GXX3_SUFFIX)
56TOOL_GXX3_AR ?= $(TOOL_GXX3_PREFIX2)ar$(TOOL_GXX3_SUFFIX2)
[1504]57ifeq ($(KBUILD_TARGET),os2)
[3393]58 TOOL_GXX3_AR_IMP ?= $(TOOL_GXX3_PREFIX3)emximp$(TOOL_GXX3_SUFFIX3)
[474]59else
[3391]60 TOOL_GXX3_AR_IMP ?= $(ECHO) not supported!
[474]61endif
[3391]62TOOL_GXX3_LD ?= $(TOOL_GXX3_PREFIX)g++$(TOOL_GXX3_SUFFIX)
[3393]63if1of ($(KBUILD_HOST), solaris)
64 TOOL_GXX3_LD_SYSMOD ?= $(TOOL_GXX3_PREFIX3)ld$(TOOL_GXX3_SUFFIX3)
65else
66 TOOL_GXX3_LD_SYSMOD ?= $(TOOL_GXX3_PREFIX2)ld$(TOOL_GXX3_SUFFIX2)
67endif
[1504]68ifndef TOOL_GXX3_LDFLAGS.$(KBUILD_TARGET)
[3391]69 TOOL_GXX3_LDFLAGS.dll ?= -shared
[130]70else
[3391]71 TOOL_GXX3_LDFLAGS.dll ?= $(TOOL_GXX3_LDFLAGS.$(KBUILD_TARGET))
[130]72endif
[971]73TOOL_GXX3_LDFLAGS.sysmod ?= -r
[3391]74TOOL_GXX3_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
[1504]75ifeq ($(KBUILD_TARGET),os2)
[3391]76 TOOL_GXX3_LD_MAP ?= -Zmap=$(1)
[971]77 TOOL_GXX3_LD_SYSMOD_MAP ?= -Zmap=$(1)
[1612]78else
[3391]79 TOOL_GXX3_LD_MAP ?=
[1612]80 TOOL_GXX3_LD_SYSMOD_MAP ?=
[231]81endif
[3393]82TOOL_GXX3_OBJCOPY ?= $(TOOL_GXX3_PREFIX)objcopy$(TOOL_GXX3_SUFFIX)
[2534]83
[667]84# General Properties used by kBuild
[971]85TOOL_GXX3_COBJSUFF ?= .o
86TOOL_GXX3_CFLAGS ?=
87TOOL_GXX3_CFLAGS.debug ?= -g
[1058]88TOOL_GXX3_CFLAGS.profile ?= -O2 #-g -pg
[971]89TOOL_GXX3_CFLAGS.release ?= -O2
90TOOL_GXX3_CINCS ?=
91TOOL_GXX3_CDEFS ?=
[137]92
[971]93TOOL_GXX3_CXXOBJSUFF ?= .o
94TOOL_GXX3_CXXFLAGS ?=
95TOOL_GXX3_CXXFLAGS.debug ?= -g
[1058]96TOOL_GXX3_CXXFLAGS.profile ?= -O2 #-g -pg
[971]97TOOL_GXX3_CXXFLAGS.release ?= -O2
98TOOL_GXX3_CXXINCS ?=
99TOOL_GXX3_CXXDEFS ?=
[667]100
[3250]101TOOL_GXX3_PCHOBJSUFF ?= .h.gch
102TOOL_GXX3_PCHFLAGS ?= $(TOOL_GXX3_CXXFLAGS)
103TOOL_GXX3_PCHFLAGS.debug ?= $(TOOL_GXX3_CXXFLAGS.debug)
104TOOL_GXX3_PCHFLAGS.profile ?= $(TOOL_GXX3_CXXFLAGS.profile)
105TOOL_GXX3_PCHFLAGS.release ?= $(TOOL_GXX3_CXXFLAGS.release)
106TOOL_GXX3_PCHINCS ?= $(TOOL_GXX3_CXXINCS)
107TOOL_GXX3_PCHDEFS ?= $(TOOL_GXX3_CXXDEFS)
108
[971]109TOOL_GXX3_ASFLAGS ?= -x assembler-with-cpp
110TOOL_GXX3_ASFLAGS.debug ?= -g
111TOOL_GXX3_ASFLAGS.profile ?= -g
112TOOL_GXX3_ASOBJSUFF ?= .o
[667]113
[971]114TOOL_GXX3_ARFLAGS ?= cr
115TOOL_GXX3_ARLIBSUFF ?= .a
[667]116
[971]117TOOL_GXX3_LDFLAGS ?=
118TOOL_GXX3_LDFLAGS.debug ?= -g
119TOOL_GXX3_LDFLAGS.profile ?= -g
[667]120
121
[93]122## Compile C source.
123# @param $(target) Normalized main target name.
124# @param $(source) Source filename (relative).
[235]125# @param $(obj) Object file name. This shall be (re)created by the compilation.
[93]126# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
127# @param $(flags) Flags.
128# @param $(defs) Definitions. No -D or something.
129# @param $(incs) Includes. No -I or something.
[235]130# @param $(dirdep) Directory creation dependency.
131# @param $(deps) Other dependencies.
[93]132#
133# @param $(outbase) Output basename (full). Use this for list files and such.
[235]134# @param $(objsuff) Object suffix.
[971]135TOOL_GXX3_COMPILE_C_DEPEND =
136TOOL_GXX3_COMPILE_C_DEPORD =
[3256]137TOOL_GXX3_COMPILE_C_OUTPUT = $(if-expr "$(use_objcache)" != "",$(outbase).i,)
138TOOL_GXX3_COMPILE_C_USES_KOBJCACHE = $(if-expr "$(use_objcache)" != "",1,)
[971]139define TOOL_GXX3_COMPILE_C_CMDS
[3256]140if "$(use_objcache)" != ""
[1058]141 $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
142 --kObjCache-cpp $(outbase).i\
[1015]143 $(TOOL_GXX3_CC) -E -o -\
[3566]144 $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
[1015]145 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
[1058]146 $(abspath $(source))\
147 --kObjCache-cc $(obj)\
[1015]148 $(TOOL_GXX3_CC) -c\
[1058]149 $(flags) -fpreprocessed -x c\
[1015]150 -o $(obj)\
[1058]151 -
[3256]152else
[971]153 $(QUIET)$(TOOL_GXX3_CC) -c\
[3566]154 $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
[380]155 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
156 -o $(obj)\
[697]157 $(abspath $(source))
[3256]158endif
[2431]159 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
[93]160endef
161
162
163## Compile C++ source.
164# @param $(target) Normalized main target name.
165# @param $(source) Source filename (relative).
[235]166# @param $(obj) Object file name. This shall be (re)created by the compilation.
[3255]167# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
[93]168# @param $(flags) Flags.
169# @param $(defs) Definitions. No -D or something.
170# @param $(incs) Includes. No -I or something.
[235]171# @param $(dirdep) Directory creation dependency.
[3255]172# @param $(deps) Other dependencies.
[93]173# @param $(outbase) Output basename (full). Use this for list files and such.
[235]174# @param $(objsuff) Object suffix.
[3257]175TOOL_GXX3_COMPILE_CXX_OUTPUT = $(if-expr "$(use_objcache)" != "",$(outbase).ii,)
[3256]176TOOL_GXX3_COMPILE_CXX_DEPEND = $($(target)_1_GCC_PCH_FILE)
177TOOL_GXX3_COMPILE_CXX_DEPORD =
178TOOL_GXX3_COMPILE_CXX_USES_KOBJCACHE = $(if-expr "$(use_objcache)" != "",1,)
[971]179define TOOL_GXX3_COMPILE_CXX_CMDS
[3256]180if "$(use_objcache)" != ""
[1058]181 $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
182 --kObjCache-cpp $(outbase).ii\
[3255]183 $(TOOL_GXX3_CXX) -E -o - $(if-expr defined($(target)_PCH_HDR)\
184 ,-fpch-preprocess -Winvalid-pch -I$($(target)_1_GCC_PCH_DIR) -include $(basename $($(target)_1_GCC_PCH_FILE)),)\
[3566]185 $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
[1015]186 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
[1058]187 $(abspath $(source))\
188 --kObjCache-cc $(obj)\
[1015]189 $(TOOL_GXX3_CXX) -c\
[3255]190 $(flags) -fpreprocessed $(if-expr defined($(target)_PCH_HDR),-fpch-preprocess,) -x c++\
[1015]191 -o $(obj)\
[1058]192 -
[3256]193else
[971]194 $(QUIET)$(TOOL_GXX3_CXX) -c\
[3566]195 $(flags) $(qaddprefix sh,-I, $($(target)_1_GCC_PCH_DIR) $(incs)) $(qaddprefix sh,-D, $(defs))\
[380]196 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
[3250]197 -o $(obj) $(if-expr defined($(target)_PCH_HDR) \
[3254]198 ,-Winvalid-pch -include $(basename $($(target)_1_GCC_PCH_FILE)),) \
[697]199 $(abspath $(source))
[3256]200endif
[2431]201 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
[93]202endef
203
204
[3250]205## Precompile C++ header.
206# @param $(target) Normalized main target name.
207# @param $(source) Source filename (relative).
208# @param $(obj) Object file name. This shall be (re)created by the compilation.
209# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
210# @param $(flags) Flags.
211# @param $(defs) Definitions. No -D or something.
212# @param $(incs) Includes. No -I or something.
213# @param $(dirdep) Directory creation dependency.
214# @param $(deps) Other dependencies.
215# @param $(outbase) Output basename (full). Use this for list files and such.
216# @param $(objsuff) Object suffix.
[3257]217TOOL_GXX3_COMPILE_PCH_OUTPUT = $($(target)_1_GCC_PCH_FILE)
218TOOL_GXX3_COMPILE_PCH_DEPEND =
[3250]219TOOL_GXX3_COMPILE_PCH_DEPORD = $($(target)_1_GCC_PCH_DIR)
220define TOOL_GXX3_COMPILE_PCH_CMDS
221 $(QUIET)$(TOOL_GXX3_PCH) -c\
[3566]222 $(flags) $(qaddprefix sh,-I, $($(target)_1_GCC_PCH_DIR) $(incs)) $(qaddprefix sh,-D, $(defs))\
[3250]223 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
224 -o $(obj)\
225 $(abspath $(source))
226 $(INSTALL) --hard-link-files-when-possible -m 0644 -- "$(obj)" "$($(target)_1_GCC_PCH_FILE)"
227 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
228endef
229
230
[461]231## Compile Assembly source.
232# @param $(target) Normalized main target name.
233# @param $(source) Source filename (relative).
234# @param $(obj) Object file name. This shall be (re)created by the compilation.
235# @param $(dep) Dependcy file. This shall be (re)created by the compilation.
236# @param $(flags) Flags.
237# @param $(defs) Definitions. No -D or something.
238# @param $(incs) Includes. No -I or something.
239# @param $(dirdep) Directory creation dependency.
240# @param $(deps) Other dependencies.
241# @param $(outbase) Output basename (full). Use this for list files and such.
242# @param $(objsuff) Object suffix.
243#
[971]244TOOL_GXX3_COMPILE_AS_OUTPUT =
245TOOL_GXX3_COMPILE_AS_DEPEND =
246TOOL_GXX3_COMPILE_AS_DEPORD =
247define TOOL_GXX3_COMPILE_AS_CMDS
248 $(QUIET)$(TOOL_GXX3_AS) -c\
[3566]249 $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
[461]250 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
251 -o $(obj)\
[697]252 $(abspath $(source))
[2431]253 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
[461]254endef
255
256
[93]257## Link library
258# @param $(target) Normalized main target name.
[3254]259# @param $(out) Library name.
[93]260# @param $(objs) Object files to put in the library.
261# @param $(flags) Flags.
[235]262# @param $(dirdep) Directory creation dependency.
[3254]263# @param $(deps) Other dependencies.
[235]264# @param $(othersrc) Unhandled sources.
[93]265# @param $(outbase) Output basename (full). Use this for list files and such.
[1034]266TOOL_GXX3_LINK_LIBRARY_OUTPUT = $(out).ar-script
267TOOL_GXX3_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).imp.a
[971]268TOOL_GXX3_LINK_LIBRARY_DEPEND = $(othersrc)
269TOOL_GXX3_LINK_LIBRARY_DEPORD =
270define TOOL_GXX3_LINK_LIBRARY_CMDS
[772]271 $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)'
272 $(QUIET)$(APPEND) -n $(out).ar-script \
[3254]273 $(foreach o,$(filter-out %.h.gch,$(objs)), 'ADDMOD $(o)') \
[2775]274 $(foreach o,$(filter-out %.def %.imp %.dll,$(othersrc)), 'ADDLIB $(o)')
275 $(if $(filter %.def %.imp %.dll,$(othersrc))\
276 ,$(TOOL_GXX3_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp %.dll,$(othersrc))\
[772]277 $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a')
278 $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
279 $(QUIET)$(APPEND) $(out).ar-script 'END'
[1315]280 $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_GXX3_AR) -M
[772]281endef
[206]282
283
[93]284## Link program
285# @param $(target) Normalized main target name.
[353]286# @param $(out) Program name.
[93]287# @param $(objs) Object files to link together.
288# @param $(libs) Libraries to search.
289# @param $(libpath) Library search paths.
290# @param $(flags) Flags.
[235]291# @param $(dirdep) Directory creation dependency.
292# @param $(deps) Other dependencies.
293# @param $(othersrc) Unhandled sources.
294# @param $(custom_pre) Custom step invoked before linking.
295# @param $(custom_post) Custom step invoked after linking.
[93]296# @param $(outbase) Output basename (full). Use this for list files and such.
[1034]297TOOL_GXX3_LINK_PROGRAM_OUTPUT =
298TOOL_GXX3_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
[2534]299TOOL_GXX3_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
300TOOL_GXX3_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
[971]301TOOL_GXX3_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
[572]302 $(filter %.def, $(othersrc))
[971]303TOOL_GXX3_LINK_PROGRAM_DEPORD =
304define TOOL_GXX3_LINK_PROGRAM_CMDS
[3254]305 $(QUIET)$(TOOL_GXX3_LD) $(flags) -o $(out) $(filter-out %.h.gch,$(objs))\
[572]306 $(filter %.def, $(othersrc))\
[380]307 $(foreach p,$(libpath), -L$(p))\
[1259]308 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
[971]309 $(call TOOL_GXX3_LD_MAP,$(outbase).map)
[2534]310 ifeq ($(ld_debug),split)
[2774]311 $(QUIET)$(TOOL_GXX3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
312 $(QUIET)$(CHMOD) a-x $(outbase).debug
313 $(QUIET)$(TOOL_GXX3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
[2534]314 endif
[93]315endef
316
[130]317
318## Link DLL
319# @param $(target) Normalized main target name.
[353]320# @param $(out) Program name.
[130]321# @param $(objs) Object files to link together.
322# @param $(libs) Libraries to search.
323# @param $(libpath) Library search paths.
324# @param $(flags) Flags.
[235]325# @param $(dirdep) Directory creation dependency.
326# @param $(deps) Other dependencies.
327# @param $(othersrc) Unhandled sources.
328# @param $(custom_pre) Custom step invoked before linking.
329# @param $(custom_post) Custom step invoked after linking.
[130]330# @param $(outbase) Output basename (full). Use this for list files and such.
[1034]331TOOL_GXX3_LINK_DLL_OUTPUT =
332TOOL_GXX3_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
[2534]333TOOL_GXX3_LINK_DLL_OUTPUT_DEBUG = $(outbase).debug
334TOOL_GXX3_LINK_DLL_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
[971]335TOOL_GXX3_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
[572]336 $(filter %.def, $(othersrc))
[971]337TOOL_GXX3_LINK_DLL_DEPORD =
338define TOOL_GXX3_LINK_DLL_CMDS
339 $(QUIET)$(TOOL_GXX3_LD) $(TOOL_GXX3_LDFLAGS.dll) $(flags) -o $(out)\
[2541]340 $(if $(filter-out win os2, $(KBUILD_TARGET)),$(call TOOL_GXX3_LD_SONAME,$(target),$(out)))\
[3254]341 $(filter-out %.h.gch,$(objs))\
[572]342 $(filter %.def, $(othersrc))\
[380]343 $(foreach p,$(libpath), -L$(p))\
[1259]344 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
[971]345 $(call TOOL_GXX3_LD_MAP,$(outbase).map)
[2534]346 ifeq ($(ld_debug),split)
[2774]347 $(QUIET)$(TOOL_GXX3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
348 $(QUIET)$(CHMOD) a-x $(outbase).debug
349 $(QUIET)$(TOOL_GXX3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
[2534]350 endif
[130]351endef
352
[380]353
[137]354## Link system module (windows aka driver, linux aka kernel module)
355# @param $(target) Normalized main target name.
[353]356# @param $(out) System module name.
[137]357# @param $(objs) Object files to link together.
358# @param $(libs) Libraries to search.
359# @param $(libpath) Library search paths.
360# @param $(flags) Flags.
[235]361# @param $(dirdep) Directory creation dependency.
362# @param $(deps) Other dependencies.
363# @param $(othersrc) Unhandled sources.
364# @param $(custom_pre) Custom step invoked before linking.
365# @param $(custom_post) Custom step invoked after linking.
[137]366# @param $(outbase) Output basename (full). Use this for list files and such.
[1034]367TOOL_GXX3_LINK_SYSMOD_OUTPUT =
368TOOL_GXX3_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
[2534]369TOOL_GXX3_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).debug
370TOOL_GXX3_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
[971]371TOOL_GXX3_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
[572]372 $(filter %.def, $(othersrc))
[971]373TOOL_GXX3_LINK_SYSMOD_DEPORD =
374define TOOL_GXX3_LINK_SYSMOD_CMDS
[3254]375 $(QUIET)$(TOOL_GXX3_LD_SYSMOD) $(TOOL_GXX3_LDFLAGS.sysmod) $(flags) -o $(out) $(filter-out %.h.gch,$(objs))\
[572]376 $(filter %.def, $(othersrc))\
[380]377 $(foreach p,$(libpath), -L$(p))\
[1259]378 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
[971]379 $(call TOOL_GXX3_LD_SYSMOD_MAP,$(outbase).map)
[2534]380 ifeq ($(ld_debug),split)
[2774]381 $(QUIET)$(TOOL_GXX3_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
382 $(QUIET)$(CHMOD) a-x $(outbase).debug
383 $(QUIET)$(TOOL_GXX3_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
[2534]384 endif
[137]385endef
[184]386
Note: See TracBrowser for help on using the repository browser.