Skip to content

Commit 7fdd4fc

Browse files
committed
config: Fix host -rdynamic detection for build != host != target
[Merge from GCC commit 4d9bc81a5d8d884dee7a7781fa4c1577a6c9681a.] 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.
1 parent b47a4f9 commit 7fdd4fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/gcc-plugin.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS],
4949
elif test x$host = x$target; then
5050
export_sym_check="$gcc_cv_objdump -T"
5151
else
52-
export_sym_check=
52+
export_sym_check="$ac_cv_prog_OBJDUMP -T"
5353
fi
5454
;;
5555
esac

0 commit comments

Comments
 (0)