diff options
author | Ron Yorston <rmy@pobox.com> | 2022-10-30 08:25:45 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-10-30 08:25:45 +0000 |
commit | 7390f29cfc9a3cc0636e20f84f24fbd05f821720 (patch) | |
tree | ee040facd1f276cb5daf733092f137527c75630f /scripts/Kbuild.include | |
parent | d71cb67ff91762ae78e87440b87d7c9a160b2937 (diff) | |
download | busybox-w32-7390f29cfc9a3cc0636e20f84f24fbd05f821720.tar.gz busybox-w32-7390f29cfc9a3cc0636e20f84f24fbd05f821720.tar.bz2 busybox-w32-7390f29cfc9a3cc0636e20f84f24fbd05f821720.zip |
build system: allow building with w64devkit
Make some adjustments to the build system to allow busybox-w32
to be built with w64devkit:
- Strip drive prefix from CURDIR in Makefile to avoid confusing
make with colons.
- Limit file redirection to a subshell in the usage_compressed and
embedded_scripts scripts. Otherwise it isn't possible to move
the open generated file on Windows.
- Change the option tests in Kbuild.include to allow for /dev/null
not existing on Windows.
- Create host binaries without a '.exe' extension. Otherwise they're
rebuilt more often than necessary.
- Modify split-include.c to allow for Windows' popen() not expanding
wildcards.
(GitHub issue #239)
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r-- | scripts/Kbuild.include | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 5b4db5c2c..b61ff8b42 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -52,25 +52,25 @@ endef | |||
52 | # as-option | 52 | # as-option |
53 | # Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,) | 53 | # Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,) |
54 | 54 | ||
55 | as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \ | 55 | as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o - \ |
56 | -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \ | 56 | -xassembler - </dev/null > /dev/null 2>&1; then echo "$(1)"; \ |
57 | else echo "$(2)"; fi ;) | 57 | else echo "$(2)"; fi ;) |
58 | 58 | ||
59 | # cc-option | 59 | # cc-option |
60 | # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) | 60 | # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) |
61 | 61 | ||
62 | cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ | 62 | cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o - -xc - </dev/null \ |
63 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) | 63 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) |
64 | 64 | ||
65 | # hostcc-option | 65 | # hostcc-option |
66 | # Usage: hostcflags-y += $(call hostcc-option, -march=winchip-c6, -march=i586) | 66 | # Usage: hostcflags-y += $(call hostcc-option, -march=winchip-c6, -march=i586) |
67 | 67 | ||
68 | hostcc-option = $(shell if $(HOSTCC) $(HOSTCFLAGS) $(1) -S -o /dev/null -xc /dev/null \ | 68 | hostcc-option = $(shell if $(HOSTCC) $(HOSTCFLAGS) $(1) -S -o - -xc - </dev/null \ |
69 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) | 69 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) |
70 | 70 | ||
71 | # cc-option-yn | 71 | # cc-option-yn |
72 | # Usage: flag := $(call cc-option-yn, -march=winchip-c6) | 72 | # Usage: flag := $(call cc-option-yn, -march=winchip-c6) |
73 | cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ | 73 | cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o - -xc - </dev/null \ |
74 | > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) | 74 | > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) |
75 | 75 | ||
76 | # cc-option-align | 76 | # cc-option-align |