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

John Utz
Wed Jan 7 23:25:00 GMT 2009

Yann and Dimitry,

thankyou very much for the thoughtful answers.

----- Yann E. MORIN <> wrote:
> John, Dimitry,
> All,
> On Tuesday 06 January 2009 18:39:17 Dimitry Andric wrote:
> > John Utz wrote:
> > > BSD sed doesnt grok '-r' and it's used all over the place in crosstool-ng.
> > The (FreeBSD) sed option for extended regular expressions is -E, but a
> > quick hack alternative would be to just do "alias sed gsed" in the
> > beginning of the script. :)
> Or better, a shell function defined from the calling shell, and that is
> exported, such as:
> ---8<--- BEGIN ---8<---
> sed() { gsed "$@"; }
> export -f sed
> ./configure bla bla
> make
> make install
> ct-ng bla bla
> ---8<---  END  ---8<---

this is probably the best first pass.

on my freebsd boxes, i would just move the bsd exes and softlink all of these things to the gnu exes and be done with it.

but since i am now on a mac i feel a bit more hesitant about that because i dont have the same understanding of whats under the covers on a mac that i do on BSD or Linux and i dont want to screw up some random update later....

man, if there was only decent firewire audio support and Mackie Tracktion3 and LinPlug VSTI's on *BSD i would still be running it...


> As for awk, I'm quite sure we're already calling gawk, not plain awk (by
> default, awk used to be mawk on my Debian box, so I had to explicitly call
> gawk).

yup. that's true, figured it out later.

> > > What would be desired would be either some environment vars or some
> > > configure time detection that does the right thing or a flag called 'use
> > > BSD names for gnu utils'
> > Just something like:
> > SED="gsed"
> > AWK="gawk"
> > and replacing direct invocations of sed, awk, e.g. with ${SED}, ${AWK},
> > and so on.
> Which means ./configure should be able to:
> - check for a tool
> - accept command line options such as: --with-sed=/foo/bar/gsed
> - set some VAR to the path of the tool
> - sed ./ replacing @@VAR@@ with ${VAR}
> That'd be great, but is currently low on my TODO, because ./configure is
> hand-written, and has grown quite a bit out of control untill now... :-(
> But if someone is willing to have a look... ;-]

yah, that will probably be me at some point. Thankfully, you are not using gnu configure because i absolutely dread looking at that stuff, i dont think that i am possessed of the cognitive skills to succesfully customize it.

methinks it will be more than just configure, because exes are hardcoded all over the place in the actual scripts.

> Thus, the function trick would be a fast workaround.

right, because it allows the crosstool stuff to work as written. i think.

is there anybody actually trying to use crosstool-ng on OSX? or am i the only person that's expressed an interest?

if there is somebody using it, it would be good to know.

oh, and sstrip has been moved in busybox cvs so the download fails:



should be:


tnx again for your help!


> 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  |
> | | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> `------------------------------^-------^------------------^--------------------'

For unsubscribe information see

More information about the crossgcc mailing list