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

login
register
mail settings
Submitter H.J. Lu
Date Nov. 15, 2012, 3:14 p.m.
Message ID <CAMe9rOobsPX7hCuWqwKhk=64MCKAbao7F9qj0x8Ba+JXOPvFwg@mail.gmail.com>
Download mbox | patch
Permalink /patch/199318/
State New
Headers show

Comments

H.J. Lu - Nov. 15, 2012, 3:14 p.m.
On Thu, Nov 15, 2012 at 6:44 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Nov 15, 2012 at 6:19 AM, Markus Trippelsdorf
> <markus@trippelsdorf.de> wrote:
>> On 2012.11.15 at 06:01 -0800, H.J. Lu wrote:
>>> On Thu, Nov 15, 2012 at 12:47 AM, Markus Trippelsdorf
>>> <markus@trippelsdorf.de> wrote:
>>> > On 2012.11.14 at 08:21 -0800, H.J. Lu wrote:
>>> >> On Tue, Nov 13, 2012 at 3:48 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
>>> >> > Il 14/11/2012 00:43, H.J. Lu ha scritto:
>>> >> >> This works.
>>> >> >
>>> >> > Ok, then please test remove install-sh and friends and do
>>> >> > autoconf/automake again.  If it works, commit the result (I don't care
>>> >> > if you make it one or two commits).
>>> >> >
>>> >> > Then, wait 24 hours for breakages and commit the multilib patch.
>>> >> >
>>> >> > Paolo
>>> >>
>>> >> This is the multilib patch I will commit later.
>>> >
>>> > And it still doesn't work (after applying the fix in my other reply):
>>> >
>>> > make[4]: Entering directory `/var/tmp/gcc_build_dir/x86_64-pc-linux-gnu/libsanitizer/asan'
>>> >  /bin/mkdir -p '/usr/lib/gcc/x86_64-pc-linux-gnu/'
>>> >  /bin/sh ../libtool   --mode=install /usr/bin/install -c   libasan.la '/usr/lib/gcc/x86_64-pc-linux-gnu/'
>>> > libtool: install: error: cannot install `libasan.la' to a directory not ending in /usr/lib/gcc/x86_64-pc-linux-gnu/
>>> > make[4]: *** [install-toolexeclibLTLIBRARIES] Error 1
>>> >
>>>
>>> It works for me.  Did you do
>>>
>>> # ./contrib/gcc_update --touch
>>
>> Yes.
>> I've used the following to configure gcc:
>>
>> ~/gcc/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-libsanitizer --enable-lto --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-initfini-array --with-gold --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --disable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.0/python --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --disable-bootstrap --with-boot-ldflags="-Wl,-O1,--hash-style=gnu,--as-needed,--gc-sections" --enable-version-specific-runtime-libs --disable-libstdcxx-pch --enable-libstdcxx-time=yes
>>
>> --
>> Markus
>
> I can reproduce it with --enable-version-specific-runtime-libs.  I am
> taking a look.
>

I am checking in this patch.

H.J.
---

Patch

diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index 62e884e..b740253 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,12 @@ 
+2012-11-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* asan/Makefile.am (gcc_version): New.
+	* interception/Makefile.am (gcc_version): Likewise.
+	* sanitizer_common/Makefile.am (gcc_version): Likewise.
+	* asan/Makefile.in: Regenerated.
+	* interception/Makefile.in: Likewise.
+	* sanitizer_common/Makefile.in: Likewise.
+
 2012-11-14  H.J. Lu  <hongjiu.lu@intel.com>

 	PR other/55291
diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am
index c76c158..5a0a8c5 100644
--- a/libsanitizer/asan/Makefile.am
+++ b/libsanitizer/asan/Makefile.am
@@ -1,5 +1,8 @@ 
 AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir)

+# May be used by toolexeclibdir.
+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+
 DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1
-DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1
 AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings
-pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions
-fomit-frame-pointer -funwind-tables -fvisibility=hidden
-Wno-variadic-macros -Wno-c99-extensions
 ACLOCAL_AMFLAGS = -I m4
diff --git a/libsanitizer/interception/Makefile.am
b/libsanitizer/interception/Makefile.am
index 4fd200c..b92a180 100644
--- a/libsanitizer/interception/Makefile.am
+++ b/libsanitizer/interception/Makefile.am
@@ -1,5 +1,8 @@ 
 AM_CPPFLAGS = -I $(top_srcdir)/include

+# May be used by toolexeclibdir.
+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+
 DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
 AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings
-pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions
-fomit-frame-pointer -funwind-tables -fvisibility=hidden
-Wno-variadic-macros -Wno-c99-extensions
 ACLOCAL_AMFLAGS = -I m4
diff --git a/libsanitizer/sanitizer_common/Makefile.am
b/libsanitizer/sanitizer_common/Makefile.am
index 70df1d9..2968c05 100644
--- a/libsanitizer/sanitizer_common/Makefile.am
+++ b/libsanitizer/sanitizer_common/Makefile.am
@@ -1,5 +1,8 @@ 
 AM_CPPFLAGS = -I $(top_srcdir)/include

+# May be used by toolexeclibdir.
+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+
 DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
 AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings
-pedantic -Wno-long-long  -fPIC -fno-builtin -fno-exceptions
-fomit-frame-pointer -funwind-tables -fvisibility=hidden
-Wno-variadic-macros -Wno-c99-extensions
 ACLOCAL_AMFLAGS = -I m4