changeset 2409:020e67783308

. Changes to the BSD specific files equivalent to the Linux specific changes.
author Greg Lewis <glewis@eyesbeyond.com>
date Sat, 09 Apr 2011 20:31:16 -0700
parents 34736b0e59c1
children b360e98a416a
files make/bsd/makefiles/adlc.make make/bsd/makefiles/gcc.make make/bsd/makefiles/rules.make make/bsd/makefiles/sparcWorks.make
diffstat 4 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/adlc.make	Sat Apr 09 10:10:24 2011 -0700
+++ b/make/bsd/makefiles/adlc.make	Sat Apr 09 20:31:16 2011 -0700
@@ -102,7 +102,7 @@
 
 $(EXEC) : $(OBJECTS)
 	@echo Making adlc
-	$(QUIETLY) $(LINK_NOPROF.CC) -o $(EXEC) $(OBJECTS)
+	$(QUIETLY) $(HOST.LINK_NOPROF.CC) -o $(EXEC) $(OBJECTS)
 
 # Random dependencies:
 $(OBJECTS): opcodes.hpp classes.hpp adlc.hpp adlcVMDeps.hpp adlparse.hpp archDesc.hpp arena.hpp dict2.hpp filebuff.hpp forms.hpp formsopt.hpp formssel.hpp
@@ -204,14 +204,14 @@
 $(OUTDIR)/%.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+	$(QUIETLY) $(HOST.COMPILE.CC) -o $@ $< $(COMPILE_DONE)
 
 # Some object files are given a prefix, to disambiguate
 # them from objects of the same name built for the VM.
 $(OUTDIR)/adlc-%.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+	$(QUIETLY) $(HOST.COMPILE.CC) -o $@ $< $(COMPILE_DONE)
 
 # #########################################################################
 
--- a/make/bsd/makefiles/gcc.make	Sat Apr 09 10:10:24 2011 -0700
+++ b/make/bsd/makefiles/gcc.make	Sat Apr 09 20:31:16 2011 -0700
@@ -33,10 +33,14 @@
 CXX = $(ALT_COMPILER_PATH)/g++
 CPP = $(ALT_COMPILER_PATH)/g++
 CC  = $(ALT_COMPILER_PATH)/gcc
+HOSTCPP = g++
+HOSTCC  = gcc
 else
 CXX ?= g++
 CPP = $(CXX)
 CC  ?= gcc
+HOSTCPP = $(CPP)
+HOSTCC  = $(CPP)
 endif
 
 AS   = $(CC) -c -x assembler-with-cpp
--- a/make/bsd/makefiles/rules.make	Sat Apr 09 10:10:24 2011 -0700
+++ b/make/bsd/makefiles/rules.make	Sat Apr 09 20:31:16 2011 -0700
@@ -55,6 +55,14 @@
 LINK_LIB.CC     = $(CCC) $(LFLAGS) $(SHARED_FLAG)
 PREPROCESS.CC   = $(CC_COMPILE) -E
 
+# cross compiling the jvm with c2 requires host compilers to build
+# adlc tool
+
+HOST.CC_COMPILE      = $(HOSTCPP) $(CPPFLAGS) $(CFLAGS)
+HOST.COMPILE.CC      = $(HOST.CC_COMPILE) -c
+HOST.LINK_NOPROF.CC  = $(HOSTCPP) $(LFLAGS) $(AOUT_FLAGS)
+
+
 # Effect of REMOVE_TARGET is to delete out-of-date files during "gnumake -k".
 REMOVE_TARGET   = rm -f $@
 
--- a/make/bsd/makefiles/sparcWorks.make	Sat Apr 09 10:10:24 2011 -0700
+++ b/make/bsd/makefiles/sparcWorks.make	Sat Apr 09 20:31:16 2011 -0700
@@ -29,6 +29,9 @@
 CC  = cc
 AS  = $(CC) -c
 
+HOSTCPP = $(CPP)
+HOSTCC  = $(CC)
+
 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
 ARCHFLAG/i486    = -m32
 ARCHFLAG/amd64   = -m64