Skip to contentSkip to conversation

Use HOST_CC instead of CC on TCG only targets

RFC PATCH In review Aurelien Jarno 2 participants 2 messages May 8, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 Use HOST_CC instead of CC on TCG only targets

Now that we have 3 TCG only targets (arm, cris, sparc) and 1 being actively converted (mips), I think it does not make sense anymore to build those targets with gcc-3.4.

For example on hppa, gcc-3.4 is buggy and unable to compile target-sparc/softmmu.c. OTOH, I haven't found any noticeable speed improvement comparing gcc-3.4 and gcc-4.3.

The patch below is maybe a bit hackish, but enables the use of the default compiler for TCG only targets. I am not sure it is worth doing a more complex patch given than all targets are supposed to be converted to TCG sooner or later.

Makefile.target +4 -0
index bb1f3e5..95e4152 100644
@@ -1,5 +1,9 @@
 include config.mak
 
+ifdef CONFIG_NO_DYNGEN_OP
+CC=$(HOST_CC)
+endif
+
 TARGET_BASE_ARCH:=$(TARGET_ARCH)
 ifeq ($(TARGET_ARCH), x86_64)
 TARGET_BASE_ARCH:=i386
Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#1 lore raw
Quoted 3 lines · Aurelien Jarno

Now that we have 3 TCG only targets (arm, cris, sparc) and 1 being actively converted (mips), I think it does not make sense anymore to build those targets with gcc-3.4.

FTR I'm (slowly) working on converting m68k.

Makefile.target line 5

Quoted 3 lines
Makefile.target +3 -0
+ifdef CONFIG_NO_DYNGEN_OP
+CC=$(HOST_CC)
+endif

This breaks cross builds. $(HOST_CC) is the compiler for the build system (yes, it's mis-named).

Paul