| 1 | # $Id: XGCCAMD64LINUX.kmk 848 2007-02-06 03:13:07Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | #
|
|---|
| 4 | # kBuild Tool Config - GCC Cross compiler for AMD64+Linux.
|
|---|
| 5 | #
|
|---|
| 6 | # Copyright (c) 2004-2007 knut st. osmundsen <bird-kBuild-spam@anduin.net>
|
|---|
| 7 | #
|
|---|
| 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 |
|
|---|
| 27 | TOOL_XGCCAMD64LINUX := GCC Cross compiler for AMD64+Linux.
|
|---|
| 28 |
|
|---|
| 29 | # Tool Specific Properties
|
|---|
| 30 | TOOL_XGCCAMD64LINUX_HOSTSUFF_EXE ?= $(HOSTSUFF_EXE)
|
|---|
| 31 | ifeq ($(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH),linux.amd64)
|
|---|
| 32 | # not x-compile, use the default gcc.
|
|---|
| 33 | TOOL_XGCCAMD64LINUX_PREFIX := $(TOOL_XGCCAMD64LINUX_PREFIX)
|
|---|
| 34 | else # x-compile:
|
|---|
| 35 | # find the latest xgcc build.
|
|---|
| 36 | ifndef TOOL_XGCCAMD64LINUX_PREFIX
|
|---|
| 37 | TOOL_XGCCAMD64LINUX_PREFIX := x86_64-unknown-linux-gnu-
|
|---|
| 38 | ifndef PATH_TOOL_XGCCAMD64LINUX
|
|---|
| 39 | PATH_TOOL_XGCCAMD64LINUX := $(sort $(wildcard $(PATH_DEVTOOLS_BLD)/x86_64-unknown-linux-gnu/*))
|
|---|
| 40 | ifeq ($(PATH_TOOL_XGCCAMD64LINUX),)
|
|---|
| 41 | ifeq ($(filter-out win.amd64,$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)),) # these can use the windows build.
|
|---|
| 42 | TOOL_XGCCAMD64LINUX_EXEC_PREFIX ?= $(EXEC_X86_WIN32)
|
|---|
| 43 | TOOL_XGCCAMD64LINUX_HOSTSUFF_EXE := .exe
|
|---|
| 44 | PATH_TOOL_XGCCAMD64LINUX := $(sort $(wildcard $(PATH_DEVTOOLS)/win.x86/x86_64-unknown-linux-gnu/*))
|
|---|
| 45 | ifeq ($(PATH_TOOL_XGCCAMD64LINUX),)
|
|---|
| 46 | PATH_TOOL_XGCCAMD64LINUX := $(sort $(wildcard $(PATH_DEVTOOLS)/x86.win32/x86_64-unknown-linux-gnu/*))
|
|---|
| 47 | endif
|
|---|
| 48 | endif
|
|---|
| 49 | endif
|
|---|
| 50 | ifneq ($(PATH_TOOL_XGCCAMD64LINUX),)
|
|---|
| 51 | PATH_TOOL_XGCCAMD64LINUX := $(call lastword,$(PATH_TOOL_XGCCAMD64LINUX))
|
|---|
| 52 | endif
|
|---|
| 53 | endif # !PATH_TOOL_XGCCAMD64LINUX
|
|---|
| 54 | ifneq ($(PATH_TOOL_XGCCAMD64LINUX),)
|
|---|
| 55 | TOOL_XGCCAMD64LINUX_PREFIX := $(TOOL_XGCCAMD64LINUX_EXEC_PREFIX) $(PATH_TOOL_XGCCAMD64LINUX)/bin/$(TOOL_XGCCAMD64LINUX_PREFIX)
|
|---|
| 56 | endif
|
|---|
| 57 | else
|
|---|
| 58 | # Resolve any fancy stuff once and for all.
|
|---|
| 59 | TOOL_XGCCAMD64LINUX_PREFIX := $(TOOL_XGCCAMD64LINUX_PREFIX)
|
|---|
| 60 | endif
|
|---|
| 61 | endif
|
|---|
| 62 |
|
|---|
| 63 | TOOL_XGCCAMD64LINUX_CC ?= $(TOOL_XGCCAMD64LINUX_PREFIX)gcc$(TOOL_XGCCAMD64LINUX_HOSTSUFF_EXE)
|
|---|
| 64 | TOOL_XGCCAMD64LINUX_CXX ?= $(TOOL_XGCCAMD64LINUX_PREFIX)g++$(TOOL_XGCCAMD64LINUX_HOSTSUFF_EXE)
|
|---|
| 65 | TOOL_XGCCAMD64LINUX_AS ?= $(TOOL_XGCCAMD64LINUX_PREFIX)gcc$(TOOL_XGCCAMD64LINUX_HOSTSUFF_EXE)
|
|---|
| 66 | TOOL_XGCCAMD64LINUX_AR ?= $(TOOL_XGCCAMD64LINUX_PREFIX)ar$(TOOL_XGCCAMD64LINUX_HOSTSUFF_EXE)
|
|---|
| 67 | TOOL_XGCCAMD64LINUX_LD ?= $(TOOL_XGCCAMD64LINUX_PREFIX)g++$(TOOL_XGCCAMD64LINUX_HOSTSUFF_EXE)
|
|---|
| 68 | TOOL_XGCCAMD64LINUX_LD_SYSMOD ?= $(TOOL_XGCCAMD64LINUX_PREFIX)ld$(TOOL_XGCCAMD64LINUX_HOSTSUFF_EXE)
|
|---|
| 69 |
|
|---|
| 70 | TOOL_XGCCAMD64LINUX_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(BUILD_TARGET).$(BUILD_TYPE)) $($(1)_SONAME.$(BUILD_TARGET)) $($(1)_SONAME.$(BUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
|
|---|
| 71 | TOOL_XGCCAMD64LINUX_LD_MAP ?= -Wl,-Map -Wl,$(1) -Wl,--cref
|
|---|
| 72 | TOOL_XGCCAMD64LINUX_LD_SYSMOD_MAP ?= -Map $(1) --cref
|
|---|
| 73 | TOOL_XGCCAMD64LINUX_LDFLAGS.dll ?= -shared
|
|---|
| 74 | TOOL_XGCCAMD64LINUX_LDFLAGS.sysmod ?= -r
|
|---|
| 75 |
|
|---|
| 76 | ifdef SLKRUNS
|
|---|
| 77 | TOOL_XGCCAMD64LINUX_CC += -fmessage-length=0
|
|---|
| 78 | TOOL_XGCCAMD64LINUX_CXX += -fmessage-length=0
|
|---|
| 79 | endif
|
|---|
| 80 |
|
|---|
| 81 | # General Properties used by kBuild
|
|---|
| 82 | TOOL_XGCCAMD64LINUX_COBJSUFF ?= .o
|
|---|
| 83 | TOOL_XGCCAMD64LINUX_CFLAGS ?= -g
|
|---|
| 84 | TOOL_XGCCAMD64LINUX_CFLAGS.debug ?= -O0
|
|---|
| 85 | TOOL_XGCCAMD64LINUX_CFLAGS.release ?= -O2
|
|---|
| 86 | TOOL_XGCCAMD64LINUX_CFLAGS.profile ?= -O2 #-pg
|
|---|
| 87 | TOOL_XGCCAMD64LINUX_CINCS ?=
|
|---|
| 88 | TOOL_XGCCAMD64LINUX_CDEFS ?=
|
|---|
| 89 |
|
|---|
| 90 | TOOL_XGCCAMD64LINUX_CXXOBJSUFF ?= .o
|
|---|
| 91 | TOOL_XGCCAMD64LINUX_CXXOBJSUFF ?= .o
|
|---|
| 92 | TOOL_XGCCAMD64LINUX_CXXFLAGS ?= -g
|
|---|
| 93 | TOOL_XGCCAMD64LINUX_CXXFLAGS.debug ?= -O0
|
|---|
| 94 | TOOL_XGCCAMD64LINUX_CXXFLAGS.release ?= -O2
|
|---|
| 95 | TOOL_XGCCAMD64LINUX_CXXFLAGS.profile ?= -O2 #-pg
|
|---|
| 96 | TOOL_XGCCAMD64LINUX_CXXINCS ?=
|
|---|
| 97 | TOOL_XGCCAMD64LINUX_CXXDEFS ?=
|
|---|
| 98 |
|
|---|
| 99 | TOOL_XGCCAMD64LINUX_ASFLAGS ?= -g -x assembler-with-cpp
|
|---|
| 100 | TOOL_XGCCAMD64LINUX_ASOBJSUFF ?= .o
|
|---|
| 101 |
|
|---|
| 102 | TOOL_XGCCAMD64LINUX_ARFLAGS ?= cr
|
|---|
| 103 | TOOL_XGCCAMD64LINUX_ARLIBSUFF ?= .a
|
|---|
| 104 |
|
|---|
| 105 | TOOL_XGCCAMD64LINUX_LDFLAGS ?=
|
|---|
| 106 | TOOL_XGCCAMD64LINUX_LDFLAGS.debug ?= -g
|
|---|
| 107 | TOOL_XGCCAMD64LINUX_LDFLAGS.release ?= -s
|
|---|
| 108 |
|
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 | ## Compile C source.
|
|---|
| 112 | # @param $(target) Normalized main target name.
|
|---|
| 113 | # @param $(source) Source filename (relative).
|
|---|
| 114 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 115 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 116 | # @param $(flags) Flags.
|
|---|
| 117 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 118 | # @param $(incs) Includes. No -I or something.
|
|---|
| 119 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 120 | # @param $(deps) Other dependencies.
|
|---|
| 121 | #
|
|---|
| 122 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 123 | # @param $(objsuff) Object suffix.
|
|---|
| 124 | TOOL_XGCCAMD64LINUX_COMPILE_C_OUTPUT =
|
|---|
| 125 | TOOL_XGCCAMD64LINUX_COMPILE_C_DEPEND =
|
|---|
| 126 | TOOL_XGCCAMD64LINUX_COMPILE_C_DEPORD =
|
|---|
| 127 | define TOOL_XGCCAMD64LINUX_COMPILE_C_CMDS
|
|---|
| 128 | $(QUIET)$(TOOL_XGCCAMD64LINUX_CC) -c\
|
|---|
| 129 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 130 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
|---|
| 131 | -o $(obj)\
|
|---|
| 132 | $(abspath $(source))
|
|---|
| 133 | endef
|
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 | ## Compile C++ source.
|
|---|
| 137 | # @param $(target) Normalized main target name.
|
|---|
| 138 | # @param $(source) Source filename (relative).
|
|---|
| 139 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 140 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 141 | # @param $(flags) Flags.
|
|---|
| 142 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 143 | # @param $(incs) Includes. No -I or something.
|
|---|
| 144 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 145 | # @param $(deps) Other dependencies.
|
|---|
| 146 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 147 | # @param $(objsuff) Object suffix.
|
|---|
| 148 | TOOL_XGCCAMD64LINUX_COMPILE_CXX_OUTPUT =
|
|---|
| 149 | TOOL_XGCCAMD64LINUX_COMPILE_CXX_DEPEND =
|
|---|
| 150 | TOOL_XGCCAMD64LINUX_COMPILE_CXX_DEPORD =
|
|---|
| 151 | define TOOL_XGCCAMD64LINUX_COMPILE_CXX_CMDS
|
|---|
| 152 | $(QUIET)$(TOOL_XGCCAMD64LINUX_CXX) -c\
|
|---|
| 153 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 154 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
|---|
| 155 | -o $(obj)\
|
|---|
| 156 | $(abspath $(source))
|
|---|
| 157 | endef
|
|---|
| 158 |
|
|---|
| 159 | ## Compile Assembly source.
|
|---|
| 160 | # @param $(target) Normalized main target name.
|
|---|
| 161 | # @param $(source) Source filename (relative).
|
|---|
| 162 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
|---|
| 163 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
|---|
| 164 | # @param $(flags) Flags.
|
|---|
| 165 | # @param $(defs) Definitions. No -D or something.
|
|---|
| 166 | # @param $(incs) Includes. No -I or something.
|
|---|
| 167 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 168 | # @param $(deps) Other dependencies.
|
|---|
| 169 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 170 | # @param $(objsuff) Object suffix.
|
|---|
| 171 | #
|
|---|
| 172 | TOOL_XGCCAMD64LINUX_COMPILE_AS_OUTPUT =
|
|---|
| 173 | TOOL_XGCCAMD64LINUX_COMPILE_AS_DEPEND =
|
|---|
| 174 | TOOL_XGCCAMD64LINUX_COMPILE_AS_DEPORD =
|
|---|
| 175 | define TOOL_XGCCAMD64LINUX_COMPILE_AS_CMDS
|
|---|
| 176 | $(QUIET)$(TOOL_XGCCAMD64LINUX_AS) -c\
|
|---|
| 177 | $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
|
|---|
| 178 | -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
|
|---|
| 179 | -o $(obj)\
|
|---|
| 180 | $(abspath $(source))
|
|---|
| 181 | endef
|
|---|
| 182 |
|
|---|
| 183 |
|
|---|
| 184 | ## Link library
|
|---|
| 185 | # @param $(target) Normalized main target name.
|
|---|
| 186 | # @param $(out) Library name.
|
|---|
| 187 | # @param $(objs) Object files to put in the library.
|
|---|
| 188 | # @param $(flags) Flags.
|
|---|
| 189 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 190 | # @param $(deps) Other dependencies.
|
|---|
| 191 | # @param $(othersrc) Unhandled sources.
|
|---|
| 192 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 193 | TOOL_XGCCAMD64LINUX_LINK_LIBRARY_OUTPUT = $(out).ar-script
|
|---|
| 194 | TOOL_XGCCAMD64LINUX_LINK_LIBRARY_DEPEND = $(othersrc)
|
|---|
| 195 | TOOL_XGCCAMD64LINUX_LINK_LIBRARY_DEPORD =
|
|---|
| 196 | ifeq ($(filter append-dash-n,$(KMK_FEATURES)),append-dash-n)
|
|---|
| 197 | define TOOL_XGCCAMD64LINUX_LINK_LIBRARY_CMDS
|
|---|
| 198 | $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)'
|
|---|
| 199 | $(QUIET)$(APPEND) -n $(out).ar-script \
|
|---|
| 200 | $(foreach o,$(objs), 'ADDMOD $(o)') \
|
|---|
| 201 | $(foreach o,$(othersrc), 'ADDLIB $(o)')
|
|---|
| 202 | $(QUIET)$(APPEND) $(out).ar-script 'SAVE'
|
|---|
| 203 | $(QUIET)$(APPEND) $(out).ar-script 'END'
|
|---|
| 204 | $(QUIET)$(TOOL_XGCCAMD64LINUX_AR) -M < $(out).ar-script
|
|---|
| 205 | endef
|
|---|
| 206 | else
|
|---|
| 207 | define TOOL_XGCCAMD64LINUX_LINK_LIBRARY_CMDS
|
|---|
| 208 | $(QUIET)$(APPEND) $(out).ar-script "CREATE $(out)"
|
|---|
| 209 | $(foreach o, $(objs)\
|
|---|
| 210 | ,$(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script "ADDMOD $(o)")
|
|---|
| 211 | $(foreach srclib, $(othersrc)\
|
|---|
| 212 | ,$(NL)$(TAB)$(QUIET)$(APPEND) $(out).ar-script "ADDLIB $(srclib)")
|
|---|
| 213 | $(QUIET)$(APPEND) $(out).ar-script "SAVE"
|
|---|
| 214 | $(QUIET)$(APPEND) $(out).ar-script "END"
|
|---|
| 215 | $(QUIET)$(TOOL_XGCCAMD64LINUX_AR) -M < $(out).ar-script
|
|---|
| 216 | endef
|
|---|
| 217 | endif
|
|---|
| 218 |
|
|---|
| 219 |
|
|---|
| 220 | ## Link program
|
|---|
| 221 | # @param $(target) Normalized main target name.
|
|---|
| 222 | # @param $(out) Program name.
|
|---|
| 223 | # @param $(objs) Object files to link together.
|
|---|
| 224 | # @param $(libs) Libraries to search.
|
|---|
| 225 | # @param $(libpath) Library search paths.
|
|---|
| 226 | # @param $(flags) Flags.
|
|---|
| 227 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 228 | # @param $(deps) Other dependencies.
|
|---|
| 229 | # @param $(othersrc) Unhandled sources.
|
|---|
| 230 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 231 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 232 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 233 | TOOL_XGCCAMD64LINUX_LINK_PROGRAM_OUTPUT = $(outbase).map
|
|---|
| 234 | TOOL_XGCCAMD64LINUX_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
|---|
| 235 | TOOL_XGCCAMD64LINUX_LINK_PROGRAM_DEPORD =
|
|---|
| 236 | define TOOL_XGCCAMD64LINUX_LINK_PROGRAM_CMDS
|
|---|
| 237 | $(QUIET)$(TOOL_XGCCAMD64LINUX_LD) $(flags) -o $(out) $(objs)\
|
|---|
| 238 | $(foreach p,$(libpath), -L$(p))\
|
|---|
| 239 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
|
|---|
| 240 | $(call TOOL_XGCCAMD64LINUX_LD_MAP,$(outbase).map)
|
|---|
| 241 | endef
|
|---|
| 242 |
|
|---|
| 243 |
|
|---|
| 244 | ## Link DLL
|
|---|
| 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_XGCCAMD64LINUX_LINK_DLL_OUTPUT = $(outbase).map
|
|---|
| 258 | TOOL_XGCCAMD64LINUX_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
|---|
| 259 | TOOL_XGCCAMD64LINUX_LINK_DLL_DEPORD =
|
|---|
| 260 | define TOOL_XGCCAMD64LINUX_LINK_DLL_CMDS
|
|---|
| 261 | $(QUIET)$(TOOL_XGCCAMD64LINUX_LD) $(TOOL_XGCCAMD64LINUX_LDFLAGS.dll) $(flags) -o $(out)\
|
|---|
| 262 | $(if $(filter-out win32 os2, $(BUILD_TARGET)),$(call TOOL_XGCCAMD64LINUX_LD_SONAME,$(target),$(out)))\
|
|---|
| 263 | $(objs)\
|
|---|
| 264 | $(foreach p,$(libpath), -L$(p))\
|
|---|
| 265 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
|
|---|
| 266 | $(call TOOL_XGCCAMD64LINUX_LD_MAP,$(outbase).map)
|
|---|
| 267 | endef
|
|---|
| 268 |
|
|---|
| 269 |
|
|---|
| 270 | ## Link system module (windows aka driver, linux aka kernel module)
|
|---|
| 271 | # @param $(target) Normalized main target name.
|
|---|
| 272 | # @param $(out) System module name.
|
|---|
| 273 | # @param $(objs) Object files to link together.
|
|---|
| 274 | # @param $(libs) Libraries to search.
|
|---|
| 275 | # @param $(libpath) Library search paths.
|
|---|
| 276 | # @param $(flags) Flags.
|
|---|
| 277 | # @param $(dirdep) Directory creation dependency.
|
|---|
| 278 | # @param $(deps) Other dependencies.
|
|---|
| 279 | # @param $(othersrc) Unhandled sources.
|
|---|
| 280 | # @param $(custom_pre) Custom step invoked before linking.
|
|---|
| 281 | # @param $(custom_post) Custom step invoked after linking.
|
|---|
| 282 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
|---|
| 283 | TOOL_XGCCAMD64LINUX_LINK_SYSMOD_OUTPUT = $(outbase).map
|
|---|
| 284 | TOOL_XGCCAMD64LINUX_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
|
|---|
| 285 | TOOL_XGCCAMD64LINUX_LINK_SYSMOD_DEPORD =
|
|---|
| 286 | define TOOL_XGCCAMD64LINUX_LINK_SYSMOD_CMDS
|
|---|
| 287 | $(QUIET)$(TOOL_XGCCAMD64LINUX_LD_SYSMOD) $(TOOL_XGCCAMD64LINUX_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\
|
|---|
| 288 | $(foreach p,$(libpath), -L$(p))\
|
|---|
| 289 | $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\
|
|---|
| 290 | $(call TOOL_XGCCAMD64LINUX_LD_SYSMOD_MAP,$(outbase).map)
|
|---|
| 291 | endef
|
|---|
| 292 |
|
|---|