From 93bf539055e8ad7972ff3de821b81df3c097001f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 13 Nov 2012 14:19:44 -0800 Subject: [PATCH] Move libsanitizer configure logic to subdirectory From-SVN: r193487 --- ChangeLog | 5 +++++ configure | 28 +++++++++++++++++++--------- configure.ac | 25 ++++++++++++++++--------- libsanitizer/ChangeLog.asan | 4 ++++ libsanitizer/configure.tgt | 28 ++++++++++++++++++++++++++++ 5 files changed, 72 insertions(+), 18 deletions(-) create mode 100644 libsanitizer/configure.tgt diff --git a/ChangeLog b/ChangeLog index bb42398dede..d1302b318ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-11-13 Richard Henderson + + * configure.ac: Move libsanitizer logic to subdirectory. + * configure: Regenerate. + 2012-11-13 Dodji Seketeli * configure.ac: Enable libsanitizer just on x86 linux for now. diff --git a/configure b/configure index 39df09f3d8f..45e521e9928 100755 --- a/configure +++ b/configure @@ -3196,6 +3196,25 @@ $as_echo "yes" >&6; } fi fi +# Disable libsanitizer on unsupported systems. +if test -d ${srcdir}/libsanitizer; then + if test x$enable_libsanitizer = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsanitizer support" >&5 +$as_echo_n "checking for libsanitizer support... " >&6; } + if (srcdir=${srcdir}/libsanitizer; \ + . ${srcdir}/configure.tgt; \ + test -n "$UNSUPPORTED") + then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + noconfigdirs="$noconfigdirs target-libsanitizer" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + fi +fi + # Disable libquadmath for some systems. case "${target}" in avr-*-*) @@ -3208,15 +3227,6 @@ case "${target}" in ;; esac -# Disable libsanitizer on all systems but x86 linux for now. -case "${target}" in - x86_64-*-linux-* | i?86-*-linux-*) - ;; - *) - noconfigdirs="$noconfigdirs target-libsanitizer" - ;; -esac - # Disable libssp for some systems. case "${target}" in avr-*-*) diff --git a/configure.ac b/configure.ac index 6c1b008b616..91ccb3dd0c6 100644 --- a/configure.ac +++ b/configure.ac @@ -538,6 +538,22 @@ if test -d ${srcdir}/libitm; then fi fi +# Disable libsanitizer on unsupported systems. +if test -d ${srcdir}/libsanitizer; then + if test x$enable_libsanitizer = x; then + AC_MSG_CHECKING([for libsanitizer support]) + if (srcdir=${srcdir}/libsanitizer; \ + . ${srcdir}/configure.tgt; \ + test -n "$UNSUPPORTED") + then + AC_MSG_RESULT([no]) + noconfigdirs="$noconfigdirs target-libsanitizer" + else + AC_MSG_RESULT([yes]) + fi + fi +fi + # Disable libquadmath for some systems. case "${target}" in avr-*-*) @@ -550,15 +566,6 @@ case "${target}" in ;; esac -# Disable libsanitizer on all systems but x86 linux for now. -case "${target}" in - x86_64-*-linux-* | i?86-*-linux-*) - ;; - *) - noconfigdirs="$noconfigdirs target-libsanitizer" - ;; -esac - # Disable libssp for some systems. case "${target}" in avr-*-*) diff --git a/libsanitizer/ChangeLog.asan b/libsanitizer/ChangeLog.asan index 55920921189..a12e908315c 100644 --- a/libsanitizer/ChangeLog.asan +++ b/libsanitizer/ChangeLog.asan @@ -1,3 +1,7 @@ +2012-11-13 Richard Henderson + + * configure.tgt: New file. + 2012-11-12 David S. Miller * asan/asan_linux.cc (GetPcSpBp): Add sparc support. diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt new file mode 100644 index 00000000000..ca7ac1fb141 --- /dev/null +++ b/libsanitizer/configure.tgt @@ -0,0 +1,28 @@ +# -*- shell-script -*- +# Copyright (C) 2012 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not see . + +# This is the target specific configuration file. This is invoked by the +# autoconf generated configure script. Putting it in a separate shell file +# lets us skip running autoconf when modifying target specific information. + +# Filter out unsupported systems. +case "${target}" in + x86_64-*-linux* | i?86-*-linux*) + ;; + *) + UNSUPPORTED=1 + ;; +esac