public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH/next v3 27/28] Add support for building native win32 tools
Date: Tue, 14 Apr 2009 19:06:54 -0400	[thread overview]
Message-ID: <200904141906.55090.vapier@gentoo.org> (raw)
In-Reply-To: <1239749550.24099.147.camel@localhost.localdomain>

On Tuesday 14 April 2009 18:52:30 Peter Tyser wrote:
> On Sat, 2009-04-04 at 01:20 +0200, Wolfgang Denk wrote:
> > In message Peter Tyser wrote:
> > > Add support for compiling the host tools in the tools directory using
> > > the MinGW toolchain.  This produces executables which can be used on
> > > standard Windows computers without requiring cygwin.
> > >
> > > One must specify the MinGW compiler and strip utilities as if they
> > > were the host toolchain in order to build win32 executables, eg:
> > >
> > > make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools
> > >
> > > Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
> > > ---
> > >  README                |   10 ++++++
> > >  include/image.h       |    2 +
> > >  include/libfdt_env.h  |   12 +++++++
> > >  tools/Makefile        |   23 ++++++++++----
> > >  tools/mingw_support.c |   79
> > > +++++++++++++++++++++++++++++++++++++++++++++++++ tools/mingw_support.h
> > > |   51 +++++++++++++++++++++++++++++++
> > >  tools/mkimage.h       |    5 +++
> > >  tools/os_support.c    |   24 +++++++++++++++
> > >  tools/os_support.h    |   29 ++++++++++++++++++
> > >  tools/ubsha1.c        |    3 ++
> > >  10 files changed, 231 insertions(+), 7 deletions(-)
> > >  create mode 100644 tools/mingw_support.c
> > >  create mode 100644 tools/mingw_support.h
> > >  create mode 100644 tools/os_support.c
> > >  create mode 100644 tools/os_support.h
> >
> > I'm not happy about this os_support thingy, especially since it will
> > always be compiled, even if not needed in 99.99% of the cases. Maybe
> > you have a better idea and can send a cleanup-patch?
>
> The 2 options that come to mind are:
> 1. Keep the current method of unconditionally compiling os_support.c,
> which will in turn include any os-specific files.
>
> 2. Move the logic of determining which os-specific files are compiled
> into the Makefile.  Something like:
>
>  ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null)))
>  SFX = .exe
> +OS_SUPPORT_FILES = mingw_support.c
>  else
>  SFX =
> +OS_SUPPORT_FILES =
>  endif
>
> and then replace references of "os_support.c" with "$(OS_SUPPORT_FILES).
> (Or something along those lines).
>
>
> #1 is ugly in that 99.99% of the time an empty os_support.c file is
> processed.
>
> #2 is ugly in that the Makefile method to determine a target OS is
> somewhat hokey and will only get hokier if/when additional OS targets
> are supported.
>
> I'd vote for #1 as I think the wasted time of processing os_support.c is
> a drop in the bucket and it seems a bit cleaner than hacking up the
> Makefile.
>
> If others have any clever ideas let me know.

i prefer #1 as well ... you covered the reasons fairly well, thanks
-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/20090414/f5f77bad/attachment.pgp 

  reply	other threads:[~2009-04-14 23:06 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 23:54 [U-Boot] [PATCH/next v3 00/28] tools/Makefile cleanup and win32 tool support Peter Tyser
2009-03-13 23:54 ` [U-Boot] [PATCH/next v3 01/28] Makefile: Make autoconf.mk a dependency of the depend target Peter Tyser
2009-03-13 23:54   ` [U-Boot] [PATCH/next v3 02/28] Makefile: Add removal of *.exe files to clean target Peter Tyser
2009-03-13 23:54     ` [U-Boot] [PATCH/next v3 03/28] common/Makefile: Conditionally compile env_embedded.o Peter Tyser
2009-03-13 23:54       ` [U-Boot] [PATCH/next v3 04/28] elf.h: Use stdint.h to provide standard typedefs for WIN32 Peter Tyser
2009-03-13 23:54         ` [U-Boot] [PATCH/next v3 05/28] Rename include/zlib.h to include/u-boot/zlib.h Peter Tyser
2009-03-13 23:54           ` [U-Boot] [PATCH/next v3 06/28] Rename include/bzlib.h to include/u-boot/bzlib.h Peter Tyser
2009-03-13 23:54             ` [U-Boot] [PATCH/next v3 07/28] gen_eth_addr: Use POSIX rand() and srand() Peter Tyser
2009-03-13 23:54               ` [U-Boot] [PATCH/next v3 08/28] tools/Makefile: Remove HOSTARCH HOSTOS defines Peter Tyser
2009-03-13 23:54                 ` [U-Boot] [PATCH/next v3 09/28] tools/Makefile: Remove inappropriate double-tabs Peter Tyser
2009-03-13 23:54                   ` [U-Boot] [PATCH/next v3 10/28] tools/Makefile: Split variable declarations into multiple lines Peter Tyser
2009-03-13 23:54                     ` [U-Boot] [PATCH/next v3 11/28] tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled Peter Tyser
2009-03-13 23:54                       ` [U-Boot] [PATCH/next v3 12/28] tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS Peter Tyser
2009-03-13 23:54                         ` [U-Boot] [PATCH/next v3 13/28] tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG Peter Tyser
2009-03-13 23:54                           ` [U-Boot] [PATCH/next v3 14/28] tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP Peter Tyser
2009-03-13 23:54                             ` [U-Boot] [PATCH/next v3 15/28] tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED Peter Tyser
2009-03-13 23:54                               ` [U-Boot] [PATCH/next v3 16/28] tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET Peter Tyser
2009-03-13 23:54                                 ` [U-Boot] [PATCH/next v3 17/28] tools/Makefile: Compile ncb when CONFIG_NETCONSOLE Peter Tyser
2009-03-13 23:54                                   ` [U-Boot] [PATCH/next v3 18/28] tools/Makefile: Add tools/ to the include search path Peter Tyser
2009-03-13 23:54                                     ` [U-Boot] [PATCH/next v3 19/28] tools: Remove unecessary symlinking of zlib.h Peter Tyser
2009-03-13 23:54                                       ` [U-Boot] [PATCH/next v3 20/28] tools/Makefile: Add libfdt/ to the include search path Peter Tyser
2009-03-13 23:54                                         ` [U-Boot] [PATCH/next v3 21/28] tools/Makefile: Remove symlinks for fdt targets Peter Tyser
2009-03-13 23:54                                           ` [U-Boot] [PATCH/next v3 22/28] tools/Makefile: Dynamically generate libfdt object dependencies Peter Tyser
2009-03-13 23:54                                             ` [U-Boot] [PATCH/next v3 23/28] tools/Makefile: Remove symlinks for remaining source files Peter Tyser
2009-03-13 23:54                                               ` [U-Boot] [PATCH/next v3 24/28] tools/Makefile: Use auto-generated object file dependencies Peter Tyser
2009-03-13 23:54                                                 ` [U-Boot] [PATCH/next v3 25/28] tools/Makefile: Create generic build rules Peter Tyser
2009-03-13 23:54                                                   ` [U-Boot] [PATCH/next v3 26/28] tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation Peter Tyser
2009-03-13 23:54                                                     ` [U-Boot] [PATCH/next v3 27/28] Add support for building native win32 tools Peter Tyser
2009-03-13 23:54                                                       ` [U-Boot] [PATCH/next v3 28/28] Delete now unused tools/Makefile.win32 Peter Tyser
2009-04-03 23:21                                                         ` Wolfgang Denk
2009-04-03 23:20                                                       ` [U-Boot] [PATCH/next v3 27/28] Add support for building native win32 tools Wolfgang Denk
2009-04-14 22:52                                                         ` Peter Tyser
2009-04-14 23:06                                                           ` Mike Frysinger [this message]
2009-04-27 22:41                                                           ` Wolfgang Denk
2009-04-27 22:52                                                             ` Peter Tyser
2009-04-03 23:18                                                     ` [U-Boot] [PATCH/next v3 26/28] tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation Wolfgang Denk
2009-04-03 23:17                                                   ` [U-Boot] [PATCH/next v3 25/28] tools/Makefile: Create generic build rules Wolfgang Denk
2009-04-03 23:16                                                 ` [U-Boot] [PATCH/next v3 24/28] tools/Makefile: Use auto-generated object file dependencies Wolfgang Denk
2009-04-03 23:16                                               ` [U-Boot] [PATCH/next v3 23/28] tools/Makefile: Remove symlinks for remaining source files Wolfgang Denk
2009-04-03 23:16                                             ` [U-Boot] [PATCH/next v3 22/28] tools/Makefile: Dynamically generate libfdt object dependencies Wolfgang Denk
2009-04-03 23:15                                           ` [U-Boot] [PATCH/next v3 21/28] tools/Makefile: Remove symlinks for fdt targets Wolfgang Denk
2009-04-03 23:15                                         ` [U-Boot] [PATCH/next v3 20/28] tools/Makefile: Add libfdt/ to the include search path Wolfgang Denk
2009-04-03 23:15                                       ` [U-Boot] [PATCH/next v3 19/28] tools: Remove unecessary symlinking of zlib.h Wolfgang Denk
2009-04-03 23:14                                     ` [U-Boot] [PATCH/next v3 18/28] tools/Makefile: Add tools/ to the include search path Wolfgang Denk
2009-04-03 23:13                                   ` [U-Boot] [PATCH/next v3 17/28] tools/Makefile: Compile ncb when CONFIG_NETCONSOLE Wolfgang Denk
2009-04-03 23:13                                 ` [U-Boot] [PATCH/next v3 16/28] tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET Wolfgang Denk
2009-04-03 23:12                               ` [U-Boot] [PATCH/next v3 15/28] tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED Wolfgang Denk
2009-04-03 23:12                             ` [U-Boot] [PATCH/next v3 14/28] tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP Wolfgang Denk
2009-04-03 23:12                           ` [U-Boot] [PATCH/next v3 13/28] tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG Wolfgang Denk
2009-04-03 23:11                         ` [U-Boot] [PATCH/next v3 12/28] tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS Wolfgang Denk
2009-04-03 23:11                       ` [U-Boot] [PATCH/next v3 11/28] tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled Wolfgang Denk
2009-04-03 23:11                     ` [U-Boot] [PATCH/next v3 10/28] tools/Makefile: Split variable declarations into multiple lines Wolfgang Denk
2009-04-03 23:10                   ` [U-Boot] [PATCH/next v3 09/28] tools/Makefile: Remove inappropriate double-tabs Wolfgang Denk
2009-04-03 23:10                 ` [U-Boot] [PATCH/next v3 08/28] tools/Makefile: Remove HOSTARCH HOSTOS defines Wolfgang Denk
2009-04-03 23:10               ` [U-Boot] [PATCH/next v3 07/28] gen_eth_addr: Use POSIX rand() and srand() Wolfgang Denk
2009-04-03 23:09             ` [U-Boot] [PATCH/next v3 06/28] Rename include/bzlib.h to include/u-boot/bzlib.h Wolfgang Denk
2009-04-13 22:06               ` Peter Tyser
2009-04-03 23:08           ` [U-Boot] [PATCH/next v3 05/28] Rename include/zlib.h to include/u-boot/zlib.h Wolfgang Denk
2009-04-13 21:50             ` Peter Tyser
2009-04-13 21:58               ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-03 23:07         ` [U-Boot] [PATCH/next v3 04/28] elf.h: Use stdint.h to provide standard typedefs for WIN32 Wolfgang Denk
2009-04-03 23:07       ` [U-Boot] [PATCH/next v3 03/28] common/Makefile: Conditionally compile env_embedded.o Wolfgang Denk
2009-04-03 23:06     ` [U-Boot] [PATCH/next v3 02/28] Makefile: Add removal of *.exe files to clean target Wolfgang Denk
2009-04-03 23:05   ` [U-Boot] [PATCH/next v3 01/28] Makefile: Make autoconf.mk a dependency of the depend target Wolfgang Denk
2009-03-17 17:21 ` [U-Boot] [PATCH/next v3 00/28] tools/Makefile cleanup and win32 tool support Scott Wood
2009-03-17 17:43   ` Mike Frysinger
2009-03-17 20:59     ` Peter Tyser
2009-03-17 22:34       ` Mike Frysinger
2009-04-03 23:02 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200904141906.55090.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox