This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


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] configure.ac: Avoid empty subexpression in grep


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


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