X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libstdc%2B%2B-v3%2Ftestsuite%2Fabi_check.cc;h=befac6b160e0639a722544487e5e5ecc148348a0;hp=b3a695c523bea0f108ed9b9f3ee23923a72c7c7c;hb=5bc5f104628ddbd5f203ddb9c78510dc910f515a;hpb=3b5ec6d9caca77e24c56456d7aec01d53a58b268 diff --git a/libstdc++-v3/testsuite/abi_check.cc b/libstdc++-v3/testsuite/abi_check.cc index b3a695c523b..befac6b160e 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"