]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix debug_prefix_map failure with old objdump versions
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 1 Sep 2020 14:51:32 +0000 (16:51 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 1 Sep 2020 14:53:20 +0000 (16:53 +0200)
“objdump -g” does not list debug info like the “Multiple
-fdebug-prefix-map” test expects when using objdump 2.20, e.g. on CentOS
6. “objdump -W” does however work, and it seems to work for object files
with compressed .debug_str section as well.

Related to issue #639.

(cherry picked from commit 3a7257ee23ad7985d18e459b6dbb6990b038df17)

test/run

index 4cd1578a53910a9202307a5e886b45bf353763c3..fab05c365e8dff174f50e28198879ee050640748 100755 (executable)
--- a/test/run
+++ b/test/run
@@ -126,12 +126,10 @@ file_size() {
 objdump_cmd() {
     if $HOST_OS_APPLE; then
         xcrun dwarfdump -r 0 $1
-    elif $HOST_OS_FREEBSD; then
-        objdump -W $1
     elif $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then
         strings $1 # for some reason objdump only shows the basename of the file, so fall back to brute force and ignorance
     else
-        objdump -g $1
+        objdump -W $1
     fi
 }