summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-02-26 17:49:08 -0500
committermidipix <writeonce@midipix.org>2016-02-27 16:18:25 -0500
commit9757759507cf3a30f967cddb4f339fbcb5766cde (patch)
tree87b23fb7168213212bcdc115c9f78199f214ee4a
parent651d7b81282d250ffd24b8cd211a5023c170ca64 (diff)
downloadntapi-9757759507cf3a30f967cddb4f339fbcb5766cde.tar.bz2
ntapi-9757759507cf3a30f967cddb4f339fbcb5766cde.tar.xz
build system: added fallback host recipe.
-rwxr-xr-xconfigure11
-rw-r--r--sysinfo/compiler/clang.mk4
-rw-r--r--sysinfo/compiler/cparser.mk4
-rw-r--r--sysinfo/host/any-host.mk7
-rw-r--r--sysinfo/os/any-os.mk10
5 files changed, 34 insertions, 2 deletions
diff --git a/configure b/configure
index 2cfe075..8ddf8b9 100755
--- a/configure
+++ b/configure
@@ -180,6 +180,17 @@ common_defaults()
if [ x"$mb_toolchain" = x ]; then
mb_toolchain='binutils'
fi
+
+ # fallback host recipe
+ if [ x"$mb_host" != x ]; then
+ if ! [ -f $mb_project_dir/sysinfo/host/$mb_host.mk ]; then
+ if [ -z "$mb_cross_compile" ]; then
+ mb_cross_compile=$mb_host-
+ fi
+
+ mb_host='any-host';
+ fi
+ fi
}
diff --git a/sysinfo/compiler/clang.mk b/sysinfo/compiler/clang.mk
index ba9ecfc..77b4b86 100644
--- a/sysinfo/compiler/clang.mk
+++ b/sysinfo/compiler/clang.mk
@@ -1,9 +1,11 @@
ifeq ($(CROSS_COMPILE)x,x)
CROSS_HOST =
CROSS_HOST_SPEC =
-else
+else ifeq ($(CROSS_HOST)x,x)
CROSS_HOST = $(HOST)
CROSS_HOST_SPEC = --target=$(HOST)
+else
+ CROSS_HOST_SPEC = --target=$(CROSS_HOST)
endif
diff --git a/sysinfo/compiler/cparser.mk b/sysinfo/compiler/cparser.mk
index a57cdcc..6c4dc8e 100644
--- a/sysinfo/compiler/cparser.mk
+++ b/sysinfo/compiler/cparser.mk
@@ -1,9 +1,11 @@
ifeq ($(CROSS_COMPILE)x,x)
CROSS_HOST =
CROSS_HOST_SPEC =
-else
+else ifeq ($(CROSS_HOST)x,x)
CROSS_HOST = $(HOST)
CROSS_HOST_SPEC = --target=$(HOST)
+else
+ CROSS_HOST_SPEC = --target=$(CROSS_HOST)
endif
diff --git a/sysinfo/host/any-host.mk b/sysinfo/host/any-host.mk
new file mode 100644
index 0000000..acb606a
--- /dev/null
+++ b/sysinfo/host/any-host.mk
@@ -0,0 +1,7 @@
+include $(PROJECT_DIR)/sysinfo/os/any-os.mk
+
+ARCH =
+HOST_BITS =
+HOST_UNDERSCORE =
+
+CROSS_HOST = $(TARGET)
diff --git a/sysinfo/os/any-os.mk b/sysinfo/os/any-os.mk
new file mode 100644
index 0000000..0aa0a75
--- /dev/null
+++ b/sysinfo/os/any-os.mk
@@ -0,0 +1,10 @@
+OS = any-os
+OS_APP_PREFIX =
+OS_APP_SUFFIX =
+OS_LIB_PREFIX = lib
+OS_LIB_SUFFIX = .so
+OS_IMPLIB_EXT = .invalid
+OS_LIBDEF_EXT = .invalid
+OS_ARCHIVE_EXT = .a
+
+.PHONY: $(SHARED_IMPLIB)