diff options
author | midipix <writeonce@midipix.org> | 2015-10-28 02:20:09 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-10 23:35:24 -0500 |
commit | 7f572b6b12a406fc0dd5b1805e310439a7e65397 (patch) | |
tree | 58b4aecd25b1585a15e28e72eada87f5c7b53569 /sysinfo | |
parent | 05c9b561ebd8fffca79b0d835ec50bf4d946aa57 (diff) | |
download | perk-7f572b6b12a406fc0dd5b1805e310439a7e65397.tar.bz2 perk-7f572b6b12a406fc0dd5b1805e310439a7e65397.tar.xz |
build system: fix support of CC, CPP, and CXX directly passed to configure.
Diffstat (limited to 'sysinfo')
-rw-r--r-- | sysinfo/toolchain/clang.mk | 20 | ||||
-rw-r--r-- | sysinfo/toolchain/cparser.mk | 20 | ||||
-rw-r--r-- | sysinfo/toolchain/gcc.mk | 20 |
3 files changed, 51 insertions, 9 deletions
diff --git a/sysinfo/toolchain/clang.mk b/sysinfo/toolchain/clang.mk index ae8b40c..3e4a795 100644 --- a/sysinfo/toolchain/clang.mk +++ b/sysinfo/toolchain/clang.mk @@ -7,9 +7,23 @@ else endif -CC = $(NATIVE_CC) $(CROSS_HOST_SPEC) -CPP = $(NATIVE_CC) $(CROSS_HOST_SPEC) -E -CXX = $(NATIVE_CC)++ $(CROSS_HOST_SPEC) +ifeq ($(USER_CC)x,x) + CC = $(NATIVE_CC) $(CROSS_HOST_SPEC) +else + CC = $(USER_CC) $(CROSS_HOST_SPEC) +endif + +ifeq ($(USER_CPP)x,x) + CPP = $(NATIVE_CC) $(CROSS_HOST_SPEC) -E +else + CPP = $(USER_CPP) $(CROSS_HOST_SPEC) -E +endif + +ifeq ($(USER_CXX)x,x) + CXX = $(NATIVE_CC)++ $(CROSS_HOST_SPEC) +else + CXX = $(USER_CXX) $(CROSS_HOST_SPEC) +endif AS = $(CROSS_COMPILE)as diff --git a/sysinfo/toolchain/cparser.mk b/sysinfo/toolchain/cparser.mk index c55dbe0..762a6e6 100644 --- a/sysinfo/toolchain/cparser.mk +++ b/sysinfo/toolchain/cparser.mk @@ -7,9 +7,23 @@ else endif -CC = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -CPP = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -E -CXX = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -std=c++ +ifeq ($(USER_CC)x,x) + CC = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp +else + CC = $(USER_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp +endif + +ifeq ($(USER_CPP)x,x) + CPP = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -E +else + CPP = $(USER_CPP) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -E +endif + +ifeq ($(USER_CXX)x,x) + CXX = $(NATIVE_CC) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -std=c++ +else + CXX = $(USER_CXX) $(CROSS_HOST_SPEC) -Wno-experimental -integrated-cpp -std=c++ +endif AS = $(CROSS_COMPILE)as diff --git a/sysinfo/toolchain/gcc.mk b/sysinfo/toolchain/gcc.mk index 933fb48..e0ad0d2 100644 --- a/sysinfo/toolchain/gcc.mk +++ b/sysinfo/toolchain/gcc.mk @@ -1,6 +1,20 @@ -CC = $(CROSS_COMPILE)$(NATIVE_CC) -CPP = $(CROSS_COMPILE)cpp -CXX = $(CROSS_COMPILE)c++ +ifeq ($(USER_CC)x,x) + CC = $(CROSS_COMPILE)$(NATIVE_CC) +else + CC = $(USER_CC) +endif + +ifeq ($(USER_CPP)x,x) + CPP = $(CROSS_COMPILE)cpp +else + CPP = $(USER_CPP) +endif + +ifeq ($(USER_CXX)x,x) + CXX = $(CROSS_COMPILE)c++ +else + CXX = $(USER_CXX) +endif AS = $(CROSS_COMPILE)as |