blob: f9adbe9eb1ca56291923bde89a3a3fb4ee8ecdea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
commit 4c38abe0967bad78dd6baa61c86923e4d4b346d3
Author: Ben Gamari <ben@smart-cactus.org>
Date: Sun Nov 5 13:14:19 2017 -0500
Fix it
diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4
index dd06a58..f4435b8 100644
--- a/config/gcc-plugin.m4
+++ b/config/gcc-plugin.m4
@@ -13,6 +13,32 @@ dnl the same distribution terms as the rest of that program.
# Sets the shell variables enable_plugin and pluginlibs.
AC_DEFUN([GCC_ENABLE_PLUGINS],
[# Check for plugin support
+
+ # Figure out what objdump we will be using.
+ AS_VAR_SET_IF(gcc_cv_objdump,, [
+ if test -f $gcc_cv_binutils_srcdir/configure.ac \
+ && test -f ../binutils/Makefile \
+ && test x$build = x$host; then
+ # Single tree build which includes binutils.
+ gcc_cv_objdump=../binutils/objdump$build_exeext
+ elif test -x objdump$build_exeext; then
+ gcc_cv_objdump=./objdump$build_exeext
+ elif ( set dummy $OBJDUMP_FOR_TARGET; test -x $[2] ); then
+ gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
+ else
+ AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET)
+ fi])
+
+ AC_MSG_CHECKING(what objdump to use)
+ if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
+ # Single tree build which includes binutils.
+ AC_MSG_RESULT(newly built objdump)
+ elif test x$gcc_cv_objdump = x; then
+ AC_MSG_RESULT(not found)
+ else
+ AC_MSG_RESULT($gcc_cv_objdump)
+ fi
+
AC_ARG_ENABLE(plugin,
[AS_HELP_STRING([--enable-plugin], [enable plugin support])],
enable_plugin=$enableval,
|