Changeset 1064 for trunk/kBuild/tools/GCC64.kmk
- Timestamp:
- Jul 10, 2007, 5:06:17 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/GCC64.kmk
r1062 r1064 2 2 ## @file 3 3 # 4 # kBuild Tool Config - Generic 32-bit GCC v3.2.x or later Using The System GCC.4 # kBuild Tool Config - Generic 64-bit GCC v3.2.x or later Using The System GCC. 5 5 # 6 6 # Copyright (c) 2004-2007 knut st. osmundsen <bird-kBuild-spam@anduin.net> … … 25 25 # 26 26 27 TOOL_GCC 32 := Generic 32-bit GCC v3.2.x or later Using The System GCC. \27 TOOL_GCC64 := Generic 64-bit GCC v3.2.x or later Using The System GCC. \ 28 28 More or less Linux/ELF specfic. 29 29 30 30 # Tool Specific Properties 31 TOOL_GCC 32_CC ?= gcc$(HOSTSUFF_EXE) -m3232 TOOL_GCC 32_CXX ?= g++$(HOSTSUFF_EXE) -m3233 TOOL_GCC 32_AS ?= gcc$(HOSTSUFF_EXE) -m3234 TOOL_GCC 32_AR ?= ar$(HOSTSUFF_EXE)35 TOOL_GCC 32_LD ?= gcc$(HOSTSUFF_EXE) -m3236 TOOL_GCC 32_LD_SYSMOD ?= ld$(HOSTSUFF_EXE)37 ifndef TOOL_GCC 32_LDFLAGS.$(BUILD_TARGET)38 TOOL_GCC 32_LDFLAGS.dll ?= -shared31 TOOL_GCC64_CC ?= gcc$(HOSTSUFF_EXE) -m64 32 TOOL_GCC64_CXX ?= g++$(HOSTSUFF_EXE) -m64 33 TOOL_GCC64_AS ?= gcc$(HOSTSUFF_EXE) -m64 34 TOOL_GCC64_AR ?= ar$(HOSTSUFF_EXE) 35 TOOL_GCC64_LD ?= gcc$(HOSTSUFF_EXE) -m64 36 TOOL_GCC64_LD_SYSMOD ?= ld$(HOSTSUFF_EXE) 37 ifndef TOOL_GCC64_LDFLAGS.$(BUILD_TARGET) 38 TOOL_GCC64_LDFLAGS.dll ?= -shared 39 39 else 40 TOOL_GCC 32_LDFLAGS.dll ?= $(TOOL_GCC32_LDFLAGS.$(BUILD_TARGET))41 endif 42 TOOL_GCC 32_LDFLAGS.sysmod ?= -r -m elf_i38643 TOOL_GCC 32_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(BUILD_TARGET).$(BUILD_TYPE)) $($(1)_SONAME.$(BUILD_TARGET)) $($(1)_SONAME.$(BUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))40 TOOL_GCC64_LDFLAGS.dll ?= $(TOOL_GCC64_LDFLAGS.$(BUILD_TARGET)) 41 endif 42 TOOL_GCC64_LDFLAGS.sysmod ?= -r -m elf_x86_64 43 TOOL_GCC64_LD_SONAME ?= -Wl,-soname=$(firstword $($(1)_SONAME.$(BUILD_TARGET).$(BUILD_TYPE)) $($(1)_SONAME.$(BUILD_TARGET)) $($(1)_SONAME.$(BUILD_TYPE)) $($(1)_SONAME) $(notdir $(2))) 44 44 ifeq ($(BUILD_TARGET),os2) 45 TOOL_GCC 32_LD_MAP ?= -Zmap=$(1)45 TOOL_GCC64_LD_MAP ?= -Zmap=$(1) 46 46 else 47 TOOL_GCC 32_LD_MAP ?= -Wl,-Map -Wl,$(1) -Wl,--cref47 TOOL_GCC64_LD_MAP ?= -Wl,-Map -Wl,$(1) -Wl,--cref 48 48 endif 49 49 ifeq ($(BUILD_TARGET),os2) 50 TOOL_GCC 32_LD_SYSMOD_MAP ?= -Zmap=$(1)50 TOOL_GCC64_LD_SYSMOD_MAP ?= -Zmap=$(1) 51 51 else 52 TOOL_GCC 32_LD_SYSMOD_MAP ?= -Map $(1) --cref52 TOOL_GCC64_LD_SYSMOD_MAP ?= -Map $(1) --cref 53 53 endif 54 54 ifdef SLKRUNS 55 TOOL_GCC 32_CC += -fmessage-length=056 TOOL_GCC 32_CXX += -fmessage-length=055 TOOL_GCC64_CC += -fmessage-length=0 56 TOOL_GCC64_CXX += -fmessage-length=0 57 57 endif 58 58 59 59 # General Properties used by kBuild 60 TOOL_GCC 32_COBJSUFF ?= .o61 TOOL_GCC 32_CFLAGS ?=62 TOOL_GCC 32_CFLAGS.debug ?= -g63 TOOL_GCC 32_CFLAGS.profile ?= -O2 #-g -pg64 TOOL_GCC 32_CFLAGS.release ?= -O265 TOOL_GCC 32_CINCS ?=66 TOOL_GCC 32_CDEFS ?=67 68 TOOL_GCC 32_CXXOBJSUFF ?= .o69 TOOL_GCC 32_CXXOBJSUFF ?= .o70 TOOL_GCC 32_CXXFLAGS ?=71 TOOL_GCC 32_CXXFLAGS.debug ?= -g72 TOOL_GCC 32_CXXFLAGS.profile ?= -O2 #-g -pg73 TOOL_GCC 32_CXXFLAGS.release ?= -O274 TOOL_GCC 32_CXXINCS ?=75 TOOL_GCC 32_CXXDEFS ?=76 77 TOOL_GCC 32_ASFLAGS ?= -x assembler-with-cpp78 TOOL_GCC 32_ASFLAGS.debug ?= -g79 TOOL_GCC 32_ASFLAGS.profile ?= -g80 TOOL_GCC 32_ASOBJSUFF ?= .o81 82 TOOL_GCC 32_ARFLAGS ?= cr83 TOOL_GCC 32_ARLIBSUFF ?= .a84 85 TOOL_GCC 32_LDFLAGS ?=86 TOOL_GCC 32_LDFLAGS.debug ?= -g87 TOOL_GCC 32_LDFLAGS.profile ?= -g60 TOOL_GCC64_COBJSUFF ?= .o 61 TOOL_GCC64_CFLAGS ?= 62 TOOL_GCC64_CFLAGS.debug ?= -g 63 TOOL_GCC64_CFLAGS.profile ?= -O2 #-g -pg 64 TOOL_GCC64_CFLAGS.release ?= -O2 65 TOOL_GCC64_CINCS ?= 66 TOOL_GCC64_CDEFS ?= 67 68 TOOL_GCC64_CXXOBJSUFF ?= .o 69 TOOL_GCC64_CXXOBJSUFF ?= .o 70 TOOL_GCC64_CXXFLAGS ?= 71 TOOL_GCC64_CXXFLAGS.debug ?= -g 72 TOOL_GCC64_CXXFLAGS.profile ?= -O2 #-g -pg 73 TOOL_GCC64_CXXFLAGS.release ?= -O2 74 TOOL_GCC64_CXXINCS ?= 75 TOOL_GCC64_CXXDEFS ?= 76 77 TOOL_GCC64_ASFLAGS ?= -x assembler-with-cpp 78 TOOL_GCC64_ASFLAGS.debug ?= -g 79 TOOL_GCC64_ASFLAGS.profile ?= -g 80 TOOL_GCC64_ASOBJSUFF ?= .o 81 82 TOOL_GCC64_ARFLAGS ?= cr 83 TOOL_GCC64_ARLIBSUFF ?= .a 84 85 TOOL_GCC64_LDFLAGS ?= 86 TOOL_GCC64_LDFLAGS.debug ?= -g 87 TOOL_GCC64_LDFLAGS.profile ?= -g 88 88 89 89 … … 101 101 # @param $(outbase) Output basename (full). Use this for list files and such. 102 102 # @param $(objsuff) Object suffix. 103 TOOL_GCC 32_COMPILE_C_DEPEND =104 TOOL_GCC 32_COMPILE_C_DEPORD =103 TOOL_GCC64_COMPILE_C_DEPEND = 104 TOOL_GCC64_COMPILE_C_DEPORD = 105 105 ifdef USE_KOBJCACHE 106 TOOL_GCC 32_COMPILE_C_USES_KOBJCACHE = 1107 TOOL_GCC 32_COMPILE_C_OUTPUT = $(outbase).i108 define TOOL_GCC 32_COMPILE_C_CMDS106 TOOL_GCC64_COMPILE_C_USES_KOBJCACHE = 1 107 TOOL_GCC64_COMPILE_C_OUTPUT = $(outbase).i 108 define TOOL_GCC64_COMPILE_C_CMDS 109 109 $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\ 110 110 --kObjCache-cpp $(outbase).i\ 111 $(TOOL_GCC 32_CC) -E -o -\111 $(TOOL_GCC64_CC) -E -o -\ 112 112 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 113 113 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ 114 114 $(abspath $(source))\ 115 115 --kObjCache-cc $(obj)\ 116 $(TOOL_GCC 32_CC) -c\116 $(TOOL_GCC64_CC) -c\ 117 117 $(flags) -fpreprocessed -x c\ 118 118 -o $(obj)\ … … 120 120 endef 121 121 else # !USE_KOBJCACHE 122 TOOL_GCC 32_COMPILE_C_OUTPUT =123 define TOOL_GCC 32_COMPILE_C_CMDS124 $(QUIET)$(TOOL_GCC 32_CC) -c\122 TOOL_GCC64_COMPILE_C_OUTPUT = 123 define TOOL_GCC64_COMPILE_C_CMDS 124 $(QUIET)$(TOOL_GCC64_CC) -c\ 125 125 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 126 126 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ … … 143 143 # @param $(outbase) Output basename (full). Use this for list files and such. 144 144 # @param $(objsuff) Object suffix. 145 TOOL_GCC 32_COMPILE_CXX_DEPEND =146 TOOL_GCC 32_COMPILE_CXX_DEPORD =145 TOOL_GCC64_COMPILE_CXX_DEPEND = 146 TOOL_GCC64_COMPILE_CXX_DEPORD = 147 147 ifdef USE_KOBJCACHE 148 TOOL_GCC 32_COMPILE_CXX_USES_KOBJCACHE = 1149 TOOL_GCC 32_COMPILE_CXX_OUTPUT = $(outbase).ii150 define TOOL_GCC 32_COMPILE_CXX_CMDS148 TOOL_GCC64_COMPILE_CXX_USES_KOBJCACHE = 1 149 TOOL_GCC64_COMPILE_CXX_OUTPUT = $(outbase).ii 150 define TOOL_GCC64_COMPILE_CXX_CMDS 151 151 $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\ 152 152 --kObjCache-cpp $(outbase).ii\ 153 $(TOOL_GCC 32_CXX) -E -o -\153 $(TOOL_GCC64_CXX) -E -o -\ 154 154 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 155 155 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ 156 156 $(abspath $(source))\ 157 157 --kObjCache-cc $(obj)\ 158 $(TOOL_GCC 32_CXX) -c\158 $(TOOL_GCC64_CXX) -c\ 159 159 $(flags) -fpreprocessed -x c++\ 160 160 -o $(obj)\ … … 163 163 else # !USE_KOBJCACHE 164 164 165 TOOL_GCC 32_COMPILE_CXX_OUTPUT =166 define TOOL_GCC 32_COMPILE_CXX_CMDS167 $(QUIET)$(TOOL_GCC 32_CXX) -c\165 TOOL_GCC64_COMPILE_CXX_OUTPUT = 166 define TOOL_GCC64_COMPILE_CXX_CMDS 167 $(QUIET)$(TOOL_GCC64_CXX) -c\ 168 168 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 169 169 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ … … 187 187 # @param $(objsuff) Object suffix. 188 188 # 189 TOOL_GCC 32_COMPILE_AS_OUTPUT =190 TOOL_GCC 32_COMPILE_AS_DEPEND =191 TOOL_GCC 32_COMPILE_AS_DEPORD =192 define TOOL_GCC 32_COMPILE_AS_CMDS193 $(QUIET)$(TOOL_GCC 32_AS) -c\189 TOOL_GCC64_COMPILE_AS_OUTPUT = 190 TOOL_GCC64_COMPILE_AS_DEPEND = 191 TOOL_GCC64_COMPILE_AS_DEPORD = 192 define TOOL_GCC64_COMPILE_AS_CMDS 193 $(QUIET)$(TOOL_GCC64_AS) -c\ 194 194 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 195 195 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ … … 208 208 # @param $(othersrc) Unhandled sources. 209 209 # @param $(outbase) Output basename (full). Use this for list files and such. 210 TOOL_GCC 32_LINK_LIBRARY_OUTPUT = $(out).ar-script211 TOOL_GCC 32_LINK_LIBRARY_DEPEND = $(othersrc)212 TOOL_GCC 32_LINK_LIBRARY_DEPORD =213 define TOOL_GCC 32_LINK_LIBRARY_CMDS210 TOOL_GCC64_LINK_LIBRARY_OUTPUT = $(out).ar-script 211 TOOL_GCC64_LINK_LIBRARY_DEPEND = $(othersrc) 212 TOOL_GCC64_LINK_LIBRARY_DEPORD = 213 define TOOL_GCC64_LINK_LIBRARY_CMDS 214 214 $(QUIET)$(APPEND) $(out).ar-script 'CREATE $(out)' 215 215 $(QUIET)$(APPEND) -n $(out).ar-script \ … … 218 218 $(QUIET)$(APPEND) $(out).ar-script 'SAVE' 219 219 $(QUIET)$(APPEND) $(out).ar-script 'END' 220 $(QUIET)$(TOOL_GCC 32_AR) -M < $(out).ar-script220 $(QUIET)$(TOOL_GCC64_AR) -M < $(out).ar-script 221 221 endef 222 222 … … 235 235 # @param $(custom_post) Custom step invoked after linking. 236 236 # @param $(outbase) Output basename (full). Use this for list files and such. 237 TOOL_GCC 32_LINK_PROGRAM_OUTPUT =238 TOOL_GCC 32_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map239 TOOL_GCC 32_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))240 TOOL_GCC 32_LINK_PROGRAM_DEPORD =241 define TOOL_GCC 32_LINK_PROGRAM_CMDS242 $(QUIET)$(TOOL_GCC 32_LD) $(flags) -o $(out) $(objs)\237 TOOL_GCC64_LINK_PROGRAM_OUTPUT = 238 TOOL_GCC64_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map 239 TOOL_GCC64_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 240 TOOL_GCC64_LINK_PROGRAM_DEPORD = 241 define TOOL_GCC64_LINK_PROGRAM_CMDS 242 $(QUIET)$(TOOL_GCC64_LD) $(flags) -o $(out) $(objs)\ 243 243 $(foreach p,$(libpath), -L$(p))\ 244 244 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\ 245 $(call TOOL_GCC 32_LD_MAP,$(outbase).map)245 $(call TOOL_GCC64_LD_MAP,$(outbase).map) 246 246 endef 247 247 … … 260 260 # @param $(custom_post) Custom step invoked after linking. 261 261 # @param $(outbase) Output basename (full). Use this for list files and such. 262 TOOL_GCC 32_LINK_DLL_OUTPUT =263 TOOL_GCC 32_LINK_DLL_OUTPUT_MAYBE = $(outbase).map264 TOOL_GCC 32_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))265 TOOL_GCC 32_LINK_DLL_DEPORD =266 define TOOL_GCC 32_LINK_DLL_CMDS267 $(QUIET)$(TOOL_GCC 32_LD) $(TOOL_GCC32_LDFLAGS.dll) $(flags) -o $(out)\268 $(if $(filter-out win 32 os2, $(BUILD_TARGET)),$(call TOOL_GCC32_LD_SONAME,$(target),$(out)))\262 TOOL_GCC64_LINK_DLL_OUTPUT = 263 TOOL_GCC64_LINK_DLL_OUTPUT_MAYBE = $(outbase).map 264 TOOL_GCC64_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 265 TOOL_GCC64_LINK_DLL_DEPORD = 266 define TOOL_GCC64_LINK_DLL_CMDS 267 $(QUIET)$(TOOL_GCC64_LD) $(TOOL_GCC64_LDFLAGS.dll) $(flags) -o $(out)\ 268 $(if $(filter-out win os2, $(BUILD_TARGET)),$(call TOOL_GCC64_LD_SONAME,$(target),$(out)))\ 269 269 $(objs)\ 270 270 $(foreach p,$(libpath), -L$(p))\ 271 271 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\ 272 $(call TOOL_GCC 32_LD_MAP,$(outbase).map)272 $(call TOOL_GCC64_LD_MAP,$(outbase).map) 273 273 endef 274 274 … … 287 287 # @param $(custom_post) Custom step invoked after linking. 288 288 # @param $(outbase) Output basename (full). Use this for list files and such. 289 TOOL_GCC 32_LINK_SYSMOD_OUTPUT =290 TOOL_GCC 32_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map291 TOOL_GCC 32_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))292 TOOL_GCC 32_LINK_SYSMOD_DEPORD =293 define TOOL_GCC 32_LINK_SYSMOD_CMDS294 $(QUIET)$(TOOL_GCC 32_LD_SYSMOD) $(TOOL_GCC32_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\289 TOOL_GCC64_LINK_SYSMOD_OUTPUT = 290 TOOL_GCC64_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).map 291 TOOL_GCC64_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) 292 TOOL_GCC64_LINK_SYSMOD_DEPORD = 293 define TOOL_GCC64_LINK_SYSMOD_CMDS 294 $(QUIET)$(TOOL_GCC64_LD_SYSMOD) $(TOOL_GCC64_LDFLAGS.sysmod) $(flags) -o $(out) $(objs)\ 295 295 $(foreach p,$(libpath), -L$(p))\ 296 296 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))\ 297 $(call TOOL_GCC 32_LD_SYSMOD_MAP,$(outbase).map)298 endef 299 297 $(call TOOL_GCC64_LD_SYSMOD_MAP,$(outbase).map) 298 endef 299
Note:
See TracChangeset
for help on using the changeset viewer.