Patchwork PATCH: Remove AM_MAKEFLAGS from libsanitizer

login
register
mail settings
Submitter H.J. Lu
Date Dec. 11, 2012, 9:39 p.m.
Message ID <CAMe9rOoY7acf1eZdTygAHrJni+E4QG6ns9RzhR8Yn2NqhNkjcw@mail.gmail.com>
Download mbox | patch
Permalink /patch/205304/
State New
Headers show

Comments

H.J. Lu - Dec. 11, 2012, 9:39 p.m.
On Tue, Dec 11, 2012 at 6:36 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> Il 11/12/2012 14:47, H.J. Lu ha scritto:
>> On Thu, Dec 6, 2012 at 7:07 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Thu, Nov 29, 2012 at 10:30 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>>>> Hi,
>>>>
>>>> Since libsanitizer is used for bootstrap and compiled with raw_cxx,
>>>> we need to use explicit -I for libstdc++-v3 header files in
>>>> libsanitizer.  Otherwise, we will get
>>>>
>>>> libtool: compile: unrecognized option `-D_GNU_SOURCE'
>>>> libtool: compile: Try `libtool --help' for more information.
>>>>
>>>> This patch fixes it.  OK to install?
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> H.J.
>>>> ---
>>>>  libsanitizer/Makefile.am                  |  2 --
>>>>  libsanitizer/Makefile.in                  |  6 +++---
>>>>  libsanitizer/aclocal.m4                   |  1 +
>>>>  libsanitizer/asan/Makefile.am             |  6 ++++--
>>>>  libsanitizer/asan/Makefile.in             | 14 ++++++++++----
>>>>  libsanitizer/configure                    | 22 ++++++++++++++++++++--
>>>>  libsanitizer/configure.ac                 |  1 +
>>>>  libsanitizer/interception/Makefile.am     |  6 ++++--
>>>>  libsanitizer/interception/Makefile.in     | 14 ++++++++++----
>>>>  libsanitizer/sanitizer_common/Makefile.am |  6 ++++--
>>>>  libsanitizer/sanitizer_common/Makefile.in | 14 ++++++++++----
>>>>  libsanitizer/tsan/Makefile.am             |  6 ++++--
>>>>  libsanitizer/tsan/Makefile.in             | 13 +++++++++----
>>>>  14 files changed, 97 insertions(+), 31 deletions(-)
>>>>  create mode 100644 libsanitizer/ChangeLog.asan
>>>>
>>>> 2012-11-22  H.J. Lu  <hongjiu.lu@intel.com>
>>>>
>>>>         * Makefile.am (AM_MAKEFLAGS): Remove CC and CXX.
>>>>         * configure.ac (ACX_NONCANONICAL_TARGET): New.
>>>>         * asan/Makefile.am (AM_CXXFLAGS): Add -I for libstdc++-v3 header
>>>>         files.
>>>>         (AM_MAKEFLAGS): Remove CC and CXX.
>>>>         * interception/Makefile.am: Likewise.
>>>>         * sanitizer_common/Makefile.am: Likewise.
>>>>         * tsan/Makefile.am: Likewise.
>>>>         * Makefile.in: Regenerated.
>>>>         * aclocal.m4: Likewise.
>>>>         * configure: Likewise.
>>>>         * asan/Makefile.in: Likewise.
>>>>         * interception/Makefile.in: Likewise.
>>>>         * sanitizer_common/Makefile.in: Likewise.
>>>>         * tsan/Makefile.in: Likewise.
>>>>
>>>> diff --git a/libsanitizer/Makefile.am b/libsanitizer/Makefile.am
>>>> index 64d3d2e..cd4e92d 100644
>>>> --- a/libsanitizer/Makefile.am
>>>> +++ b/libsanitizer/Makefile.am
>>>> @@ -37,8 +37,6 @@ AM_MAKEFLAGS = \
>>>>         "includedir=$(includedir)" \
>>>>         "AR=$(AR)" \
>>>>         "AS=$(AS)" \
>>>> -       "CC=$(CC)" \
>>>> -       "CXX=$(CXX)" \
>>>>         "LD=$(LD)" \
>>>>         "LIBCFLAGS=$(LIBCFLAGS)" \
>>>>         "NM=$(NM)" \
>
> As a followup please check if AM_MAKEFLAGS is needed at all.
>
>>>> diff --git a/libsanitizer/Makefile.in b/libsanitizer/Makefile.in
>>>> index 21c2711..53e0be9 100644
>>>> --- a/libsanitizer/Makefile.in
>>>> +++ b/libsanitizer/Makefile.in
>
> Please do not include regenerated files in the patch.
>

Here is a patch to remove AM_MAKEFLAGS from
libsanitizer.  Tested on Linux/x86-64.  OK to install?

Thanks.


H.J.
---
2012-12-11  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.am (AM_MAKEFLAGS): Removed.
	* interception/Makefile.am: Likewise.
	* sanitizer_common/Makefile.am: Likewise.
	* tsan/Makefile.am: Likewise.
	* Makefile.in: Regenerated.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.
	* tsan/Makefile.in: Likewise.

-
 MAKEOVERRIDES=

 ## ################################################################
Paolo Bonzini - Dec. 12, 2012, 8:49 a.m.
Il 11/12/2012 22:39, H.J. Lu ha scritto:
> On Tue, Dec 11, 2012 at 6:36 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
>> Il 11/12/2012 14:47, H.J. Lu ha scritto:
>>> On Thu, Dec 6, 2012 at 7:07 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>> On Thu, Nov 29, 2012 at 10:30 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>>>>> Hi,
>>>>>
>>>>> Since libsanitizer is used for bootstrap and compiled with raw_cxx,
>>>>> we need to use explicit -I for libstdc++-v3 header files in
>>>>> libsanitizer.  Otherwise, we will get
>>>>>
>>>>> libtool: compile: unrecognized option `-D_GNU_SOURCE'
>>>>> libtool: compile: Try `libtool --help' for more information.
>>>>>
>>>>> This patch fixes it.  OK to install?
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> H.J.
>>>>> ---
>>>>>  libsanitizer/Makefile.am                  |  2 --
>>>>>  libsanitizer/Makefile.in                  |  6 +++---
>>>>>  libsanitizer/aclocal.m4                   |  1 +
>>>>>  libsanitizer/asan/Makefile.am             |  6 ++++--
>>>>>  libsanitizer/asan/Makefile.in             | 14 ++++++++++----
>>>>>  libsanitizer/configure                    | 22 ++++++++++++++++++++--
>>>>>  libsanitizer/configure.ac                 |  1 +
>>>>>  libsanitizer/interception/Makefile.am     |  6 ++++--
>>>>>  libsanitizer/interception/Makefile.in     | 14 ++++++++++----
>>>>>  libsanitizer/sanitizer_common/Makefile.am |  6 ++++--
>>>>>  libsanitizer/sanitizer_common/Makefile.in | 14 ++++++++++----
>>>>>  libsanitizer/tsan/Makefile.am             |  6 ++++--
>>>>>  libsanitizer/tsan/Makefile.in             | 13 +++++++++----
>>>>>  14 files changed, 97 insertions(+), 31 deletions(-)
>>>>>  create mode 100644 libsanitizer/ChangeLog.asan
>>>>>
>>>>> 2012-11-22  H.J. Lu  <hongjiu.lu@intel.com>
>>>>>
>>>>>         * Makefile.am (AM_MAKEFLAGS): Remove CC and CXX.
>>>>>         * configure.ac (ACX_NONCANONICAL_TARGET): New.
>>>>>         * asan/Makefile.am (AM_CXXFLAGS): Add -I for libstdc++-v3 header
>>>>>         files.
>>>>>         (AM_MAKEFLAGS): Remove CC and CXX.
>>>>>         * interception/Makefile.am: Likewise.
>>>>>         * sanitizer_common/Makefile.am: Likewise.
>>>>>         * tsan/Makefile.am: Likewise.
>>>>>         * Makefile.in: Regenerated.
>>>>>         * aclocal.m4: Likewise.
>>>>>         * configure: Likewise.
>>>>>         * asan/Makefile.in: Likewise.
>>>>>         * interception/Makefile.in: Likewise.
>>>>>         * sanitizer_common/Makefile.in: Likewise.
>>>>>         * tsan/Makefile.in: Likewise.
>>>>>
>>>>> diff --git a/libsanitizer/Makefile.am b/libsanitizer/Makefile.am
>>>>> index 64d3d2e..cd4e92d 100644
>>>>> --- a/libsanitizer/Makefile.am
>>>>> +++ b/libsanitizer/Makefile.am
>>>>> @@ -37,8 +37,6 @@ AM_MAKEFLAGS = \
>>>>>         "includedir=$(includedir)" \
>>>>>         "AR=$(AR)" \
>>>>>         "AS=$(AS)" \
>>>>> -       "CC=$(CC)" \
>>>>> -       "CXX=$(CXX)" \
>>>>>         "LD=$(LD)" \
>>>>>         "LIBCFLAGS=$(LIBCFLAGS)" \
>>>>>         "NM=$(NM)" \
>>
>> As a followup please check if AM_MAKEFLAGS is needed at all.
>>
>>>>> diff --git a/libsanitizer/Makefile.in b/libsanitizer/Makefile.in
>>>>> index 21c2711..53e0be9 100644
>>>>> --- a/libsanitizer/Makefile.in
>>>>> +++ b/libsanitizer/Makefile.in
>>
>> Please do not include regenerated files in the patch.
>>
> 
> Here is a patch to remove AM_MAKEFLAGS from
> libsanitizer.  Tested on Linux/x86-64.  OK to install?
> 
> Thanks.
> 
> 
> H.J.
> ---
> 2012-12-11  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* Makefile.am (AM_MAKEFLAGS): Removed.
> 	* interception/Makefile.am: Likewise.
> 	* sanitizer_common/Makefile.am: Likewise.
> 	* tsan/Makefile.am: Likewise.
> 	* Makefile.in: Regenerated.
> 	* asan/Makefile.in: Likewise.
> 	* interception/Makefile.in: Likewise.
> 	* sanitizer_common/Makefile.in: Likewise.
> 	* tsan/Makefile.in: Likewise.
> 
> diff --git a/libsanitizer/Makefile.am b/libsanitizer/Makefile.am
> index 308d438..272a218 100644
> --- a/libsanitizer/Makefile.am
> +++ b/libsanitizer/Makefile.am
> @@ -10,44 +10,6 @@ if USING_MAC_INTERPOSE
>  SUBDIRS = sanitizer_common asan
>  endif
> 
> -# Work around what appears to be a GNU make bug handling MAKEFLAGS
> -# values defined in terms of make variables, as is the case for CC and
> -# friends when we are called from the top level Makefile.
> -AM_MAKEFLAGS = \
> -	"AR_FLAGS=$(AR_FLAGS)" \
> -	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
> -	"CFLAGS=$(CFLAGS)" \
> -	"CXXFLAGS=$(CXXFLAGS)" \
> -	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
> -	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
> -	"INSTALL=$(INSTALL)" \
> -	"INSTALL_DATA=$(INSTALL_DATA)" \
> -	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
> -	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
> -	"JC1FLAGS=$(JC1FLAGS)" \
> -	"LDFLAGS=$(LDFLAGS)" \
> -	"LIBCFLAGS=$(LIBCFLAGS)" \
> -	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
> -	"MAKE=$(MAKE)" \
> -	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
> -	"PICFLAG=$(PICFLAG)" \
> -	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
> -	"SHELL=$(SHELL)" \
> -	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
> -	"exec_prefix=$(exec_prefix)" \
> -	"infodir=$(infodir)" \
> -	"libdir=$(libdir)" \
> -	"prefix=$(prefix)" \
> -	"includedir=$(includedir)" \
> -	"AR=$(AR)" \
> -	"AS=$(AS)" \
> -	"LD=$(LD)" \
> -	"LIBCFLAGS=$(LIBCFLAGS)" \
> -	"NM=$(NM)" \
> -	"PICFLAG=$(PICFLAG)" \
> -	"RANLIB=$(RANLIB)" \
> -	"DESTDIR=$(DESTDIR)"
> -
>  MAKEOVERRIDES=
> 
>  ## ################################################################
> diff --git a/libsanitizer/interception/Makefile.am
> b/libsanitizer/interception/Makefile.am
> index 6ae59b5..aab68f0 100644
> --- a/libsanitizer/interception/Makefile.am
> +++ b/libsanitizer/interception/Makefile.am
> @@ -17,44 +17,6 @@ interception_files = \
> 
>  libinterception_la_SOURCES = $(interception_files)
> 
> -# Work around what appears to be a GNU make bug handling MAKEFLAGS
> -# values defined in terms of make variables, as is the case for CC and
> -# friends when we are called from the top level Makefile.
> -AM_MAKEFLAGS = \
> -	"AR_FLAGS=$(AR_FLAGS)" \
> -	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
> -	"CFLAGS=$(CFLAGS)" \
> -	"CXXFLAGS=$(CXXFLAGS)" \
> -	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
> -	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
> -	"INSTALL=$(INSTALL)" \
> -	"INSTALL_DATA=$(INSTALL_DATA)" \
> -	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
> -	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
> -	"JC1FLAGS=$(JC1FLAGS)" \
> -	"LDFLAGS=$(LDFLAGS)" \
> -	"LIBCFLAGS=$(LIBCFLAGS)" \
> -	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
> -	"MAKE=$(MAKE)" \
> -	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
> -	"PICFLAG=$(PICFLAG)" \
> -	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
> -	"SHELL=$(SHELL)" \
> -	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
> -	"exec_prefix=$(exec_prefix)" \
> -	"infodir=$(infodir)" \
> -	"libdir=$(libdir)" \
> -	"prefix=$(prefix)" \
> -	"includedir=$(includedir)" \
> -	"AR=$(AR)" \
> -	"AS=$(AS)" \
> -	"LD=$(LD)" \
> -	"LIBCFLAGS=$(LIBCFLAGS)" \
> -	"NM=$(NM)" \
> -	"PICFLAG=$(PICFLAG)" \
> -	"RANLIB=$(RANLIB)" \
> -	"DESTDIR=$(DESTDIR)"
> -
>  MAKEOVERRIDES=
> 
>  ## ################################################################
> diff --git a/libsanitizer/sanitizer_common/Makefile.am
> b/libsanitizer/sanitizer_common/Makefile.am
> index 708b2a4..8d414b3 100644
> --- a/libsanitizer/sanitizer_common/Makefile.am
> +++ b/libsanitizer/sanitizer_common/Makefile.am
> @@ -29,44 +29,6 @@ sanitizer_common_files = \
> 
>  libsanitizer_common_la_SOURCES = $(sanitizer_common_files)
> 
> -# Work around what appears to be a GNU make bug handling MAKEFLAGS
> -# values defined in terms of make variables, as is the case for CC and
> -# friends when we are called from the top level Makefile.
> -AM_MAKEFLAGS = \
> -	"AR_FLAGS=$(AR_FLAGS)" \
> -	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
> -	"CFLAGS=$(CFLAGS)" \
> -	"CXXFLAGS=$(CXXFLAGS)" \
> -	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
> -	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
> -	"INSTALL=$(INSTALL)" \
> -	"INSTALL_DATA=$(INSTALL_DATA)" \
> -	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
> -	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
> -	"JC1FLAGS=$(JC1FLAGS)" \
> -	"LDFLAGS=$(LDFLAGS)" \
> -	"LIBCFLAGS=$(LIBCFLAGS)" \
> -	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
> -	"MAKE=$(MAKE)" \
> -	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
> -	"PICFLAG=$(PICFLAG)" \
> -	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
> -	"SHELL=$(SHELL)" \
> -	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
> -	"exec_prefix=$(exec_prefix)" \
> -	"infodir=$(infodir)" \
> -	"libdir=$(libdir)" \
> -	"prefix=$(prefix)" \
> -	"includedir=$(includedir)" \
> -	"AR=$(AR)" \
> -	"AS=$(AS)" \
> -	"LD=$(LD)" \
> -	"LIBCFLAGS=$(LIBCFLAGS)" \
> -	"NM=$(NM)" \
> -	"PICFLAG=$(PICFLAG)" \
> -	"RANLIB=$(RANLIB)" \
> -	"DESTDIR=$(DESTDIR)"
> -
>  MAKEOVERRIDES=
> 
>  ## ################################################################
> diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am
> index 867c152..a4e3e51 100644
> --- a/libsanitizer/tsan/Makefile.am
> +++ b/libsanitizer/tsan/Makefile.am
> @@ -37,44 +37,6 @@ libtsan_la_SOURCES = $(tsan_files)
>  libtsan_la_LIBADD =
> $(top_builddir)/sanitizer_common/libsanitizer_common.la
> $(top_builddir)/interception/libinterception.la
> $(top_builddir)/../libstdc++-v3/src/libstdc++.la
>  libtsan_la_LDFLAGS = -version-info `grep -v '^\#'
> $(srcdir)/libtool-version` -lpthread -ldl
> 
> -# Work around what appears to be a GNU make bug handling MAKEFLAGS
> -# values defined in terms of make variables, as is the case for CC and
> -# friends when we are called from the top level Makefile.
> -AM_MAKEFLAGS = \
> -	"AR_FLAGS=$(AR_FLAGS)" \
> -	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
> -	"CFLAGS=$(CFLAGS)" \
> -	"CXXFLAGS=$(CXXFLAGS)" \
> -	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
> -	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
> -	"INSTALL=$(INSTALL)" \
> -	"INSTALL_DATA=$(INSTALL_DATA)" \
> -	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
> -	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
> -	"JC1FLAGS=$(JC1FLAGS)" \
> -	"LDFLAGS=$(LDFLAGS)" \
> -	"LIBCFLAGS=$(LIBCFLAGS)" \
> -	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
> -	"MAKE=$(MAKE)" \
> -	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
> -	"PICFLAG=$(PICFLAG)" \
> -	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
> -	"SHELL=$(SHELL)" \
> -	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
> -	"exec_prefix=$(exec_prefix)" \
> -	"infodir=$(infodir)" \
> -	"libdir=$(libdir)" \
> -	"prefix=$(prefix)" \
> -	"includedir=$(includedir)" \
> -	"AR=$(AR)" \
> -	"AS=$(AS)" \
> -	"LD=$(LD)" \
> -	"LIBCFLAGS=$(LIBCFLAGS)" \
> -	"NM=$(NM)" \
> -	"PICFLAG=$(PICFLAG)" \
> -	"RANLIB=$(RANLIB)" \
> -	"DESTDIR=$(DESTDIR)"
> -
>  MAKEOVERRIDES=

You need to remove MAKEOVERRIDES too.

Ok with that change.

Paolo

Patch

diff --git a/libsanitizer/Makefile.am b/libsanitizer/Makefile.am
index 308d438..272a218 100644
--- a/libsanitizer/Makefile.am
+++ b/libsanitizer/Makefile.am
@@ -10,44 +10,6 @@  if USING_MAC_INTERPOSE
 SUBDIRS = sanitizer_common asan
 endif

-# Work around what appears to be a GNU make bug handling MAKEFLAGS
-# values defined in terms of make variables, as is the case for CC and
-# friends when we are called from the top level Makefile.
-AM_MAKEFLAGS = \
-	"AR_FLAGS=$(AR_FLAGS)" \
-	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
-	"CFLAGS=$(CFLAGS)" \
-	"CXXFLAGS=$(CXXFLAGS)" \
-	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
-	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
-	"INSTALL=$(INSTALL)" \
-	"INSTALL_DATA=$(INSTALL_DATA)" \
-	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
-	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
-	"JC1FLAGS=$(JC1FLAGS)" \
-	"LDFLAGS=$(LDFLAGS)" \
-	"LIBCFLAGS=$(LIBCFLAGS)" \
-	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
-	"MAKE=$(MAKE)" \
-	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
-	"PICFLAG=$(PICFLAG)" \
-	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
-	"SHELL=$(SHELL)" \
-	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
-	"exec_prefix=$(exec_prefix)" \
-	"infodir=$(infodir)" \
-	"libdir=$(libdir)" \
-	"prefix=$(prefix)" \
-	"includedir=$(includedir)" \
-	"AR=$(AR)" \
-	"AS=$(AS)" \
-	"LD=$(LD)" \
-	"LIBCFLAGS=$(LIBCFLAGS)" \
-	"NM=$(NM)" \
-	"PICFLAG=$(PICFLAG)" \
-	"RANLIB=$(RANLIB)" \
-	"DESTDIR=$(DESTDIR)"
-
 MAKEOVERRIDES=

 ## ################################################################
diff --git a/libsanitizer/interception/Makefile.am
b/libsanitizer/interception/Makefile.am
index 6ae59b5..aab68f0 100644
--- a/libsanitizer/interception/Makefile.am
+++ b/libsanitizer/interception/Makefile.am
@@ -17,44 +17,6 @@  interception_files = \

 libinterception_la_SOURCES = $(interception_files)

-# Work around what appears to be a GNU make bug handling MAKEFLAGS
-# values defined in terms of make variables, as is the case for CC and
-# friends when we are called from the top level Makefile.
-AM_MAKEFLAGS = \
-	"AR_FLAGS=$(AR_FLAGS)" \
-	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
-	"CFLAGS=$(CFLAGS)" \
-	"CXXFLAGS=$(CXXFLAGS)" \
-	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
-	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
-	"INSTALL=$(INSTALL)" \
-	"INSTALL_DATA=$(INSTALL_DATA)" \
-	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
-	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
-	"JC1FLAGS=$(JC1FLAGS)" \
-	"LDFLAGS=$(LDFLAGS)" \
-	"LIBCFLAGS=$(LIBCFLAGS)" \
-	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
-	"MAKE=$(MAKE)" \
-	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
-	"PICFLAG=$(PICFLAG)" \
-	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
-	"SHELL=$(SHELL)" \
-	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
-	"exec_prefix=$(exec_prefix)" \
-	"infodir=$(infodir)" \
-	"libdir=$(libdir)" \
-	"prefix=$(prefix)" \
-	"includedir=$(includedir)" \
-	"AR=$(AR)" \
-	"AS=$(AS)" \
-	"LD=$(LD)" \
-	"LIBCFLAGS=$(LIBCFLAGS)" \
-	"NM=$(NM)" \
-	"PICFLAG=$(PICFLAG)" \
-	"RANLIB=$(RANLIB)" \
-	"DESTDIR=$(DESTDIR)"
-
 MAKEOVERRIDES=

 ## ################################################################
diff --git a/libsanitizer/sanitizer_common/Makefile.am
b/libsanitizer/sanitizer_common/Makefile.am
index 708b2a4..8d414b3 100644
--- a/libsanitizer/sanitizer_common/Makefile.am
+++ b/libsanitizer/sanitizer_common/Makefile.am
@@ -29,44 +29,6 @@  sanitizer_common_files = \

 libsanitizer_common_la_SOURCES = $(sanitizer_common_files)

-# Work around what appears to be a GNU make bug handling MAKEFLAGS
-# values defined in terms of make variables, as is the case for CC and
-# friends when we are called from the top level Makefile.
-AM_MAKEFLAGS = \
-	"AR_FLAGS=$(AR_FLAGS)" \
-	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
-	"CFLAGS=$(CFLAGS)" \
-	"CXXFLAGS=$(CXXFLAGS)" \
-	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
-	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
-	"INSTALL=$(INSTALL)" \
-	"INSTALL_DATA=$(INSTALL_DATA)" \
-	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
-	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
-	"JC1FLAGS=$(JC1FLAGS)" \
-	"LDFLAGS=$(LDFLAGS)" \
-	"LIBCFLAGS=$(LIBCFLAGS)" \
-	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
-	"MAKE=$(MAKE)" \
-	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
-	"PICFLAG=$(PICFLAG)" \
-	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
-	"SHELL=$(SHELL)" \
-	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
-	"exec_prefix=$(exec_prefix)" \
-	"infodir=$(infodir)" \
-	"libdir=$(libdir)" \
-	"prefix=$(prefix)" \
-	"includedir=$(includedir)" \
-	"AR=$(AR)" \
-	"AS=$(AS)" \
-	"LD=$(LD)" \
-	"LIBCFLAGS=$(LIBCFLAGS)" \
-	"NM=$(NM)" \
-	"PICFLAG=$(PICFLAG)" \
-	"RANLIB=$(RANLIB)" \
-	"DESTDIR=$(DESTDIR)"
-
 MAKEOVERRIDES=

 ## ################################################################
diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am
index 867c152..a4e3e51 100644
--- a/libsanitizer/tsan/Makefile.am
+++ b/libsanitizer/tsan/Makefile.am
@@ -37,44 +37,6 @@  libtsan_la_SOURCES = $(tsan_files)
 libtsan_la_LIBADD =
$(top_builddir)/sanitizer_common/libsanitizer_common.la
$(top_builddir)/interception/libinterception.la
$(top_builddir)/../libstdc++-v3/src/libstdc++.la
 libtsan_la_LDFLAGS = -version-info `grep -v '^\#'
$(srcdir)/libtool-version` -lpthread -ldl

-# Work around what appears to be a GNU make bug handling MAKEFLAGS
-# values defined in terms of make variables, as is the case for CC and
-# friends when we are called from the top level Makefile.
-AM_MAKEFLAGS = \
-	"AR_FLAGS=$(AR_FLAGS)" \
-	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
-	"CFLAGS=$(CFLAGS)" \
-	"CXXFLAGS=$(CXXFLAGS)" \
-	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
-	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
-	"INSTALL=$(INSTALL)" \
-	"INSTALL_DATA=$(INSTALL_DATA)" \
-	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
-	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
-	"JC1FLAGS=$(JC1FLAGS)" \
-	"LDFLAGS=$(LDFLAGS)" \
-	"LIBCFLAGS=$(LIBCFLAGS)" \
-	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
-	"MAKE=$(MAKE)" \
-	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
-	"PICFLAG=$(PICFLAG)" \
-	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
-	"SHELL=$(SHELL)" \
-	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
-	"exec_prefix=$(exec_prefix)" \
-	"infodir=$(infodir)" \
-	"libdir=$(libdir)" \
-	"prefix=$(prefix)" \
-	"includedir=$(includedir)" \
-	"AR=$(AR)" \
-	"AS=$(AS)" \
-	"LD=$(LD)" \
-	"LIBCFLAGS=$(LIBCFLAGS)" \
-	"NM=$(NM)" \
-	"PICFLAG=$(PICFLAG)" \
-	"RANLIB=$(RANLIB)" \
-	"DESTDIR=$(DESTDIR)"