Changeset 28990 in vbox for trunk/src/recompiler
- Timestamp:
- May 3, 2010 11:31:59 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 61013
- Location:
- trunk/src/recompiler
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/Makefile-old.kmk
r28987 r28990 1 1 # $Id$ 2 2 ## @file 3 # The Recompiler Sub-Makefile. 4 # 3 # The OLD Recompiler Sub-Makefile body. 4 # 5 5 6 # 6 7 # Copyright (C) 2006-2007 Oracle Corporation … … 16 17 17 18 18 SUB_DEPTH = ../..19 include $(KBUILD_PATH)/subheader.kmk20 19 21 20 # … … 273 272 endif 274 273 ifdef VBOX_WITHOUT_REM_LDR_CYCLE 275 VBoxREMImp_LDFLAGS.darwin 276 else 277 VBoxREMImp_LDFLAGS.darwin 278 endif 279 VBoxREMImp_LDFLAGS.l4 274 VBoxREMImp_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM.dylib 275 else 276 VBoxREMImp_LDFLAGS.darwin = -install_name $(subst @rpath,@executable_path,$(VBOX_DYLD_EXECUTABLE_PATH))/VBoxREM.dylib 277 endif 278 VBoxREMImp_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib 280 279 281 280 $$(PATH_VBoxREMImp)/VBoxREMImp.c: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.def $(VBOX_PATH_RECOMPILER_SRC)/Sun/deftoimp.sed $(MAKEFILE_CURRENT) | $$(dir $$@) … … 312 311 testmath_SOURCES = Sun/testmath.c 313 312 314 315 include $(KBUILD_PATH)/subfooter.kmk316 -
trunk/src/recompiler/Makefile.kmk
r28923 r28990 3 3 # The Recompiler Sub-Makefile. 4 4 # 5 # 6 # Copyright (C) 2006-2007 Oracle Corporation 5 6 # 7 # Copyright (C) 2006-2010 Oracle Corporation 7 8 # 8 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 19 20 include $(KBUILD_PATH)/subheader.kmk 20 21 22 ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86) 23 include $(PATH_SUB_CURRENT)/Makefile-old.kmk 24 else # new stuff 25 21 26 # 22 27 # Globals 23 28 # 24 VBOX_PATH_RECOMPILER_SRC := $(PATH_SUB_CURRENT) 25 26 # For 32-bit targets when enabled 64-bit guests we build 2 REM DLLs: 27 # with 64-bit support (slow and buggy at the moment) VBOXREM64 28 # only 32-bit support (faster, stable, but not suitable for 64-bit guests) VBOXREM32 29 # During the runtime, we load appropriate library from VBOXREM, depending on guest settings. 30 # 64-bit targets have 64-bit enabled REM by default, so is not part of this mess 31 ifeq ($(KBUILD_TARGET_ARCH),x86) 32 ifdef VBOX_WITH_64_BITS_GUESTS 33 VBOX_USE_REM64 := 1 34 endif 35 endif 36 29 VBOX_PATH_RECOMPILER_SRC := $(PATH_SUB_CURRENT) 37 30 # Workaround for darwin hell. 38 31 ifeq ($(KBUILD_TARGET),darwin) 39 VBOX_WITHOUT_REM_LDR_CYCLE = 1 40 endif 41 42 43 TEMPLATE_DUMMY = dummy template (move to kBuild) ## @todo Will be there in the next update, remove this. 44 45 if 0 46 # 47 # Template useful for forcing a specific gcc version in case it comes in handy. 48 # 49 TOOL_MYGCC = description 50 TOOL_MYGCC_EXTENDS = GCC3 51 TOOL_MYGCC_CC = $(firstword $(which gcc-4.2 gcc-4.1 gcc-3.4 gcc-3.4.6 gcc-3.3 gcc-3.3.6 gcc-3.2)) 52 TOOL_MYGCC_COMPILE_C_DEPEND = 53 TOOL_MYGCC_COMPILE_C_DEPORD = 54 TOOL_MYGCC_COMPILE_C_OUTPUT = 55 define TOOL_MYGCC_COMPILE_C_CMDS 56 $(QUIET)$(TOOL_MYGCC_CC) -c\ 57 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 58 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ 59 -o $(obj)\ 60 $(abspath $(source)) 61 endef 62 #Usage: target-i386/op_helper.c_TOOL = MYGCC 63 endif 64 65 ## @todo Note to self (bird): Convert this mess to use NAME (that property didn't exist when the REM_MOD hack was first made I think). 66 67 # For 64-bit Windows we currently use gcc (due to MSVC unaware of such a novel 68 # thing as C99, a lot of GCC extensions deployed by QEMU and calling convention 69 # differences) to cross-compile code to Linux/ELF and dynamically generate invocation wrappers. 70 if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), win.amd64) 71 VBOX_USE_REM2 = 1 72 REM_MOD := VBoxREM2 73 else 74 REM_MOD := VBoxREM 75 endif 76 77 # 78 # Target lists (some of them anyways). 79 # 80 ifdef VBOX_USE_REM2 81 SYSMODS += VBoxREM2 82 else ifndef VBOX_USE_REM64 83 DLLS += VBoxREM 84 endif 85 86 87 # 88 # The VBoxREM.[dll|so|..] or VBoxREM2.rel. 89 # 90 ifeq ($(KBUILD_TARGET),win) 91 $(REM_MOD)_TEMPLATE = DUMMY 92 $(REM_MOD)_TOOL.win.x86 = MINGW32 93 $(REM_MOD)_TOOL.win.amd64 = XGCCAMD64LINUX 94 $(REM_MOD)_SDKS.win.x86 = W32API 95 $(REM_MOD)_ASFLAGS = -x assembler-with-cpp 96 $(REM_MOD)_CFLAGS = -Wall -g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-shadow 97 $(REM_MOD)_CFLAGS.debug = -O0 98 $(REM_MOD)_CFLAGS.release += -fno-gcse -O2 99 $(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release) 100 $(REM_MOD)_DEFS += IN_RING3 $(ARCH_BITS_DEFS) 101 # workaround the regparm bug in gcc <= 3.3 102 $(REM_MOD)_DEFS.win.x86 += GCC_WITH_BUGGY_REGPARM 103 else # !win 104 $(REM_MOD)_TEMPLATE = VBOXR3NP 105 # workaround the regparm bug in gcc <= 3.3 106 $(REM_MOD)_DEFS = $(if $(VBOX_GCC_BUGGY_REGPARM),GCC_WITH_BUGGY_REGPARM,) 107 endif # !win 108 $(REM_MOD)_DEFS += IN_REM_R3 REM_INCLUDE_CPU_H 109 #$(REM_MOD)_DEFS += REM_PHYS_ADDR_IN_TLB 110 #$(REM_MOD)_DEFS += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. 111 #$(REM_MOD)_DEFS += DEBUG_TMP_LOGGING # log qemu parts to "/tmp/vbox-qemu.log" - does not work with VBoxREM2. 112 $(REM_MOD)_DEFS.linux = _GNU_SOURCE 32 VBOX_WITHOUT_REM_LDR_CYCLE := 1 33 endif 34 35 36 # 37 # The primary REM module definition. 38 # 39 # This is extended by one of the VBoxREM* modules below. Currently, this 40 # isn't done by inheritance because of some obscure bug wrt inherting from 41 # unused targets that I'm not going to fix now. 42 # 43 ifneq ($(KBUILD_TARGET),win) 44 VBoxRemPrimary_TEMPLATE = VBOXR3NP 45 # workaround the regparm bug in gcc <= 3.3 46 VBoxRemPrimary_DEFS = $(if $(VBOX_GCC_BUGGY_REGPARM),GCC_WITH_BUGGY_REGPARM,) 47 else 48 VBoxRemPrimary_TEMPLATE = DUMMY 49 VBoxRemPrimary_TOOL.win.x86 = MINGW32 50 VBoxRemPrimary_TOOL.win.amd64 = XGCCAMD64LINUX 51 VBoxRemPrimary_SDKS.win.x86 = W32API 52 VBoxRemPrimary_ASFLAGS = -x assembler-with-cpp 53 VBoxRemPrimary_CFLAGS = -Wall -g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-shadow 54 VBoxRemPrimary_CFLAGS.debug = -O0 55 VBoxRemPrimary_CFLAGS.release += -fno-gcse -O2 56 VBoxRemPrimary_CFLAGS.profile = $(VBoxRemPrimary_CFLAGS.release) 57 VBoxRemPrimary_DEFS += IN_RING3 $(ARCH_BITS_DEFS) 58 # workaround the regparm bug in gcc <= 3.3 59 VBoxRemPrimary_DEFS.win.x86 += GCC_WITH_BUGGY_REGPARM 60 endif # win 61 VBoxRemPrimary_DEFS += IN_REM_R3 REM_INCLUDE_CPU_H 62 #VBoxRemPrimary_DEFS += REM_PHYS_ADDR_IN_TLB 63 #VBoxRemPrimary_DEFS += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. 64 #VBoxRemPrimary_DEFS += DEBUG_TMP_LOGGING # log qemu parts to "/tmp/vbox-qemu.log" - does not work with VBoxREM2. 65 VBoxRemPrimary_DEFS.linux = _GNU_SOURCE 113 66 ifdef VBOX_SOLARIS_10 114 $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=10 115 else 116 $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=11 117 endif 118 $(REM_MOD)_DEFS.freebsd += _BSD 119 120 $(REM_MOD)_INCS = \ 67 VBoxRemPrimary_DEFS.solaris = HOST_SOLARIS=10 68 else 69 VBoxRemPrimary_DEFS.solaris = HOST_SOLARIS=11 70 endif 71 VBoxRemPrimary_DEFS.freebsd += _BSD 72 VBoxRemPrimary_DEFS.amd64 += __x86_64__ 73 VBoxRemPrimary_DEFS.x86 += __i386__ 74 75 VBoxRemPrimary_INCS = \ 121 76 Sun \ 122 77 target-i386 \ 123 78 tcg \ 124 79 fpu \ 125 $(PATH_ $(REM_MOD)) \80 $(PATH_VBoxRemPrimary) \ 126 81 $(PATH_ROOT)/src/VBox/VMM \ 127 82 . 128 ifn1of ($($(REM_MOD)_DEFS),DEBUG_TMP_LOGGING) 129 $(REM_MOD)_DEFS += LOG_USE_C99 130 $(REM_MOD)_INCS <= \ 131 Sun/crt 132 endif 133 134 $(REM_MOD)_SOURCES = \ 83 VBoxRemPrimary_INCS.amd64 += tcg/x86_64 84 VBoxRemPrimary_INCS.x86 += tcg/i386 85 ifn1of ($(VBoxRemPrimary_DEFS),DEBUG_TMP_LOGGING) 86 VBoxRemPrimary_DEFS += LOG_USE_C99 87 VBoxRemPrimary_INCS <= \ 88 Sun/crt 89 endif 90 91 VBoxRemPrimary_SOURCES = \ 135 92 VBoxRecompiler.c \ 136 93 cpu-exec.c \ … … 146 103 target-i386/helper.c \ 147 104 target-i386/translate.c 148 149 ifeq ($(KBUILD_TARGET_ARCH),amd64) 150 $(REM_MOD)_DEFS += __x86_64__ 151 $(REM_MOD)_INCS += tcg/x86_64 152 else 153 $(REM_MOD)_DEFS += __i386__ 154 $(REM_MOD)_INCS += tcg/i386 155 endif 156 157 ifneq ($(KBUILD_TARGET),freebsd) 158 $(REM_MOD)_SOURCES.debug += \ 105 VBoxRemPrimary_SOURCES.debug += \ 159 106 Sun/testmath.c 160 endif 161 $(REM_MOD)_SOURCES.win.x86 = $(PATH_VBoxREMImp)/VBoxREMWin.def 162 ifndef VBOX_USE_REM2 163 $(REM_MOD)_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS) 164 endif 165 ifdef VBOX_USE_REM2 166 ## @todo spread out where it belongs. 167 $(REM_MOD)_TEMPLATE = VBOXNOCRTGAS 168 $(REM_MOD)_DEFS += LOG_USE_C99 $(ARCH_BITS_DEFS) 169 170 # This doesn't fit in IPRT because it requires GAS and is LGPL. 171 $(REM_MOD)_SOURCES += \ 172 Sun/e_powl-$(KBUILD_TARGET_ARCH).S 173 174 $(REM_MOD)_INCS += \ 175 Sun/crt 176 $(REM_MOD)_SYSSUFF = .rel 177 endif 178 ifdef VBOX_USE_REM2 179 $(REM_MOD)_LIBS = \ 180 $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB) 181 else 182 $(REM_MOD)_LIBS = \ 107 VBoxRemPrimary_SOURCES.win.x86 = $(PATH_VBoxREMImp)/VBoxREMWin.def 108 109 VBoxRemPrimary_LIBS = \ 183 110 $(LIB_VMM) \ 184 111 $(LIB_RUNTIME) 185 $(REM_MOD)_LIBS.darwin = \ 186 $(TARGET_VBoxREMImp) 187 endif 188 189 ## @todo clean up this, there are some duplicates with the template here I think. 190 $(REM_MOD)_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(REM_MOD).dylib 191 $(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined 192 $(REM_MOD)_LDFLAGS.linux = $(VBOX_LD_as_needed) 193 $(REM_MOD)_LDFLAGS.os2 = -Zomf 194 $(REM_MOD)_LDFLAGS.debug = -g 195 $(REM_MOD)_LDFLAGS.solaris = -mimpure-text 196 197 198 if defined(VBOX_USE_REM2) || defined(VBOX_USE_REM64) 199 # 200 # The VBoxREM2, VBoxREM32 and VBoxREM64 wrapper. 201 # 202 DLLS += VBoxREMWrapper 203 VBoxREMWrapper_TEMPLATE = VBOXR3 204 VBoxREMWrapper_NAME = VBoxREM 205 VBoxREMWrapper_DEFS = IN_REM_R3 $(if $(VBOX_WITH_VMI),VBOX_WITH_VMI,) 206 ifdef VBOX_USE_REM64 207 VBoxREMWrapper_DEFS += VBOX_USE_BITNESS_SELECTOR 112 113 VBoxRemPrimary_LDFLAGS.solaris = -mimpure-text 114 VBoxRemPrimary_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS) 115 116 117 if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" 118 # 119 # VBoxREM2/VBoxRemPrimary - Currently only used by 64-bit Windows. 120 # (e_powl-xxx.S doesn't fit in IPRT because it requires GAS and is LGPL.) 121 # 122 SYSMODS += VBoxRemPrimary 123 VBoxRemPrimary_TEMPLATE = VBOXNOCRTGAS 124 VBoxRemPrimary_NAME = VBoxREM2 125 VBoxRemPrimary_DEFS += LOG_USE_C99 $(ARCH_BITS_DEFS) 126 VBoxRemPrimary_SOURCES += \ 127 Sun/e_powl-$(KBUILD_TARGET_ARCH).S 128 VBoxRemPrimary_INCS += \ 129 Sun/crt 130 VBoxRemPrimary_SYSSUFF = .rel 131 VBoxRemPrimary_LIBS = \ 132 $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB) 133 VBoxRemPrimary_POST_CMDS = $(NO_SUCH_VARIABLE) 134 135 else if "$(KBUILD_TARGET_ARCH)" == "x86" && defined(VBOX_WITH_64_BITS_GUESTS) 136 # 137 # For 32-bit targets when enabled 64-bit guests we build 2 REM DLLs: 138 # with 64-bit support (slow and buggy at the moment) VBOXREM64 139 # only 32-bit support (faster, stable, but not suitable for 64-bit guests) VBOXREM32 140 # During the runtime, we load appropriate library from VBOXREM, depending on guest settings. 141 # 64-bit targets have 64-bit enabled REM by default, so is not part of this mess 142 # 143 144 # 145 # VBoxREM32/VBoxRemPrimary 146 # 147 DLLS += VBoxRemPrimary 148 VBoxRemPrimary_NAME = VBoxREM32 149 VBoxRemPrimary_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM32.dylib 150 151 # 152 # VBoxREM64 153 # 154 DLLS += VBoxREM64 155 VBoxREM64_EXTENDS = VBoxRemPrimary 156 VBoxREM64_EXTENDS_BY = appending 157 VBoxREM64_NAME = VBoxREM64 158 VBoxREM64_DEFS = VBOX_ENABLE_VBOXREM64 159 VBoxREM64_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM64.dylib 160 161 ## @todo else ifdef VBOX_WITHOUT_REM_LDR_CYCLE 162 else 163 # 164 # VBoxREM/VBoxRemPrimary - Normal. 165 # 166 DLLS += VBoxRemPrimary 167 VBoxRemPrimary_NAME = VBoxREM 168 VBoxRemPrimary_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM.dylib 169 endif 170 171 172 ifn1of ($(DLLS),VBoxREM) 173 # 174 # VBoxREM - Wrapper for loading VBoxREM2, VBoxREM32 or VBoxREM64. 175 # 176 DLLS += VBoxREMWrapper 177 VBoxREMWrapper_TEMPLATE = VBOXR3 178 VBoxREMWrapper_NAME = VBoxREM 179 VBoxREMWrapper_DEFS = IN_REM_R3 $(if $(VBOX_WITH_VMI),VBOX_WITH_VMI,) 180 if "$(KBUILD_TARGET_ARCH)" == "x86" && defined(VBOX_WITH_64_BITS_GUESTS) 181 VBoxREMWrapper_DEFS += VBOX_USE_BITNESS_SELECTOR 208 182 endif 209 183 ifdef VBOX_WITHOUT_REM_LDR_CYCLE 210 VBoxREMWrapper_DEFS+= VBOX_WITHOUT_REM_LDR_CYCLE211 endif 212 VBoxREMWrapper_SOURCES= \213 VBoxREMWrapper.cpp214 if def VBOX_USE_REM2215 VBoxREMWrapper_SOURCES+= \216 VBoxREMWrapperA.asm217 endif 218 VBoxREMWrapper_LIBS= \184 VBoxREMWrapper_DEFS += VBOX_WITHOUT_REM_LDR_CYCLE 185 endif 186 VBoxREMWrapper_SOURCES = \ 187 VBoxREMWrapper.cpp 188 if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.amd64" 189 VBoxREMWrapper_SOURCES += \ 190 VBoxREMWrapperA.asm 191 endif 192 VBoxREMWrapper_LIBS = \ 219 193 $(LIB_RUNTIME) 220 194 ifndef VBOX_WITHOUT_REM_LDR_CYCLE 221 VBoxREMWrapper_LIBS += \ 222 $(LIB_VMM) 223 VBoxREMWrapper_LIBS.darwin += \ 224 $(TARGET_VBoxREMImp) 225 else 226 VBoxREMWrapper_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM.dylib 227 endif 228 endif 229 230 231 ifdef VBOX_USE_REM64 232 DLLS += VBoxREM32 233 VBoxREM32_EXTENDS = VBoxREM 234 VBoxREM32_EXTENDS_BY = appending 235 VBoxREM32_TEMPLATE = $(VBoxREM_TEMPLATE) 236 VBoxREM32_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM32.dylib 237 VBoxREM32_LIBS.darwin = $(LIB_REM) 238 239 DLLS += VBoxREM64 240 VBoxREM64_EXTENDS = VBoxREM 241 VBoxREM64_EXTENDS_BY = appending 242 VBoxREM64_TEMPLATE = $(VBoxREM_TEMPLATE) 243 VBoxREM64_DEFS = VBOX_ENABLE_VBOXREM64 244 VBoxREM64_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM64.dylib 245 VBoxREM64_LIBS.darwin = $(LIB_REM) 246 247 endif # USE_VBOXREM64 195 VBoxREMWrapper_LIBS += \ 196 $(LIB_VMM) 197 VBoxREMWrapper_LIBS.darwin += \ 198 $(TARGET_VBoxREMImp) 199 endif 200 VBoxREMWrapper_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM.dylib 201 endif 248 202 249 203 … … 273 227 endif 274 228 ifdef VBOX_WITHOUT_REM_LDR_CYCLE 275 VBoxREMImp_LDFLAGS.darwin 276 else 277 VBoxREMImp_LDFLAGS.darwin 278 endif 279 VBoxREMImp_LDFLAGS.l4 229 VBoxREMImp_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM.dylib 230 else 231 VBoxREMImp_LDFLAGS.darwin = -install_name $(subst @rpath,@executable_path,$(VBOX_DYLD_EXECUTABLE_PATH))/VBoxREM.dylib 232 endif 233 VBoxREMImp_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib 280 234 281 235 $$(PATH_VBoxREMImp)/VBoxREMImp.c: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.def $(VBOX_PATH_RECOMPILER_SRC)/Sun/deftoimp.sed $(MAKEFILE_CURRENT) | $$(dir $$@) … … 314 268 315 269 include $(KBUILD_PATH)/subfooter.kmk 316 270 endif # new stuff 271
Note:
See TracChangeset
for help on using the changeset viewer.