PATCH: PR binutils/12280: Makefiles don't support LTO
H.J. Lu
hjl.tools@gmail.com
Thu Dec 2 19:08:00 GMT 2010
On Wed, Dec 1, 2010 at 11:15 PM, Ralf Wildenhues <Ralf.Wildenhues@gmx.de> wrote:
> Hello H.J.,
>
> * H.J. Lu wrote on Thu, Dec 02, 2010 at 06:34:56AM CET:
>> This patch adds + to LINK in Makefile for GNU make. OK for trunk?
>
>> diff --git a/config/gnumake.m4 b/config/gnumake.m4
>> new file mode 100644
>> index 0000000..2d21e12
>> --- /dev/null
>> +++ b/config/gnumake.m4
>> @@ -0,0 +1,22 @@
>> +dnl Placed after AC_OUTPUT to add `+' to LINK for GNU make.
>
> That is not reliable: a config.status run updating Makefile may be
> triggered from make rules, by-passing configure completely.
>
> Also, $(LINK) is not the only link-related variable, there can be
> prog_LINK for programs and libraries.
>
> The common way to do this is to have a new config.status action (which
> however is also not recheck-safe) or to tack it onto the existing
> Makefile action; e.g.:
>
> AC_CONFIG_FILES([Makefile], [sed ... Makefile ...])
>
> But why not go a different (and IMVHO simpler) route completely: have a
> variable $(LTO) or so that expands to empty, or to '+' if LTO is used,
> and then prepending that to *LINK values unconditionally.
> That has the advantage that you can still get 'make -n' right if using
> GNU make but not LTO.
>
Here is a new patch. OK for trunk?
Thanks.
--
H.J.
---
bfd/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
* doc/Makefile.am (@gnu_make@override CC_FOR_BUILD): New.
* doc/Makefile.in: Regenerated.
binutils/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
config/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* gnumake.m4: New.
gas/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
gold/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@override CC): New.
(@gnu_make@override CXX): Likewise.
* configure.ac: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* configure: Likewise.
gprof/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
ld/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
opcodes/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
(@gnu_make@override CC_FOR_BUILD): Likewise.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
-------------- next part --------------
bfd/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
* doc/Makefile.am (@gnu_make@override CC_FOR_BUILD): New.
* doc/Makefile.in: Regenerated.
binutils/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
config/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* gnumake.m4: New.
gas/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
gold/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@override CC): New.
(@gnu_make@override CXX): Likewise.
* configure.ac: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* configure: Likewise.
gprof/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
ld/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
opcodes/
2010-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12280
* Makefile.am (@gnu_make@LIBTOOL): New.
(@gnu_make@override CC_FOR_BUILD): Likewise.
* configure.in: Add AM_GNU_MAKE.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index da14d57..4b7eba6 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -681,6 +681,7 @@ BFD_BACKENDS = @bfd_backends@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
HAVEVECS = @havevecs@
+@gnu_make@LIBTOOL := +$(LIBTOOL)
INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) \
$(HAVEVECS) @INCINTL@
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index c452dd7..781157c 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -49,6 +49,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/gnumake.m4 \
$(top_srcdir)/../config/largefile.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/nls.m4 \
@@ -277,6 +278,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gnu_make = @gnu_make@
havevecs = @havevecs@
host = @host@
host_alias = @host_alias@
@@ -982,6 +984,7 @@ BFD_BACKENDS = @bfd_backends@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
HAVEVECS = @havevecs@
+@gnu_make@LIBTOOL := +$(LIBTOOL)
INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) \
$(HAVEVECS) @INCINTL@
diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4
index d9e743e..81c950a 100644
--- a/bfd/aclocal.m4
+++ b/bfd/aclocal.m4
@@ -971,6 +971,7 @@ AC_SUBST([am__untar])
m4_include([../config/acx.m4])
m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
+m4_include([../config/gnumake.m4])
m4_include([../config/largefile.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/nls.m4])
diff --git a/bfd/configure b/bfd/configure
index 278cc1d..e47a3aa 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+gnu_make
havevecs
tdefaults
bfd_ufile_ptr
@@ -11412,7 +11413,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11415 "configure"
+#line 11416 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11518,7 +11519,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11521 "configure"
+#line 11522 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15723,6 +15724,33 @@ ac_config_commands="$ac_config_commands default"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make is GNU make" >&5
+$as_echo_n "checking whether make is GNU make... " >&6; }
+if test "${gcc_cv_gnu_make+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ GNU_MAKE=${MAKE-make}
+ case `$GNU_MAKE -v 2>&1` in
+ *GNU*Make*)
+ gcc_cv_gnu_make=yes
+ ;;
+ *)
+ gcc_cv_gnu_make=no
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gnu_make" >&5
+$as_echo "$gcc_cv_gnu_make" >&6; }
+ if test "$gcc_cv_gnu_make" = "yes" ; then
+ gnu_make=
+ else
+ gnu_make="#"
+ fi
+
+
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -18588,4 +18616,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-
diff --git a/bfd/configure.in b/bfd/configure.in
index baa996a..f8b92f4 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -1123,5 +1123,6 @@ AC_SUBST(docdir)
AC_SUBST(htmldir)
AC_SUBST(pdfdir)
-AC_OUTPUT
+AM_GNU_MAKE
+AC_OUTPUT
diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am
index 7476ee5..9872680 100644
--- a/bfd/doc/Makefile.am
+++ b/bfd/doc/Makefile.am
@@ -54,6 +54,8 @@ TEXIDIR = $(srcdir)/../../texinfo/fsf
info_TEXINFOS = bfd.texinfo
bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi
+@gnu_make@override CC_FOR_BUILD := +$(CC_FOR_BUILD)
+
MKDOC = chew$(EXEEXT_FOR_BUILD)
AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 68e17f7..d660a3c 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -46,6 +46,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/gnumake.m4 \
$(top_srcdir)/../config/largefile.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/nls.m4 \
@@ -232,6 +233,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gnu_make = @gnu_make@
havevecs = @havevecs@
host = @host@
host_alias = @host_alias@
@@ -756,6 +758,8 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
uninstall-info-am uninstall-pdf-am uninstall-ps-am
+@gnu_make@override CC_FOR_BUILD := +$(CC_FOR_BUILD)
+
$(MKDOC): $(srcdir)/chew.c
$(CC_FOR_BUILD) -o chew.$$$$ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
$(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \
diff --git a/binutils/Makefile.am b/binutils/Makefile.am
index 6546087..5544c25 100644
--- a/binutils/Makefile.am
+++ b/binutils/Makefile.am
@@ -72,6 +72,8 @@ EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDR
# Stuff that goes in tooldir/ if appropriate.
TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump objcopy
+@gnu_make@LIBTOOL := +$(LIBTOOL)
+
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
diff --git a/binutils/Makefile.in b/binutils/Makefile.in
index 8e3d7f2..13d7e7f 100644
--- a/binutils/Makefile.in
+++ b/binutils/Makefile.in
@@ -58,6 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
$(top_srcdir)/../bfd/warning.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/gnumake.m4 \
$(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/largefile.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
@@ -344,6 +345,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gnu_make = @gnu_make@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -417,6 +419,7 @@ RENAMED_PROGS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
# Stuff that goes in tooldir/ if appropriate.
TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump objcopy
+@gnu_make@LIBTOOL := +$(LIBTOOL)
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
diff --git a/binutils/aclocal.m4 b/binutils/aclocal.m4
index ce11677..7ddd4a1 100644
--- a/binutils/aclocal.m4
+++ b/binutils/aclocal.m4
@@ -993,6 +993,7 @@ m4_include([../bfd/acinclude.m4])
m4_include([../bfd/warning.m4])
m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
+m4_include([../config/gnumake.m4])
m4_include([../config/iconv.m4])
m4_include([../config/largefile.m4])
m4_include([../config/lead-dot.m4])
diff --git a/binutils/configure b/binutils/configure
index 02b05fb..f25f4a0 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+gnu_make
EMULATION_VECTOR
EMULATION
OBJDUMP_DEFS
@@ -11206,7 +11207,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11209 "configure"
+#line 11210 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11312,7 +11313,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11315 "configure"
+#line 11316 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14007,6 +14008,33 @@ EMULATION_VECTOR=$targ_emul_vector
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make is GNU make" >&5
+$as_echo_n "checking whether make is GNU make... " >&6; }
+if test "${gcc_cv_gnu_make+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ GNU_MAKE=${MAKE-make}
+ case `$GNU_MAKE -v 2>&1` in
+ *GNU*Make*)
+ gcc_cv_gnu_make=yes
+ ;;
+ *)
+ gcc_cv_gnu_make=no
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gnu_make" >&5
+$as_echo "$gcc_cv_gnu_make" >&6; }
+ if test "$gcc_cv_gnu_make" = "yes" ; then
+ gnu_make=
+ else
+ gnu_make="#"
+ fi
+
+
+
ac_config_files="$ac_config_files Makefile doc/Makefile po/Makefile.in:po/Make-in"
cat >confcache <<\_ACEOF
@@ -16454,3 +16482,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/binutils/configure.in b/binutils/configure.in
index 99fc22d..a09d6b4 100644
--- a/binutils/configure.in
+++ b/binutils/configure.in
@@ -402,5 +402,8 @@ AC_SUBST(docdir)
AC_SUBST(htmldir)
AC_SUBST(pdfdir)
+AM_GNU_MAKE
+
AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in)
AC_OUTPUT
+
diff --git a/config/gnumake.m4 b/config/gnumake.m4
new file mode 100644
index 0000000..2becc29
--- /dev/null
+++ b/config/gnumake.m4
@@ -0,0 +1,20 @@
+dnl Set LTO to `+' for GNU make.
+AC_DEFUN([AM_GNU_MAKE], [
+ AC_CACHE_CHECK([whether make is GNU make],
+ gcc_cv_gnu_make, [
+ GNU_MAKE=${MAKE-make}
+ case `$GNU_MAKE -v 2>&1` in
+ *GNU*Make*)
+ gcc_cv_gnu_make=yes
+ ;;
+ *)
+ gcc_cv_gnu_make=no
+ ;;
+ esac])
+ if test "$gcc_cv_gnu_make" = "yes" ; then
+ gnu_make=
+ else
+ gnu_make="#"
+ fi
+ AC_SUBST(gnu_make)
+])
diff --git a/gas/Makefile.am b/gas/Makefile.am
index 7b897f3..50a79f9 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -30,6 +30,8 @@ TARG_ENV_H = $(srcdir)/config/te-@te_file@.h
ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
ATOF_TARG_O = atof-@atof@.@OBJEXT@
+@gnu_make@LIBTOOL := +$(LIBTOOL)
+
# use @target_cpu_type@ for refering to configured target name
IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
diff --git a/gas/Makefile.in b/gas/Makefile.in
index 1aa9bb4..41e57a3 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -52,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
$(top_srcdir)/../bfd/warning.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/gnumake.m4 \
$(top_srcdir)/../config/largefile.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/nls.m4 \
@@ -243,6 +244,7 @@ docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
extra_objects = @extra_objects@
+gnu_make = @gnu_make@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -299,6 +301,7 @@ OBJ_FORMAT_H = $(srcdir)/config/obj-@obj_format@.h
TARG_ENV_H = $(srcdir)/config/te-@te_file@.h
ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
ATOF_TARG_O = atof-@atof@.@OBJEXT@
+@gnu_make@LIBTOOL := +$(LIBTOOL)
# use @target_cpu_type@ for refering to configured target name
IT_HDRS = itbl-parse.h $(srcdir)/itbl-ops.h
diff --git a/gas/aclocal.m4 b/gas/aclocal.m4
index cd39ba4..2df621f 100644
--- a/gas/aclocal.m4
+++ b/gas/aclocal.m4
@@ -993,6 +993,7 @@ m4_include([../bfd/acinclude.m4])
m4_include([../bfd/warning.m4])
m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
+m4_include([../config/gnumake.m4])
m4_include([../config/largefile.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/nls.m4])
diff --git a/gas/configure b/gas/configure
index d5431f2..88997c7 100755
--- a/gas/configure
+++ b/gas/configure
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+gnu_make
LIBM
ALLOCA
GENINSRC_NEVER_FALSE
@@ -11195,7 +11196,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11198 "configure"
+#line 11199 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11301,7 +11302,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11304 "configure"
+#line 11305 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14197,6 +14198,33 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make is GNU make" >&5
+$as_echo_n "checking whether make is GNU make... " >&6; }
+if test "${gcc_cv_gnu_make+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ GNU_MAKE=${MAKE-make}
+ case `$GNU_MAKE -v 2>&1` in
+ *GNU*Make*)
+ gcc_cv_gnu_make=yes
+ ;;
+ *)
+ gcc_cv_gnu_make=no
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gnu_make" >&5
+$as_echo "$gcc_cv_gnu_make" >&6; }
+ if test "$gcc_cv_gnu_make" = "yes" ; then
+ gnu_make=
+ else
+ gnu_make="#"
+ fi
+
+
+
+
ac_config_files="$ac_config_files Makefile doc/Makefile po/Makefile.in:po/Make-in"
diff --git a/gas/configure.in b/gas/configure.in
index c11d1df..989f9f8 100644
--- a/gas/configure.in
+++ b/gas/configure.in
@@ -735,6 +735,8 @@ AC_SUBST(docdir)
AC_SUBST(htmldir)
AC_SUBST(pdfdir)
+AM_GNU_MAKE
+
dnl This must come last.
dnl We used to make symlinks to files in the source directory, but now
diff --git a/gold/Makefile.am b/gold/Makefile.am
index df5e66c..0db3e4f 100644
--- a/gold/Makefile.am
+++ b/gold/Makefile.am
@@ -17,6 +17,9 @@ AM_CPPFLAGS = \
-DBINDIR="\"$(bindir)\"" -DTOOLBINDIR="\"$(tooldir)/bin\"" \
@INCINTL@
+@gnu_make@override CC := +$(CC)
+@gnu_make@override CXX := +$(CXX)
+
LIBIBERTY = ../libiberty/libiberty.a
if PLUGINS
diff --git a/gold/Makefile.in b/gold/Makefile.in
index bf729cf..c79106f 100644
--- a/gold/Makefile.in
+++ b/gold/Makefile.in
@@ -50,14 +50,15 @@ DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \
ftruncate.c pread.c mremap.c yyscript.h yyscript.c \
$(srcdir)/../depcomp $(srcdir)/../ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../bfd/warning.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/gnumake.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/nls.m4 \
$(top_srcdir)/../config/override.m4 \
$(top_srcdir)/../config/po.m4 \
- $(top_srcdir)/../config/progtest.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/../config/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -320,6 +321,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gnu_make = @gnu_make@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -1136,6 +1138,9 @@ uninstall-am:
tags tags-recursive uninstall uninstall-am
+@gnu_make@override CC := +$(CC)
+@gnu_make@override CXX := +$(CXX)
+
# Use an explicit dependency for the bison generated header file.
expression.$(OBJEXT): yyscript.h
script-sections.$(OBJEXT): yyscript.h
diff --git a/gold/aclocal.m4 b/gold/aclocal.m4
index ded4d60..e460550 100644
--- a/gold/aclocal.m4
+++ b/gold/aclocal.m4
@@ -980,11 +980,12 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([../bfd/warning.m4])
m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
+m4_include([../config/gnumake.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/nls.m4])
m4_include([../config/override.m4])
m4_include([../config/po.m4])
m4_include([../config/progtest.m4])
-m4_include([../bfd/warning.m4])
diff --git a/gold/configure b/gold/configure
index c759b77..85eca7e 100755
--- a/gold/configure
+++ b/gold/configure
@@ -594,6 +594,7 @@ LTLIBOBJS
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
+gnu_make
CXXCPP
HAVE_ZLIB_FALSE
HAVE_ZLIB_TRUE
@@ -7065,6 +7066,33 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make is GNU make" >&5
+$as_echo_n "checking whether make is GNU make... " >&6; }
+if test "${gcc_cv_gnu_make+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ GNU_MAKE=${MAKE-make}
+ case `$GNU_MAKE -v 2>&1` in
+ *GNU*Make*)
+ gcc_cv_gnu_make=yes
+ ;;
+ *)
+ gcc_cv_gnu_make=no
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gnu_make" >&5
+$as_echo "$gcc_cv_gnu_make" >&6; }
+ if test "$gcc_cv_gnu_make" = "yes" ; then
+ gnu_make=
+ else
+ gnu_make="#"
+ fi
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
diff --git a/gold/configure.ac b/gold/configure.ac
index 2c50d97..2d1bf50 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -456,6 +456,8 @@ fi
AC_LANG_POP(C++)
+AM_GNU_MAKE
+
AM_MAINTAINER_MODE
AC_OUTPUT(Makefile testsuite/Makefile po/Makefile.in:po/Make-in)
diff --git a/gprof/Makefile.am b/gprof/Makefile.am
index a69d06a..ee4a6d0 100644
--- a/gprof/Makefile.am
+++ b/gprof/Makefile.am
@@ -15,6 +15,7 @@ INCDIR = $(BASEDIR)/include
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS)
+@gnu_make@LIBTOOL := +$(LIBTOOL)
AM_CPPFLAGS = -DDEBUG -I../bfd -I$(srcdir)/../include \
-I$(srcdir)/../bfd @INCINTL@ -I. \
diff --git a/gprof/Makefile.in b/gprof/Makefile.in
index a740fea..ec3ac06 100644
--- a/gprof/Makefile.in
+++ b/gprof/Makefile.in
@@ -47,6 +47,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../bfd/warning.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/gnumake.m4 \
$(top_srcdir)/../config/largefile.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/nls.m4 \
@@ -243,6 +244,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gnu_make = @gnu_make@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -284,6 +286,7 @@ BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
AM_CFLAGS = $(WARN_CFLAGS)
+@gnu_make@LIBTOOL := +$(LIBTOOL)
AM_CPPFLAGS = -DDEBUG -I../bfd -I$(srcdir)/../include \
-I$(srcdir)/../bfd @INCINTL@ -I. \
-DLOCALEDIR="\"$(datadir)/locale\""
diff --git a/gprof/aclocal.m4 b/gprof/aclocal.m4
index d2aadb2..cef514b 100644
--- a/gprof/aclocal.m4
+++ b/gprof/aclocal.m4
@@ -971,6 +971,7 @@ AC_SUBST([am__untar])
m4_include([../bfd/warning.m4])
m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
+m4_include([../config/gnumake.m4])
m4_include([../config/largefile.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/nls.m4])
diff --git a/gprof/configure b/gprof/configure
index fd4544a..c11d1e6 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+gnu_make
NO_WERROR
WARN_CFLAGS
GENINSRC_NEVER_FALSE
@@ -11125,7 +11126,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11128 "configure"
+#line 11129 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11231,7 +11232,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11234 "configure"
+#line 11235 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12076,6 +12077,33 @@ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make is GNU make" >&5
+$as_echo_n "checking whether make is GNU make... " >&6; }
+if test "${gcc_cv_gnu_make+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ GNU_MAKE=${MAKE-make}
+ case `$GNU_MAKE -v 2>&1` in
+ *GNU*Make*)
+ gcc_cv_gnu_make=yes
+ ;;
+ *)
+ gcc_cv_gnu_make=no
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gnu_make" >&5
+$as_echo "$gcc_cv_gnu_make" >&6; }
+ if test "$gcc_cv_gnu_make" = "yes" ; then
+ gnu_make=
+ else
+ gnu_make="#"
+ fi
+
+
+
ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
cat >confcache <<\_ACEOF
diff --git a/gprof/configure.in b/gprof/configure.in
index 142f4cd..a82beaa 100644
--- a/gprof/configure.in
+++ b/gprof/configure.in
@@ -58,5 +58,7 @@ AC_SUBST(docdir)
AC_SUBST(htmldir)
AC_SUBST(pdfdir)
+AM_GNU_MAKE
+
AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
AC_OUTPUT
diff --git a/ld/Makefile.am b/ld/Makefile.am
index d9e1bcc..e3f0b01 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -20,6 +20,7 @@ am__skipyacc =
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS)
+@gnu_make@LIBTOOL := +$(LIBTOOL)
# Conditionally enable the plugin interface.
if ENABLE_PLUGINS
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 01511bc..e2fe24b 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -54,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
$(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/gnumake.m4 \
$(top_srcdir)/../config/largefile.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/nls.m4 \
@@ -300,6 +301,7 @@ do_compare = @do_compare@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gnu_make = @gnu_make@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -346,6 +348,7 @@ tooldir = $(exec_prefix)/$(target_alias)
am__skiplex =
am__skipyacc =
AM_CFLAGS = $(WARN_CFLAGS)
+@gnu_make@LIBTOOL := +$(LIBTOOL)
@ENABLE_PLUGINS_FALSE@PLUGIN_C =
# Conditionally enable the plugin interface.
diff --git a/ld/aclocal.m4 b/ld/aclocal.m4
index 2f88266..e05de67 100644
--- a/ld/aclocal.m4
+++ b/ld/aclocal.m4
@@ -994,6 +994,7 @@ m4_include([../bfd/warning.m4])
m4_include([../config/acx.m4])
m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
+m4_include([../config/gnumake.m4])
m4_include([../config/largefile.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/nls.m4])
diff --git a/ld/configure b/ld/configure
index 088c721..708e3be 100755
--- a/ld/configure
+++ b/ld/configure
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+gnu_make
TESTBFDLIB
EMULATION_LIBPATH
LIB_PATH
@@ -11622,7 +11623,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11625 "configure"
+#line 11626 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11728,7 +11729,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11731 "configure"
+#line 11732 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13311,6 +13312,33 @@ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make is GNU make" >&5
+$as_echo_n "checking whether make is GNU make... " >&6; }
+if test "${gcc_cv_gnu_make+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ GNU_MAKE=${MAKE-make}
+ case `$GNU_MAKE -v 2>&1` in
+ *GNU*Make*)
+ gcc_cv_gnu_make=yes
+ ;;
+ *)
+ gcc_cv_gnu_make=no
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gnu_make" >&5
+$as_echo "$gcc_cv_gnu_make" >&6; }
+ if test "$gcc_cv_gnu_make" = "yes" ; then
+ gnu_make=
+ else
+ gnu_make="#"
+ fi
+
+
+
ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
cat >confcache <<\_ACEOF
diff --git a/ld/configure.in b/ld/configure.in
index 85fe903..483733a 100644
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -347,5 +347,7 @@ AC_SUBST(docdir)
AC_SUBST(htmldir)
AC_SUBST(pdfdir)
+AM_GNU_MAKE
+
AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in)
AC_OUTPUT
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 668085c..491ef3c 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -18,6 +18,9 @@ COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(INCLUDES) $(AM_CPPFLAGS) \
LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
$(LDFLAGS_FOR_BUILD) -o $@
+@gnu_make@LIBTOOL := +$(LIBTOOL)
+@gnu_make@override CC_FOR_BUILD := +$(CC_FOR_BUILD)
+
libopcodes_la_LDFLAGS =
if INSTALL_LIBBFD
bfdlibdir = @bfdlibdir@
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 8928b1b..1345fd5 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
$(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/gnumake.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/nls.m4 \
$(top_srcdir)/../config/override.m4 \
@@ -250,6 +251,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gnu_make = @gnu_make@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -298,6 +300,7 @@ COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(INCLUDES) $(AM_CPPFLAGS) \
LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
$(LDFLAGS_FOR_BUILD) -o $@
+@gnu_make@LIBTOOL := +$(LIBTOOL)
libopcodes_la_LDFLAGS = $(am__append_1) -release `cat \
../bfd/libtool-soversion` @SHARED_LDFLAGS@
@INSTALL_LIBBFD_TRUE@bfdlib_LTLIBRARIES = libopcodes.la
@@ -1180,6 +1183,7 @@ uninstall-am: uninstall-bfdincludeDATA uninstall-bfdlibLTLIBRARIES
tags tags-recursive uninstall uninstall-am \
uninstall-bfdincludeDATA uninstall-bfdlibLTLIBRARIES
+@gnu_make@override CC_FOR_BUILD := +$(CC_FOR_BUILD)
disassemble.lo: disassemble.c
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ @archdefs@ $(srcdir)/disassemble.c
diff --git a/opcodes/aclocal.m4 b/opcodes/aclocal.m4
index df10cc0..ebaa0af 100644
--- a/opcodes/aclocal.m4
+++ b/opcodes/aclocal.m4
@@ -973,6 +973,7 @@ m4_include([../bfd/warning.m4])
m4_include([../config/acx.m4])
m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
+m4_include([../config/gnumake.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/nls.m4])
m4_include([../config/override.m4])
diff --git a/opcodes/configure b/opcodes/configure
index fe7c01e..678b9db 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+gnu_make
BFD_MACHINES
archdefs
SHARED_DEPENDENCIES
@@ -11142,7 +11143,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11145 "configure"
+#line 11146 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11248,7 +11249,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11251 "configure"
+#line 11252 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12541,6 +12542,33 @@ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make is GNU make" >&5
+$as_echo_n "checking whether make is GNU make... " >&6; }
+if test "${gcc_cv_gnu_make+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ GNU_MAKE=${MAKE-make}
+ case `$GNU_MAKE -v 2>&1` in
+ *GNU*Make*)
+ gcc_cv_gnu_make=yes
+ ;;
+ *)
+ gcc_cv_gnu_make=no
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_gnu_make" >&5
+$as_echo "$gcc_cv_gnu_make" >&6; }
+ if test "$gcc_cv_gnu_make" = "yes" ; then
+ gnu_make=
+ else
+ gnu_make="#"
+ fi
+
+
+
ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
cat >confcache <<\_ACEOF
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 0518781..6e38801 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -347,5 +347,7 @@ fi
AC_SUBST(archdefs)
AC_SUBST(BFD_MACHINES)
+AM_GNU_MAKE
+
AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
AC_OUTPUT
More information about the Binutils
mailing list