[gcc r14-3150] config: Fix host -rdynamic detection for build != host != target
Joseph Myers
jsm28@gcc.gnu.org
Fri Aug 11 13:21:10 GMT 2023
https://gcc.gnu.org/g:4d9bc81a5d8d884dee7a7781fa4c1577a6c9681a
commit r14-3150-g4d9bc81a5d8d884dee7a7781fa4c1577a6c9681a
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Aug 11 13:20:07 2023 +0000
config: Fix host -rdynamic detection for build != host != target
The GCC_ENABLE_PLUGINS configure logic for detecting whether -rdynamic
is necessary and supported uses an appropriate objdump for $host
binaries (running on $build) in cases where $host is $build or
$target.
However, it is missing such logic in the case where $host is neither
$build nor $target, resulting in the compilers not being linked with
-rdynamic and plugins not being usable with such a compiler. In fact
$ac_cv_prog_OBJDUMP, as used when $build = $host, is always an objdump
for $host binaries that runs on $build; that is, it's appropriate to
use in this case as well.
Tested in such a configuration that it does result in cc1 being linked
with -rdynamic as expected. Also bootstrapped with no regressions for
x86_64-pc-linux-gnu.
config/
* gcc-plugin.m4 (GCC_ENABLE_PLUGINS): Use
export_sym_check="$ac_cv_prog_OBJDUMP -T" also when host is not
build or target.
gcc/
* configure: Regenerate.
libcc1/
* configure: Regenerate.
Diff:
---
config/gcc-plugin.m4 | 2 +-
gcc/configure | 2 +-
libcc1/configure | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4
index c731a6fab383..c30cfdd8fadb 100644
--- a/config/gcc-plugin.m4
+++ b/config/gcc-plugin.m4
@@ -49,7 +49,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
elif test x$host = x$target; then
export_sym_check="$gcc_cv_objdump -T"
else
- export_sym_check=
+ export_sym_check="$ac_cv_prog_OBJDUMP -T"
fi
;;
esac
diff --git a/gcc/configure b/gcc/configure
index ea1ad6606a68..db5812d4a63c 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -31975,7 +31975,7 @@ fi
elif test x$host = x$target; then
export_sym_check="$gcc_cv_objdump -T"
else
- export_sym_check=
+ export_sym_check="$ac_cv_prog_OBJDUMP -T"
fi
;;
esac
diff --git a/libcc1/configure b/libcc1/configure
index 1a63a0e4e1a8..2a914a0bfc8b 100755
--- a/libcc1/configure
+++ b/libcc1/configure
@@ -15120,7 +15120,7 @@ fi
elif test x$host = x$target; then
export_sym_check="$gcc_cv_objdump -T"
else
- export_sym_check=
+ export_sym_check="$ac_cv_prog_OBJDUMP -T"
fi
;;
esac
More information about the Gcc-cvs
mailing list