libbacktrace: check for objcopy --add-gnu-debuglink using --help
authorIan Lance Taylor <iant@golang.org>
Fri, 12 Feb 2021 02:09:26 +0000 (18:09 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 12 Feb 2021 02:10:25 +0000 (18:10 -0800)
* configure.ac: Check for objcopy --add-gnu-debuglink by using
objcopy --help.
* configure: Regenerate

libbacktrace/configure
libbacktrace/configure.ac

index 1c189b2e2f62ecf8cefa09492e4c19dcff998594..9b66bf5563a8df6bdc708fd2fc8beab9770e770e 100755 (executable)
@@ -13796,8 +13796,7 @@ else
   libbacktrace_cv_objcopy_debuglink=no
 elif ! test -n "${OBJCOPY}"; then
   libbacktrace_cv_objcopy_debuglink=no
-elif ${OBJCOPY} --add-gnu-debuglink=x /bin/ls /tmp/ls$$; then
-  rm -f /tmp/ls$$
+elif ${OBJCOPY} --help | fgrep add-gnu-debuglink >/dev/null 2>&1; then
   libbacktrace_cv_objcopy_debuglink=yes
 else
   libbacktrace_cv_objcopy_debuglink=no
index 83d4733509adb434d847b080d8f995faab853d6f..43a33a66b8229dab6780e63e29b655671a90ab9d 100644 (file)
@@ -500,8 +500,7 @@ AC_CACHE_CHECK([whether objcopy supports debuglink],
   libbacktrace_cv_objcopy_debuglink=no
 elif ! test -n "${OBJCOPY}"; then
   libbacktrace_cv_objcopy_debuglink=no
-elif ${OBJCOPY} --add-gnu-debuglink=x /bin/ls /tmp/ls$$; then
-  rm -f /tmp/ls$$
+elif ${OBJCOPY} --help | fgrep add-gnu-debuglink >/dev/null 2>&1; then
   libbacktrace_cv_objcopy_debuglink=yes
 else
   libbacktrace_cv_objcopy_debuglink=no