[PATCH] PR other/55291: Add support for GCC multilib run-time libraries to libsanitizer

H.J. Lu hjl.tools@gmail.com
Tue Nov 13 23:43:00 GMT 2012


On Tue, Nov 13, 2012 at 3:31 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
> Il 14/11/2012 00:27, H.J. Lu ha scritto:
>> On Tue, Nov 13, 2012 at 3:19 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
>>> Il 14/11/2012 00:16, H.J. Lu ha scritto:
>>>>>> What has to be fixed about it?  Anything except AC_PREREQ/AC_CONFIG_AUX_DIR?
>>>>>>
>>>>>> I really would prefer to do it in the order I mentioned above.
>>>> We also need
>>>>
>>>> [hjl@gnu-tools-1 libsanitizer]$ cat acinclude.m4
>>>> dnl ----------------------------------------------------------------------
>>>> dnl This whole bit snagged from libgfortran.
>>>>
>>>> sinclude(../libtool.m4)
>>>> dnl The lines below arrange for aclocal not to bring an installed
>>>> dnl libtool.m4 into aclocal.m4, while still arranging for automake to
>>>> dnl add a definition of LIBTOOL to Makefile.in.
>>>> ifelse(,,,[AC_SUBST(LIBTOOL)
>>>> AC_DEFUN([AM_PROG_LIBTOOL])
>>>> ])
>>>> [hjl@gnu-tools-1 libsanitizer]$
>>>>
>>>> Otherwise, autoconf won't work.
>>>
>>> Sure, that's fine to include too.
>>>
>>
>> We need all changes in:
>>
>>       * acinclude.m4: New file.
>>       * Makefile.am (ACLOCAL_AMFLAGS): New.
>>       * configure.ac (AC_PREREQ): Set to 2.64.
>>       (AC_CONFIG_AUX_DIR): Set to "..".
>>       (--enable-version-specific-runtime-libs): New option.
>>       (AC_CANONICAL_SYSTEM): New.
>>       (AM_ENABLE_MULTILIB): Moved right after AM_INIT_AUTOMAKE.
>>       (toolexecdir): Support multilib.
>>       (toolexeclibdir): Likewise.
>>
>> Missing one will cause a problem.
>
> I don't understand why removing files needs
> --enable-version-specific-runtime-libs or multilibs.
>

This works.

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

	PR other/55304
	* acinclude.m4: New file.
	* Makefile.am (ACLOCAL_AMFLAGS): New.
	* configure.ac (AC_PREREQ): Set to 2.64.
	(AC_CONFIG_AUX_DIR): Set to "..".
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.

diff --git a/libsanitizer/Makefile.am b/libsanitizer/Makefile.am
index b28eb32..91e3434 100644
--- a/libsanitizer/Makefile.am
+++ b/libsanitizer/Makefile.am
@@ -1,3 +1,5 @@
+ACLOCAL_AMFLAGS = -I .. -I ../config
+
 SUBDIRS = interception sanitizer_common asan

 # Work around what appears to be a GNU make bug handling MAKEFLAGS
diff --git a/libsanitizer/acinclude.m4 b/libsanitizer/acinclude.m4
new file mode 100644
index 0000000..8e606e7
--- /dev/null
+++ b/libsanitizer/acinclude.m4
@@ -0,0 +1,10 @@
+dnl ----------------------------------------------------------------------
+dnl This whole bit snagged from libgfortran.
+
+sinclude(../libtool.m4)
+dnl The lines below arrange for aclocal not to bring an installed
+dnl libtool.m4 into aclocal.m4, while still arranging for automake to
+dnl add a definition of LIBTOOL to Makefile.in.
+ifelse(,,,[AC_SUBST(LIBTOOL)
+AC_DEFUN([AM_PROG_LIBTOOL])
+])
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac
index 3f186c2..cd57a69 100644
--- a/libsanitizer/configure.ac
+++ b/libsanitizer/configure.ac
@@ -1,10 +1,10 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.

-AC_PREREQ([2.68])
+AC_PREREQ([2.64])
 AC_INIT(package-unused, version-unused, libsanitizer)
 AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h])
-AC_CONFIG_AUX_DIR(.)
+AC_CONFIG_AUX_DIR(..)
 AM_INIT_AUTOMAKE(foreign)

 # Checks for programs.
-



More information about the Gcc-patches mailing list