summaryrefslogtreecommitdiffstats
path: root/tools/build/rules.dir
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-01-04 14:32:19 -0600
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-03-12 12:14:37 -0500
commit8a8313f461fbb08f6a5837535b25017ba4c242c8 (patch)
treee7ba91a6984f975e7a931d580c31410e7759bfa4 /tools/build/rules.dir
parent8f4e9c367335ce0aabdf7066a921f2fe8cbe784b (diff)
downloadtalos-hcode-8a8313f461fbb08f6a5837535b25017ba4c242c8.tar.gz
talos-hcode-8a8313f461fbb08f6a5837535b25017ba4c242c8.zip
Allow split of HOST and TARGET toolchain binary names03-26-2018
Diffstat (limited to 'tools/build/rules.dir')
-rw-r--r--tools/build/rules.dir/cc.rules.mk14
-rw-r--r--tools/build/rules.dir/mflags.env.mk10
2 files changed, 17 insertions, 7 deletions
diff --git a/tools/build/rules.dir/cc.rules.mk b/tools/build/rules.dir/cc.rules.mk
index 173a1fdb..6d70bc9d 100644
--- a/tools/build/rules.dir/cc.rules.mk
+++ b/tools/build/rules.dir/cc.rules.mk
@@ -41,7 +41,7 @@ else
$(C2) " C++$(1) $$(@F)"
endif
$(C1) mkdir -p $$(@D)
- $(C1) $$($(1)_PREFIX)$$(CXX) $$(COMMONFLAGS) $$(CXXFLAGS) \
+ $(C1) $$($(1)_PREFIX)$$($(1)_CXX) $$(COMMONFLAGS) $$(CXXFLAGS) \
$$(LOCALCOMMONFLAGS) $$(LOCALCXXFLAGS) \
$$< -c -o $$@
endef
@@ -53,7 +53,7 @@ else
$(C2) " CC$(1) $$(@F)"
endif
$(C1) mkdir -p $$(@D)
- $(C1) $$($(1)_PREFIX)$$(CC) $$(COMMONFLAGS) $$(CFLAGS) \
+ $(C1) $$($(1)_PREFIX)$$($(1)_CC) $$(COMMONFLAGS) $$(CFLAGS) \
$$(LOCALCOMMONFLAGS) $$(LOCALCFLAGS) \
$$< -c -o $$@
endef
@@ -65,7 +65,7 @@ else
$(C2) " LDSO$(1) $$(@F)"
endif
$(C1) mkdir -p $$(@D)
- $(C1) $$($(1)_PREFIX)$$(CXX) $$(LDFLAGS) \
+ $(C1) $$($(1)_PREFIX)$$($(1)_CXX) $$(LDFLAGS) \
-shared $$(addprefix -L,$(FAPI2_PLAT_LIB)) $$(LOCALLDFLAGS) \
$$(patsubst lib%.so,-l%, $$(notdir $$(filter %.so, $$^))) \
-Wl,--whole-archive \
@@ -83,7 +83,7 @@ else
$(C2) " LD$(1) $$(@F)"
endif
$(C1) mkdir -p $$(@D)
- $(C1) $$($(1)_PREFIX)$$(CXX) $$(LDFLAGS) \
+ $(C1) $$($(1)_PREFIX)$$($(1)_CXX) $$(LDFLAGS) \
$$(addprefix -L,$(FAPI2_PLAT_LIB)) $$(LOCALLDFLAGS) \
$$(patsubst lib%.so,-l%, $$(notdir $$(filter %.so, $$^))) \
-Wl,--whole-archive \
@@ -101,7 +101,7 @@ else
endif
$(C1) mkdir -p $$(@D)
$(C1) rm -f $$@
- $(C1) $$($(1)_PREFIX)$$(AR) rcs $$@ $$^
+ $(C1) $$($(1)_PREFIX)$$($(1)_AR) rcs $$@ $$^
endef
define __CALL_CXX_DEP
@@ -111,7 +111,7 @@ else
$(C2) " DEP$(1) $$(@F:.o=.dep)"
endif
$(C1) mkdir -p $$(@D)
- $(C1) $$($(1)_PREFIX)$$(CXX) -M -MP -MT $$@ \
+ $(C1) $$($(1)_PREFIX)$$($(1)_CXX) -M -MP -MT $$@ \
$$(COMMONFLAGS) $$(CXXFLAGS) \
$$(LOCALCOMMONFLAGS) $$(LOCALCXXFLAGS) \
$$< -o $$(subst .o,.dep,$$@)
@@ -124,7 +124,7 @@ else
$(C2) " DEP$(1) $$(@F:.o=.dep)"
endif
$(C1) mkdir -p $$(@D)
- $(C1) $$($(1)_PREFIX)$$(CC) -M -MP -MT $$@ \
+ $(C1) $$($(1)_PREFIX)$$($(1)_CC) -M -MP -MT $$@ \
$$(COMMONFLAGS) $$(CFLAGS) \
$$(LOCALCOMMONFLAGS) $$(LOCALCFLAGS) \
$$< -o $$(subst .o,.dep,$$@)
diff --git a/tools/build/rules.dir/mflags.env.mk b/tools/build/rules.dir/mflags.env.mk
index 77aaad6f..5a1a2225 100644
--- a/tools/build/rules.dir/mflags.env.mk
+++ b/tools/build/rules.dir/mflags.env.mk
@@ -56,3 +56,13 @@ CC?=gcc
CXX?=g++
AR?=ar
LD?=ld
+
+HOST_CC?=$(CC)
+HOST_CXX?=$(CXX)
+HOST_AR?=$(AR)
+HOST_LD?=$(LD)
+
+TARGET_CC?=$(CC)
+TARGET_CXX?=$(CXX)
+TARGET_AR?=$(AR)
+TARGET_LD?=$(LD)
OpenPOWER on IntegriCloud