[PATCH] gsed.cfg: Add check for gsed

Ryan Long ryan.long at oarcorp.com
Tue Oct 4 13:52:54 UTC 2022


It looks like gcc checks for gsed if sed is not the GNU version.

I've installed it on FreeBSD and MacOS. I had to install it via Homebrew 
on MacOS, but that's because it fails to build gsed. The error is 
"machine `arm64-apple' not recognized".

So I added this check to get around that, and it built successfully.

On 10/3/2022 8:13 PM, Chris Johns wrote:
> On 4/10/2022 2:52 am, Ryan Long wrote:
>> ---
>>   bare/config/textproc/gsed.cfg | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/bare/config/textproc/gsed.cfg b/bare/config/textproc/gsed.cfg
>> index 8287c74..b4aaf4f 100644
>> --- a/bare/config/textproc/gsed.cfg
>> +++ b/bare/config/textproc/gsed.cfg
>> @@ -2,7 +2,7 @@
>>   # GNU sed has a version option, check for it.
>>   # If not found build it.
>>   #
>> -%define has_gnu_sed %(sed --version > /dev/null 2>&1; echo $?)
>> +%define has_gnu_sed %(sed --version > /dev/null 2>&1 || gsed --version > /dev/null 2>&1; echo $?)
>>   %if %{has_gnu_sed} != 0
>>    %include %{_configdir}/textproc/gsed-4.8.cfg
>>   %endif
> What does gcc require sed be as a command? Is it sed or gsed?
>
> Which host has gsed installed?
>
> Chris


More information about the devel mailing list