diff options
author | midipix <writeonce@midipix.org> | 2015-10-31 14:41:09 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-10-31 14:41:09 -0400 |
commit | e1fef7c8c7ae7a3a170dc6bd23e37db6763b7a3c (patch) | |
tree | d0356b8cca9b432e0dac234bc529422d5f6ddf4f | |
parent | 02c4a1cc1466c4b4bc673bc72c506eb8c053b29c (diff) | |
download | pemagine-e1fef7c8c7ae7a3a170dc6bd23e37db6763b7a3c.tar.bz2 pemagine-e1fef7c8c7ae7a3a170dc6bd23e37db6763b7a3c.tar.xz |
build system: fix support of CC, CPP, and CXX directly passed to configure.
-rw-r--r-- | Makefile.in | 7 | ||||
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | sysinfo/toolchain/clang.mk | 20 | ||||
-rw-r--r-- | sysinfo/toolchain/cparser.mk | 20 | ||||
-rw-r--r-- | sysinfo/toolchain/gcc.mk | 20 |
5 files changed, 66 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in index b5d4af5..38f42ed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -46,6 +46,9 @@ NATIVE_OS = @native_os@ NATIVE_OS_BITS = @native_os_bits@ NATIVE_OS_UNDERSCORE = @native_os_underscore@ +USER_CC = @user_cc@ +USER_CPP = @user_cpp@ +USER_CXX = @user_cxx@ all: @@ -239,6 +242,10 @@ clean: @echo NATIVE_OS_BITS:' '$(NATIVE_OS_BITS) @echo NATIVE_OS_USCORE:' '$(NATIVE_OS_UNDERSCORE) @echo + @echo USER_CC:' '$(USER_CC) + @echo USER_CPP:' '$(USER_CPP) + @echo USER_CXX:' '$(USER_CXX) + @echo .PHONY: all install shared static .display \ @@ -73,6 +73,10 @@ init_vars() mb_native_os=$NATIVE_OS mb_native_os_bits=$NATIVE_OS_BITS mb_native_os_underscore=$NATIVE_OS_UNDERSCORE + + mb_user_cc=$CC + mb_user_cpp=$CPP + mb_user_cxx=$CXX } @@ -300,6 +304,10 @@ config_copy() -e 's^@native_os@^'"$mb_native_os"'^g' \ -e 's^@native_os_bits@^'"$mb_native_os_bits"'^g' \ -e 's^@native_os_underscore@^'"$mb_native_os_underscore"'^g' \ + \ + -e 's^@user_cc@^'"$mb_user_cc"'^g' \ + -e 's^@user_cpp@^'"$mb_user_cpp"'^g' \ + -e 's^@user_cxx@^'"$mb_user_cxx"'^g' \ $mb_project_dir/Makefile.in > $mb_pwd/Makefile } 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 |