aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-01-02 16:50:06 +0000
committerRon Yorston <rmy@pobox.com>2024-01-02 16:50:06 +0000
commitcca8c8e806db11810e25c8fa9446e86431aa2a53 (patch)
treef7024d96cbe7190078183747f887f8ef7c079f3b
parent18940f2b150914b33ecf8927c274a83d074870a4 (diff)
downloadbusybox-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.host8
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#
104host_target := $(shell $(HOSTCC) -v 2>&1 | grep ^Target:) 104host_target := $(shell $(HOSTCC) -v 2>&1 | grep ^Target:)
105host_platform := $(lastword $(subst -, ,$(host_target))) 105host_platform := $(word 4,$(subst -, ,$(host_target)))
106dot :=
106ifeq ($(host_platform),mingw32) 107ifeq ($(host_platform),mingw32)
107dot := . 108dot := .
108else 109endif
109dot := 110ifeq ($(host_platform),windows)
111dot := .
110endif 112endif
111 113
112##### 114#####