From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Thu, 5 Mar 2009 15:06:47 -0500 Subject: [U-Boot] [PATCH 12/15] Add support for building native win32 tools In-Reply-To: <1236277947.27449.2189.camel@localhost.localdomain> References: <200903041921.21162.vapier@gentoo.org> <1236277947.27449.2189.camel@localhost.localdomain> Message-ID: <200903051506.48257.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20090305/f836d6b1/attachment.pgp