1 | # $Id: GXX32.kmk 2775 2015-02-03 20:00:15Z bird $
|
---|
2 | ## @file
|
---|
3 | # kBuild Tool Config - Generic 32-bit GCC v3.2.x or later using the system GCC, for building C++ code.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (c) 2004-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
|
---|
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 | #
|
---|
26 | # As a special exception you are granted permission to include this file, via
|
---|
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.
|
---|
29 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
30 | # program, whatever should not be covered the GPL.
|
---|
31 | #
|
---|
32 | #
|
---|
33 |
|
---|
34 | TOOL_GXX32 := Generic 32-bit GCC v3.2.x or later using the system GCC, for building C++ code. \
|
---|
35 | More or less Linux/ELF specfic.
|
---|
36 |
|
---|
37 | # Tool Specific Properties
|
---|
38 | TOOL_GXX32_CC ?= gcc$(HOSTSUFF_EXE) -m32
|
---|
39 | TOOL_GXX32_CXX ?= g++$(HOSTSUFF_EXE) -m32
|
---|
40 | TOOL_GXX32_AS ?= gcc$(HOSTSUFF_EXE) -m32
|
---|
41 | TOOL_GXX32_AR ?= ar$(HOSTSUFF_EXE)
|
---|
42 | TOOL_GXX32_LD ?= g++$(HOSTSUFF_EXE) -m32
|
---|
43 | TOOL_GXX32_LD_SYSMOD ?= ld$(HOSTSUFF_EXE)
|
---|
44 | ifndef TOOL_GXX32_LDFLAGS.$(KBUILD_TARGET)
|
---|
45 | TOOL_GXX32_LDFLAGS.dll ?= -shared
|
---|
46 | else
|
---|
47 | TOOL_GXX32_LDFLAGS.dll ?= $(TOOL_GXX32_LDFLAGS.$(KBUILD_TARGET))
|
---|
48 | endif
|
---|
49 | TOOL_GXX32_LDFLAGS.sysmod ?= -r -m elf_i386$(if-expr "$(KBUILD_TARGET)" == "freebsd",_fbsd,)
|
---|
50 | TOOL_GXX32_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
|
---|
51 | ifeq ($(KBUILD_TARGET),os2)
|
---|
52 | TOOL_GXX32_LD_MAP ?= -Zmap=$(1)
|
---|
53 | else
|
---|
54 | TOOL_GXX32_LD_MAP ?=
|
---|
55 | endif
|
---|
56 | ifeq ($(KBUILD_TARGET),os2)
|
---|
57 | TOOL_GXX32_LD_SYSMOD_MAP ?= -Zmap=$(1)
|
---|
58 | else
|
---|
59 | TOOL_GXX32_LD_SYSMOD_MAP ?=
|
---|
60 | endif
|
---|
61 | if1of ($(KBUILD_HOST), solaris)
|
---|
62 | TOOL_GXX32_OBJCOPY ?= gobjcopy$(HOSTSUFF_EXE)
|
---|
63 | else
|
---|
64 | TOOL_GXX32_OBJCOPY ?= objcopy$(HOSTSUFF_EXE)
|
---|
65 | endif
|
---|
66 |
|
---|
67 | ifdef SLKRUNS
|
---|
68 | TOOL_GXX32_CC += -fmessage-length=0
|
---|
69 | TOOL_GXX32_CXX += -fmessage-length=0
|
---|
70 | endif
|
---|
71 |
|
---|
72 | # General Properties used by kBuild
|
---|
73 | TOOL_GXX32_COBJSUFF ?= .o
|
---|
74 | TOOL_GXX32_CFLAGS ?=
|
---|
75 | TOOL_GXX32_CFLAGS.debug ?= -g
|
---|
76 | TOOL_GXX32_CFLAGS.profile ?= -O2 #-g -pg
|
---|
77 | TOOL_GXX32_CFLAGS.release ?= -O2
|
---|
78 | TOOL_GXX32_CINCS ?=
|
---|
79 | TOOL_GXX32_CDEFS ?=
|
---|
80 |
|
---|
81 | TOOL_GXX32_CXXOBJSUFF ?= .o
|
---|
82 | TOOL_GXX32_CXXOBJSUFF ?= .o
|
---|
83 | TOOL_GXX32_CXXFLAGS ?=
|
---|
84 | TOOL_GXX32_CXXFLAGS.debug ?= -g
|
---|
85 | TOOL_GXX32_CXXFLAGS.profile ?= -O2 #-g -pg
|
---|
86 | TOOL_GXX32_CXXFLAGS.release ?= -O2
|
---|
87 | TOOL_GXX32_CXXINCS ?=
|
---|
88 | TOOL_GXX32_CXXDEFS ?=
|
---|
89 |
|
---|
90 | TOOL_GXX32_ASFLAGS ?= -x assembler-with-cpp
|
---|
91 | TOOL_GXX32_ASFLAGS.debug ?= -g
|
---|
92 | TOOL_GXX32_ASFLAGS.profile ?= -g
|
---|
93 | TOOL_GXX32_ASOBJSUFF ?= .o
|
---|
94 |
|
---|
95 | TOOL_GXX32_ARFLAGS ?= cr
|
---|
96 | TOOL_GXX32_ARLIBSUFF ?= .a
|
---|
97 |
|
---|
98 | TOOL_GXX32_LDFLAGS ?=
|
---|
99 | TOOL_GXX32_LDFLAGS.debug ?= -g
|
---|
100 | TOOL_GXX32_LDFLAGS.profile ?= -g
|
---|
101 |
|
---|
102 |
|
---|
103 | ## Compile C source.
|
---|
104 | # @param $(target) Normalized main target name.
|
---|
105 | # @param $(source) Source filename (relative).
|
---|
106 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
107 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
108 | # @param $(flags) Flags.
|
---|
109 | # @param $(defs) Definitions. No -D or something.
|
---|
110 | # @param $(incs) Includes. No -I or something.
|
---|
111 | # @param $(dirdep) Directory creation dependency.
|
---|
112 | # @param $(deps) Other dependencies.
|
---|
113 | #
|
---|
114 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
115 | # @param $(objsuff) Object suffix.
|
---|
116 | TOOL_GXX32_COMPILE_C_DEPEND =
|
---|
117 | TOOL_GXX32_COMPILE_C_DEPORD =
|
---|
118 | ifdef KBUILD_USE_KOBJCACHE
|
---|
119 | TOOL_GXX32_COMPILE_C_USES_KOBJCACHE = 1
|
---|
120 | TOOL_GXX32_COMPILE_C_OUTPUT = $(outbase).i
|
---|
121 | define TOOL_GXX32_COMPILE_C_CMDS
|
---|
122 | $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
|
---|
123 | --kObjCache-cpp $(outbase).i\
|
---|
124 | $(TOOL_GXX32_CC) -E -o -\
|
---|
125 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
126 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
127 | $(abspath $(source))\
|
---|
128 | --kObjCache-cc $(obj)\
|
---|
129 | $(TOOL_GXX32_CC) -c\
|
---|
130 | $(flags) -fpreprocessed -x c\
|
---|
131 | -o $(obj)\
|
---|
132 | -
|
---|
133 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
134 | endef
|
---|
135 | else # !KBUILD_USE_KOBJCACHE
|
---|
136 | TOOL_GXX32_COMPILE_C_OUTPUT =
|
---|
137 | define TOOL_GXX32_COMPILE_C_CMDS
|
---|
138 | $(QUIET)$(TOOL_GXX32_CC) -c\
|
---|
139 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
140 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
141 | -o $(obj)\
|
---|
142 | $(abspath $(source))
|
---|
143 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
144 | endef
|
---|
145 | endif # !KBUILD_USE_KOBJCACHE
|
---|
146 |
|
---|
147 |
|
---|
148 | ## Compile C++ source.
|
---|
149 | # @param $(target) Normalized main target name.
|
---|
150 | # @param $(source) Source filename (relative).
|
---|
151 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
152 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
153 | # @param $(flags) Flags.
|
---|
154 | # @param $(defs) Definitions. No -D or something.
|
---|
155 | # @param $(incs) Includes. No -I or something.
|
---|
156 | # @param $(dirdep) Directory creation dependency.
|
---|
157 | # @param $(deps) Other dependencies.
|
---|
158 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
159 | # @param $(objsuff) Object suffix.
|
---|
160 | TOOL_GXX32_COMPILE_CXX_DEPEND =
|
---|
161 | TOOL_GXX32_COMPILE_CXX_DEPORD =
|
---|
162 | ifdef KBUILD_USE_KOBJCACHE
|
---|
163 | TOOL_GXX32_COMPILE_CXX_USES_KOBJCACHE = 1
|
---|
164 | TOOL_GXX32_COMPILE_CXX_OUTPUT = $(outbase).ii
|
---|
165 | define TOOL_GXX32_COMPILE_CXX_CMDS
|
---|
166 | $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
|
---|
167 | --kObjCache-cpp $(outbase).ii\
|
---|
168 | $(TOOL_GXX32_CXX) -E -o -\
|
---|
169 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
170 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
171 | $(abspath $(source))\
|
---|
172 | --kObjCache-cc $(obj)\
|
---|
173 | $(TOOL_GXX32_CXX) -c\
|
---|
174 | $(flags) -fpreprocessed -x c++\
|
---|
175 | -o $(obj)\
|
---|
176 | -
|
---|
177 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
178 | endef
|
---|
179 | else # !KBUILD_USE_KOBJCACHE
|
---|
180 | TOOL_GXX32_COMPILE_CXX_OUTPUT =
|
---|
181 | define TOOL_GXX32_COMPILE_CXX_CMDS
|
---|
182 | $(QUIET)$(TOOL_GXX32_CXX) -c\
|
---|
183 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
184 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
185 | -o $(obj)\
|
---|
186 | $(abspath $(source))
|
---|
187 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
188 | endef
|
---|
189 | endif # !KBUILD_USE_KOBJCACHE
|
---|
190 |
|
---|
191 |
|
---|
192 | ## Compile Assembly source.
|
---|
193 | # @param $(target) Normalized main target name.
|
---|
194 | # @param $(source) Source filename (relative).
|
---|
195 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
196 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
197 | # @param $(flags) Flags.
|
---|
198 | # @param $(defs) Definitions. No -D or something.
|
---|
199 | # @param $(incs) Includes. No -I or something.
|
---|
200 | # @param $(dirdep) Directory creation dependency.
|
---|
201 | # @param $(deps) Other dependencies.
|
---|
202 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
203 | # @param $(objsuff) Object suffix.
|
---|
204 | #
|
---|
205 | TOOL_GXX32_COMPILE_AS_OUTPUT =
|
---|
206 | TOOL_GXX32_COMPILE_AS_DEPEND =
|
---|
207 | TOOL_GXX32_COMPILE_AS_DEPORD =
|
---|
208 | define TOOL_GXX32_COMPILE_AS_CMDS
|
---|
209 | $(QUIET)$(TOOL_GXX32_AS) -c\
|
---|
210 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
---|
211 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
---|
212 | -o $(obj)\
|
---|
213 | $(abspath $(source))
|
---|
214 | $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
|
---|
215 | endef
|
---|
216 |
|
---|
217 |
|
---|
218 | ## Link library
|
---|
219 | # @param $(target) Normalized main target name.
|
---|
220 | # @param $(out) Library name.
|
---|
221 | # @param $(objs) Object files to put in the library.
|
---|
222 | # @param $(flags) Flags.
|
---|
223 | # @param $(dirdep) Directory creation dependency.
|
---|
224 | # @param $(deps) Other dependencies.
|
---|
225 | # @param $(othersrc) Unhandled sources.
|
---|
226 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
227 | TOOL_GXX32_LINK_LIBRARY_OUTPUT = $(out).ar-script
|
---|
228 | TOOL_GXX32_LINK_LIBRARY_DEPEND = $(othersrc)
|
---|
229 | TOOL_GXX32_LINK_LIBRARY_DEPORD =
|
---|
230 | define TOOL_GXX32_LINK_LIBRARY_CMDS
|
---|
231 | $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)'
|
---|
232 | $(QUIET)$(APPEND) -n $(out).ar-script \
|
---|
233 | $(foreach o,$(objs), 'ADDMOD $(o)') \
|
---|
234 | $(foreach o,$(filter-out %.def %.imp %.dll,$(othersrc)), 'ADDLIB $(o)')
|
---|
235 | $(if $(filter %.def %.imp %.dll,$(othersrc))\
|
---|
236 | ,$(TOOL_GXX3_AR_IMP) -o $(outbase).imp.a $(filter %.def %.imp %.dll,$(othersrc))\
|
---|
237 | $(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script 'ADDLIB $(outbase).imp.a')
|
---|
238 | $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
|
---|
239 | $(QUIET)$(APPEND) $(out).ar-script 'END'
|
---|
240 | $(QUIET)$(REDIRECT) -rti $(out).ar-script -- $(TOOL_GXX32_AR) -M
|
---|
241 | endef
|
---|
242 |
|
---|
243 |
|
---|
244 | ## Link program
|
---|
245 | # @param $(target) Normalized main target name.
|
---|
246 | # @param $(out) Program name.
|
---|
247 | # @param $(objs) Object files to link together.
|
---|
248 | # @param $(libs) Libraries to search.
|
---|
249 | # @param $(libpath) Library search paths.
|
---|
250 | # @param $(flags) Flags.
|
---|
251 | # @param $(dirdep) Directory creation dependency.
|
---|
252 | # @param $(deps) Other dependencies.
|
---|
253 | # @param $(othersrc) Unhandled sources.
|
---|
254 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
255 | # @param $(custom_post) Custom step invoked after linking.
|
---|
256 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
257 | TOOL_GXX32_LINK_PROGRAM_OUTPUT =
|
---|
258 | TOOL_GXX32_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
|
---|
259 | TOOL_GXX32_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
|
---|
260 | TOOL_GXX32_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
|
---|
261 | TOOL_GXX32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
|
---|
262 | $(filter %.def, $(othersrc))
|
---|
263 | TOOL_GXX32_LINK_PROGRAM_DEPORD =
|
---|
264 | define TOOL_GXX32_LINK_PROGRAM_CMDS
|
---|
265 | $(QUIET)$(TOOL_GXX32_LD) $(flags) -o $(out) $(objs)\
|
---|
266 | $(foreach p,$(libpath), -L$(p))\
|
---|
267 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
|
---|
268 | $(call TOOL_GXX32_LD_MAP,$(outbase).map)
|
---|
269 | ifeq ($(ld_debug),split)
|
---|
270 | $(QUIET)$(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
|
---|
271 | $(QUIET)$(CHMOD) a-x $(outbase).debug
|
---|
272 | $(QUIET)$(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
|
---|
273 | endif
|
---|
274 | endef
|
---|
275 |
|
---|
276 |
|
---|
277 | ## Link DLL
|
---|
278 | # @param $(target) Normalized main target name.
|
---|
279 | # @param $(out) Program name.
|
---|
280 | # @param $(objs) Object files to link together.
|
---|
281 | # @param $(libs) Libraries to search.
|
---|
282 | # @param $(libpath) Library search paths.
|
---|
283 | # @param $(flags) Flags.
|
---|
284 | # @param $(dirdep) Directory creation dependency.
|
---|
285 | # @param $(deps) Other dependencies.
|
---|
286 | # @param $(othersrc) Unhandled sources.
|
---|
287 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
288 | # @param $(custom_post) Custom step invoked after linking.
|
---|
289 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
290 | TOOL_GXX32_LINK_DLL_OUTPUT =
|
---|
291 | TOOL_GXX32_LINK_DLL_OUTPUT_MAYBE = $(outbase).map
|
---|
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))
|
---|
296 | TOOL_GXX32_LINK_DLL_DEPORD =
|
---|
297 | define TOOL_GXX32_LINK_DLL_CMDS
|
---|
298 | $(QUIET)$(TOOL_GXX32_LD) $(TOOL_GXX32_LDFLAGS.dll) $(flags) -o $(out)\
|
---|
299 | $(if $(filter-out win os2, $(KBUILD_TARGET)),$(call TOOL_GXX32_LD_SONAME,$(target),$(out)))\
|
---|
300 | $(objs)\
|
---|
301 | $(foreach p,$(libpath), -L$(p))\
|
---|
302 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
|
---|
303 | $(call TOOL_GXX32_LD_MAP,$(outbase).map)
|
---|
304 | ifeq ($(ld_debug),split)
|
---|
305 | $(QUIET)$(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
|
---|
306 | $(QUIET)$(CHMOD) a-x $(outbase).debug
|
---|
307 | $(QUIET)$(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
|
---|
308 | endif
|
---|
309 | endef
|
---|
310 |
|
---|
311 |
|
---|
312 | ## Link system module (windows aka driver, linux aka kernel module)
|
---|
313 | # @param $(target) Normalized main target name.
|
---|
314 | # @param $(out) System module name.
|
---|
315 | # @param $(objs) Object files to link together.
|
---|
316 | # @param $(libs) Libraries to search.
|
---|
317 | # @param $(libpath) Library search paths.
|
---|
318 | # @param $(flags) Flags.
|
---|
319 | # @param $(dirdep) Directory creation dependency.
|
---|
320 | # @param $(deps) Other dependencies.
|
---|
321 | # @param $(othersrc) Unhandled sources.
|
---|
322 | # @param $(custom_pre) Custom step invoked before linking.
|
---|
323 | # @param $(custom_post) Custom step invoked after linking.
|
---|
324 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
325 | TOOL_GXX32_LINK_SYSMOD_OUTPUT =
|
---|
326 | TOOL_GXX32_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map
|
---|
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))
|
---|
331 | TOOL_GXX32_LINK_SYSMOD_DEPORD =
|
---|
332 | define TOOL_GXX32_LINK_SYSMOD_CMDS
|
---|
333 | $(QUIET)$(TOOL_GXX32_LD_SYSMOD) $(TOOL_GXX32_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\
|
---|
334 | $(filter %.def, $(othersrc))\
|
---|
335 | $(foreach p,$(libpath), -L$(p))\
|
---|
336 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))\
|
---|
337 | $(call TOOL_GXX32_LD_SYSMOD_MAP,$(outbase).map)
|
---|
338 | ifeq ($(ld_debug),split)
|
---|
339 | $(QUIET)$(TOOL_GXX32_OBJCOPY) --only-keep-debug $(out) $(outbase).debug
|
---|
340 | $(QUIET)$(CHMOD) a-x $(outbase).debug
|
---|
341 | $(QUIET)$(TOOL_GXX32_OBJCOPY) --strip-debug --strip-unneeded --add-gnu-debuglink=$(outbase).debug $(out)
|
---|
342 | endif
|
---|
343 | endef
|
---|
344 |
|
---|