[PATCH v2] configure.ac: Avoid empty subexpression in grep

Alexey Neyman stilor@att.net
Fri Mar 10 08:03:00 GMT 2017



On 03/09/2017 01:50 PM, Paul Eggert wrote:
> On 03/09/2017 08:12 AM, Alexey Neyman wrote:
>> -  if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; 
>> then
>> +  if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > 
>> /dev/null; then
>
> Neither the old nor the new code is portable, as POSIX does not 
> require support for '\|'. Instead, how about something like this?
>
>    if $READELF -S conftest.so | grep -F -e '.rel.dyn' -e '.rela.dyn' > 
> /dev/null; then

Yes, that works too. Updated patch attached.

Regards,
Alexey.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-Fix-combreloc-test-with-BSD-grep.patch
Type: text/x-patch
Size: 1718 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170310/38049c56/attachment.bin>


More information about the Libc-alpha mailing list