aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/rtl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-03-11 15:41:45 +0100
committerSverker Eriksson <[email protected]>2011-11-09 20:51:05 +0100
commit79e5d78244143e0c891f87e9971c9598c4cdea4c (patch)
tree856a89b68f4dc2704bf4f82310e6b541468c395e /lib/hipe/rtl
parent37d25fa469a6a084737abf8f980c1e4bb34ca9d9 (diff)
downloadotp-79e5d78244143e0c891f87e9971c9598c4cdea4c.tar.gz
otp-79e5d78244143e0c891f87e9971c9598c4cdea4c.tar.bz2
otp-79e5d78244143e0c891f87e9971c9598c4cdea4c.zip
erts,hipe: Limited support for hipe cross compilation
Normally hipe assumes that generated native code will be executed on the same emulator as the hipe compiler is running on. This commit allows you to build a hipe "cross-compiler" for a different configured emulator (but for same architecture). Example: > cd lib/hipe > make clean > make XCOMP=yes FLAVOR=smp TYPE=debug This hipe compiler will generate code to be executed on the debug compiled smp-emulator at $ERL_TOP.
Diffstat (limited to 'lib/hipe/rtl')
-rw-r--r--lib/hipe/rtl/Makefile26
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile
index 55d20af8af..690045b978 100644
--- a/lib/hipe/rtl/Makefile
+++ b/lib/hipe/rtl/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2001-2010. All Rights Reserved.
+# Copyright Ericsson AB 2001-2011. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -108,10 +108,30 @@ release_spec: opt
release_docs_spec:
-HIPE_MKLITERALS=$(ERL_TOP)/bin/$(TARGET)/hipe_mkliterals
+ifeq ($(TYPE),debug)
+TYPE_STR=.debug
+else
+TYPE_STR=
+endif
+
+ifeq ($(FLAVOR),smp)
+FLAVOR_STR=.smp
+else
+FLAVOR_STR=
+endif
+
+ifeq ($(XCOMP),yes)
+MKLIT_FLAGS= -x
+else
+MKLIT_FLAGS=
+endif
+
+
+HIPE_MKLITERALS=$(ERL_TOP)/bin/$(TARGET)/hipe_mkliterals$(TYPE_STR)$(FLAVOR_STR)
+
hipe_literals.hrl: $(HIPE_MKLITERALS)
- $(HIPE_MKLITERALS) -e > hipe_literals.hrl
+ $(HIPE_MKLITERALS) $(MKLIT_FLAGS) -e > hipe_literals.hrl
# Need to generate hipe.hrl from one and only one target in one and only
# one makefile; otherwise, clearmake will force rebuilds of hipe over and