crosstool-ng: where is a strategic place to tell crosstool-ng that sed should be gsed?

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Sun Jan 11 22:37:00 GMT 2009


Thomas, John, Dimitry,
All,

On Saturday 10 January 2009 22:24:55 Thomas Jourdan wrote:
> I have the same issue on solaris, with the install utility. By default,
> install points to the SunOS install command. But the GNU install from
> coreutils is available as ginstall (and required by ct-ng).
> I did the trick from Yann (with the function) and it works well. 

Good. At least there's a workaround until ./configure gets fixed/enhanced.

> Which applications could the user specify to the configure script ? So
> far are identified :
> awk
> sed
> install
> make ?

As of today, ./configure checks for the needed tools prior to looking at its
command line options. This is needed because the command line parsing uses
some of the needed tools if --with-contrib is used.

This will be bogus if we need to enforce the location of those tools via the
command line.

So the first step is to rework a command-line parsing that can be called
before checking the tools. The easiest way, although not the most elegant
one, would be to defer the contrib handling until after we checked the tools.
For all of the options in the form --with-foo=bar, set the variable foo to
contian "bar".

Then for each required tool, tell what variable should be tested, and only if
it is empty should the tool be looked for, and set the variable to the path
where the tool was found.

Third, have Makefile.in and script/crosstool.sh have placeholders in the form
foo=@@foo@@ (eg.: awk=@@awk@@ ) and then have ./configure replace them in
Makefile.in that will in turn replace them in scripts/crosstool.sh.

Fourth, everywhere the tool is used, refer to the variable. Eg. for awk, we'd
use "$(awk)"

What must be known now is that all build scripts are sourced by the main
scripts/crosstool.sh, so replacement can go only in there (except for a few
others that can be handled separately, or better yet have a script fragment
in CT_LIB_DIR that has all the variable assignments and gets sourced by
all scripts requiring the values).

Will work on that later in the week...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'


--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list