Patchwork Enable libsanitizer just on x86 linux for now

login
register
mail settings
Submitter Dodji Seketeli
Date Nov. 13, 2012, 3:01 p.m.
Message ID <87zk2lzgv7.fsf@redhat.com>
Download mbox | patch
Permalink /patch/198701/
State New
Headers show

Comments

Dodji Seketeli - Nov. 13, 2012, 3:01 p.m.
Hello,

This patch builds libsanitizer only on x86_64 and i?86 linux targets
for now.  I guess The build can be enabled on other targets when they
are ready.

OK for trunk?

ChangeLog:

	* configure.ac: Enable libsanitizer just on x86 linux for now.
	* configure: Re-generate.
---
 configure    | 7 +++----
 configure.ac | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)
Diego Novillo - Nov. 13, 2012, 3:05 p.m.
On Tue, Nov 13, 2012 at 10:01 AM, Dodji Seketeli <dodji@redhat.com> wrote:
> Hello,
>
> This patch builds libsanitizer only on x86_64 and i?86 linux targets
> for now.  I guess The build can be enabled on other targets when they
> are ready.
>
> OK for trunk?
>
> ChangeLog:
>
>         * configure.ac: Enable libsanitizer just on x86 linux for now.
>         * configure: Re-generate.

OK.  Thanks.


Diego.
Eric Botcazou - Nov. 13, 2012, 3:14 p.m.
> This patch builds libsanitizer only on x86_64 and i?86 linux targets
> for now.  I guess The build can be enabled on other targets when they
> are ready.

Note that, even on these platforms, it cannot be installed:

libtool: install: error: cannot install `libasan.la' to a directory not ending
in /usr/gnat/lib
make[4]: *** [install-toolexeclibLTLIBRARIES] Error 1
make[4]: Leaving directory
Jack Howarth - Nov. 13, 2012, 3:53 p.m.
On Tue, Nov 13, 2012 at 04:14:10PM +0100, Eric Botcazou wrote:
> > This patch builds libsanitizer only on x86_64 and i?86 linux targets
> > for now.  I guess The build can be enabled on other targets when they
> > are ready.
> 
> Note that, even on these platforms, it cannot be installed:
> 
> libtool: install: error: cannot install `libasan.la' to a directory not ending
> in /usr/gnat/lib
> make[4]: *** [install-toolexeclibLTLIBRARIES] Error 1
> make[4]: Leaving directory
> 
> -- 
> Eric Botcazou

   I also noticed while trying to regenerate the libsanitizer Makefile.in on darwin
that libsanitizer/configure.ac has...

AC_PREREQ([2.68])

instead of the expected...

AC_PREREQ([2.64])

Not good.
        Jack
Paolo Carlini - Nov. 13, 2012, 4:12 p.m.
On 11/13/2012 04:53 PM, Jack Howarth wrote:
> I also noticed while trying to regenerate the libsanitizer Makefile.in 
> on darwin that libsanitizer/configure.ac has... AC_PREREQ([2.68]) 
> instead of the expected... AC_PREREQ([2.64])
This is other/55304, isn't it?

Paolo.
Joseph S. Myers - Nov. 13, 2012, 4:59 p.m.
On Tue, 13 Nov 2012, Dodji Seketeli wrote:

> 	* configure.ac: Enable libsanitizer just on x86 linux for now.
> 	* configure: Re-generate.

Note that the preferred approach is the approach used for libatomic and 
libitm, of the toplevel script using a script fragment from the 
subdirectory to determine what architectures are supported - ideally a 
script fragment designed to be shared by toplevel and by the 
subdirectory's own configure script, if the subdirectory has existing case 
statements over targets.  (It would be good to convert more existing 
projects that share the common toplevel to that scheme as well.)

That way, you don't have a toplevel change that needs merging to the src 
repository for every individual change to the systems supported in a 
particular subdirectory.
Andreas Schwab - Nov. 13, 2012, 8:20 p.m.
Dodji Seketeli <dodji@redhat.com> writes:

> I guess The build can be enabled on other targets when they are ready.

How to test that?  There doesn't seem to be a testsuite included.

Andreas.

Patch

diff --git a/configure b/configure
index c387e92..39df09f 100755
--- a/configure
+++ b/configure
@@ -3208,12 +3208,11 @@  case "${target}" in
     ;;
 esac
 
-# Disable libsanitizer for some systems.
+# Disable libsanitizer on all systems but x86 linux for now.
 case "${target}" in
-  cris-*-* | crisv32-*-* | mmix-*-*)
-    noconfigdirs="$noconfigdirs target-libsanitizer"
+  x86_64-*-linux-* | i?86-*-linux-*)
     ;;
-  powerpc-*-aix* | rs6000-*-aix*)
+  *)
     noconfigdirs="$noconfigdirs target-libsanitizer"
     ;;
 esac
diff --git a/configure.ac b/configure.ac
index 1d958b4..6c1b008 100644
--- a/configure.ac
+++ b/configure.ac
@@ -550,12 +550,11 @@  case "${target}" in
     ;;
 esac
 
-# Disable libsanitizer for some systems.
+# Disable libsanitizer on all systems but x86 linux for now.
 case "${target}" in
-  cris-*-* | crisv32-*-* | mmix-*-*)
-    noconfigdirs="$noconfigdirs target-libsanitizer"
+  x86_64-*-linux-* | i?86-*-linux-*)
     ;;
-  powerpc-*-aix* | rs6000-*-aix*)
+  *)
     noconfigdirs="$noconfigdirs target-libsanitizer"
     ;;
 esac