diff options
author | Ron Yorston <rmy@pobox.com> | 2024-01-02 16:50:06 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-01-02 16:50:06 +0000 |
commit | cca8c8e806db11810e25c8fa9446e86431aa2a53 (patch) | |
tree | f7024d96cbe7190078183747f887f8ef7c079f3b | |
parent | 18940f2b150914b33ecf8927c274a83d074870a4 (diff) | |
download | busybox-w32-cca8c8e806db11810e25c8fa9446e86431aa2a53.tar.gz busybox-w32-cca8c8e806db11810e25c8fa9446e86431aa2a53.tar.bz2 busybox-w32-cca8c8e806db11810e25c8fa9446e86431aa2a53.zip |
build system: try harder to detect Windows hosts
Commit 7390f29cf (build system: allow building with w64devkit)
checked the target of the host compiler to determine if it was
Windows. This relied on the target being a triple of the form
*-*-mingw32.
Some compilers have a target of the form *-*-windows-gnu. Allow
for this too.
-rw-r--r-- | scripts/Makefile.host | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 0deec32e6..7b380460a 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
@@ -102,11 +102,13 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) | |||
102 | # often than really needed. | 102 | # often than really needed. |
103 | # | 103 | # |
104 | host_target := $(shell $(HOSTCC) -v 2>&1 | grep ^Target:) | 104 | host_target := $(shell $(HOSTCC) -v 2>&1 | grep ^Target:) |
105 | host_platform := $(lastword $(subst -, ,$(host_target))) | 105 | host_platform := $(word 4,$(subst -, ,$(host_target))) |
106 | dot := | ||
106 | ifeq ($(host_platform),mingw32) | 107 | ifeq ($(host_platform),mingw32) |
107 | dot := . | 108 | dot := . |
108 | else | 109 | endif |
109 | dot := | 110 | ifeq ($(host_platform),windows) |
111 | dot := . | ||
110 | endif | 112 | endif |
111 | 113 | ||
112 | ##### | 114 | ##### |