From: Loren J. Rittle Date: Fri, 23 Aug 2002 02:57:11 +0000 (+0000) Subject: * testsuite/abi_check.cc: Support older binutils/readelf. X-Git-Tag: releases/gcc-3.3.0~3181 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=809abaff7e0596958793b603fdccfe3e9898a9eb;p=thirdparty%2Fgcc.git * testsuite/abi_check.cc: Support older binutils/readelf. From-SVN: r56530 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6c43da08ee94..38d12c8361b8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,6 +1,7 @@ 2002-08-22 Loren J. Rittle * testsuite/abi_check.cc: Enhance shell portability. + Support older binutils/readelf. * config/abi/i386-unknown-freebsd4.6: Add. * config/abi/i386-unknown-freebsd4.6/baseline_symbols.txt: New file. diff --git a/libstdc++-v3/testsuite/abi_check.cc b/libstdc++-v3/testsuite/abi_check.cc index b3a695c523be..befac6b160e0 100644 --- a/libstdc++-v3/testsuite/abi_check.cc +++ b/libstdc++-v3/testsuite/abi_check.cc @@ -236,8 +236,16 @@ int main(int argc, char** argv) */ const char quote = '"'; const char bslash = '\\'; + + // GNU binutils, somewhere after version 2.11.2, requires -W/--wide + // to avoid default line truncation. -W is not supported and + // truncation did not occur by default before that point. + bool readelf_need_wide = + (system("readelf --help | grep -- --wide >/dev/null") == 0); + ostringstream cmd; - cmd << "readelf -s -W " << test_lib << " | sed '/" << bslash + cmd << "readelf -s " << (readelf_need_wide ? "-W " : "") + << test_lib << " | sed '/" << bslash << ".dynsym/,/^$/p;d' | egrep -v ' (LOCAL|UND) ' | " << "awk '{ if ($4 == " << quote << "FUNC" << quote << "|| $4 == " << quote << "NOTYPE" << quote << ") printf " << quote << "%s:%s"