diff options
author | midipix <writeonce@midipix.org> | 2016-02-27 09:34:14 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-02-27 16:20:33 -0500 |
commit | 169bd06799bcd07b6cfdef6c2fd809bfc59a139a (patch) | |
tree | 7e101f71ee61e61d74b6a1cbe9ab49fcb316aab2 | |
parent | 98322c5d7d02b50bda12aafdcabff865aa89bece (diff) | |
download | ntcon-169bd06799bcd07b6cfdef6c2fd809bfc59a139a.tar.bz2 ntcon-169bd06799bcd07b6cfdef6c2fd809bfc59a139a.tar.xz |
build system: added fallback compiler recipe.
-rwxr-xr-x | configure | 7 | ||||
-rw-r--r-- | sysinfo/compiler/any-compiler.mk | 29 |
2 files changed, 36 insertions, 0 deletions
@@ -191,6 +191,13 @@ common_defaults() mb_host='any-host'; fi fi + + # fallback compiler recipe + if [ -n "$mb_compiler" ]; then + if ! [ -f $mb_project_dir/sysinfo/compiler/$mb_compiler.mk ]; then + mb_compiler='any-compiler' + fi + fi } diff --git a/sysinfo/compiler/any-compiler.mk b/sysinfo/compiler/any-compiler.mk new file mode 100644 index 0000000..4c98621 --- /dev/null +++ b/sysinfo/compiler/any-compiler.mk @@ -0,0 +1,29 @@ +ifeq ($(CROSS_COMPILE)x,x) + CROSS_HOST = + CROSS_HOST_SPEC = +else + CROSS_HOST = + CROSS_HOST_SPEC = +endif + + +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) -std=c++ +else + CXX = $(USER_CXX) $(CROSS_HOST_SPEC) -std=c++ +endif + + +CFLAGS_PIC = -fPIC |