This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Added support for AC_ARG_WITH([grep]...) and sed substitution fixes


Yann, All,

On 27/08/14 00:26, Yann E. MORIN wrote:
> Fabian, All,
> 
> On 2014-08-06 04:27 +0200, Fabian Freyer spake thusly:
>> Hi,
>>
>> On 26/09/12 18:56, Yann E. MORIN wrote:
>>> On Wednesday 26 September 2012 17:30:12 Blair Burtan wrote:
>>>> That was the problem but not quite the complete solution.  I had to modify
>>>> the grep path to point to the MacPorts verison when I built ct-ng.  I also
>>>> had to use ginstall instead of the OSX install.
>>>
>>> ./configure --help
>>> [--SNIP--]
>>> Optional Packages:
>>>   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
>>>   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
>>>   --with-install=PATH     Specify the full PATH to a BSD-compatible install
>>>   --with-sed=PATH         Specify the full PATH to GNU sed
>>>   --with-objcopy=PATH     Specify the full PATH to GNU objcopy
>>>   --with-objdump=PATH     Specify the full PATH to GNU objdump
>>>   --with-ranlib=PATH      Specify the full PATH to GNU ranlib
>>>   --with-readelf=PATH     Specify the full PATH to GNU readelf
>>>   --with-bash=PATH        Specify the full PATH to GNU bash >= 3.1
>>>   --with-awk=PATH         Specify the full PATH to GNU awk
>>>   --with-make=PATH        Specify the full PATH to GNU make >= 3.80
>>>   --with-libtool=PATH     Specify the full PATH to GNU libtool >= 1.5.26
>>>   --with-libtoolize=PATH  Specify the full PATH to GNU libtoolize >= 1.5.26
>>>   --with-automake=PATH    Specify the full PATH to GNU automake >= 1.10
>>> [--SNIP--]
>>>
>>> That's how you tell crosstool-NG what tools to use if the default ones are
>>> not the GNU ones.
>>
>> While it is possible to tell crosstool-NG to use custom GNU tools for several
>> tools, it is not possible for all tools, especially for grep and sed. This 
>> causes ct-ng build to fail:
>>
>>   [ERROR]  >>
>>   [ERROR]  >>  Build failed in step '(top-level)'
>>   [ERROR]  >>
>>   [ERROR]  >>  Error happened in: CT_DoForceRmdir[scripts/functions@458]
>>   [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@238]
>>   [ERROR]  >>
>>
>> One of the problems here is also that on BSD installs, including OS X, GNU
>> tools are often installed with a prefixed 'g', in this case "ggrep" and "gsed".
>> There is no way to tell crosstool-NG to use ggrep instead of grep, and
>> adjusting $PATH does not help either.
>>
>> I have created a small (not counting the changes due to the scripts/functions
>> rename) patch that adds --with-grep and substitues @@CT_sed@@ for sed in a few
>> places where sed from PATH is used and GNU-specific options are used.
> 
> The solution is not to pre-process 'functions.in' into 'functions', but
> to add the new tools to the generated paths.mk and paths.sh, and then to
> use ${sed} and ${grep} where needed.
> 
> Note that 'sed' is already present in those files, so only grep needs to
> be added.
> 
> Is there a name which GNU grep is known as on BSD systems? For example,
> we have gsed. Do we have ggrep, too?

Yes, gnu tools are usually prefixed with a g, so it would be called ggrep.

> 
> In which case, we'd need four patches:
>   - use ${sed} instead of plain 'sed' where appropriate
>   - add --with-grep to the list of tools we can specify
>   - add an alternate name for when searching for grep
>   - use ${grep} instead of plain 'grep' where appropriate
> 
> I'll tackle this here.

I would also offer to do this, since I have a testing environment ready. Also, I have already adressed some of these changes in my patch, so it wouldn't be too much work to alter them.

> 
> Sorry for the delay, and thanks for the report.
> 
> Regards,
> Yann E. MORIN.

Regards,
Fabian Freyer

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]