
On Thursday 05 March 2009 13:32:27 Peter Tyser wrote:
On Wed, 2009-03-04 at 19:21 -0500, Mike Frysinger wrote:
On Wednesday 04 March 2009 18:33:02 Peter Tyser wrote:
--- a/README +++ b/README
the tools directory you can use the MinGW toolchain
(http://www.mingw.org). Set your HOST tools to the MinGW
binaries and execute 'make tools'. For example:
binaries -> cross-compiler
I think binaries is more fitting than cross-compiler since the mingw strip utility is also used. In theory other HOST tools might be used down the road.
cross-compiler usually encompasses the toolchain in lay terms. if you want to be strict, then use "toolchain". "binaries" is too vague: are you talking about programs that produce binaries that run on Windows ? or maybe you're talking about the binaries that run under Windows ?
--- a/tools/Makefile +++ b/tools/Makefile @@ -79,6 +79,14 @@ SFX = endif
# +# mingw toolchain requires mingw_support.c and generates .exe files +# +ifneq (,$(findstring mingw,$(shell $(HOSTCC) -v 2>&1 | grep mingw))) +MINGW_OBJ_FILES-y += mingw_support.o +SFX = .exe +endif
perhaps we should create a sfx.sh script which handles the logic of detecting the default suffix. would be a lot cleaner than relying on strings in toolchain names.
The above looks at the output of the "HOSTCC -v" command. The "Target: XXX" strings should contain mingw regardless of the naming of HOSTCC. How about combining the SFX detection into:
ifeq ($(HOSTOS),cygwin) HOST_CFLAGS += -ansi endif
# # toolchains targeting win32 generate .exe files # ifneq (,$(findstring WIN32 ,$(shell echo "" | $(HOSTCC) -E -dM -))) SFX = .exe else SFX = endif
you dont need the pipe if you simply redirect input from /dev/null ... otherwise, this looks better than the previous one -mike