This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFC] Change bin2c binary to target tool (was [RFA] Fix bin2c executable generation for cross-generation)
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Ralf Wildenhues'" <Ralf dot Wildenhues at gmx dot de>, "'Tristan Gingold'" <gingold at adacore dot com>
- Cc: <binutils at sourceware dot org>
- Date: Fri, 5 Nov 2010 08:54:09 +0100
- Subject: [RFC] Change bin2c binary to target tool (was [RFA] Fix bin2c executable generation for cross-generation)
- References: <001e01cb7c35$11ca4290$355ec7b0$@muller@ics-cnrs.unistra.fr> <ACB7C5BA-C11C-400C-AC96-11C744BC5D4C@adacore.com> <002f01cb7c37$b2ca50c0$185ef240$@muller@ics-cnrs.unistra.fr> <68421137-DA11-403C-BA9A-90241AF64D94@adacore.com> <20101104184959.GD9168@gmx.de>
> -----Message d'origine-----
> De?: binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] De la part de Ralf Wildenhues
> Envoyé?: jeudi 4 novembre 2010 19:50
> À?: Tristan Gingold
> Cc?: Pierre Muller; binutils@sourceware.org
> Objet?: Re: [RFA] Fix bin2c executable generation for cross-generation
>
> > On Nov 4, 2010, at 4:48 PM, Pierre Muller wrote:
> >
> > >> The patch below uses -lintl instead of $(LIBINTL)
> > >> for bin2c$(EXEEXT_FOR_BUILD) rule.
>
> The patch is not right, as was already noted.
>
> One proper solution would be to let toplevel create a build-$build/intl
> if needed, consider whether --{en,dis}able-libintl should apply both to
> build as well as to host tools, or add an --enable-build-libintl
> switch;
> then rename affected variables before/after sourcing the appropriate
> config.intl files from ../intl and ../build-$build/intl, to something
> like LIBINTL_DEPS_FOR_BUILD etc. Then we only remain at the problem
> that bin2c.c includes sysdeps.h which leads to inclusion of config.h
> which contains data for the host not the build ...
>
> Since this is a really trivial build tool that is never installed and
> that shouldn't print any localized stuff except in --help output, how
> about removing i18n for it, and simplifying it to the point that it
> needs not include config.h any more?
The major point is that I do not even understand why this is
a 'build' tool rather than a 'target' tool.
Maybe it was used at some point in the past to build
other target binaries like sysinfo$(EXEEXT_FOR_BUILD)
which is used to create sysroff.c source.
As it isn't used anymore, it has no use as a build tool,
thus I would rather transform this into a target tool...
Any opinion on this proposal?
Pierre Muller