From patchwork Tue Jan 20 13:21:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkataramanan Kumar X-Patchwork-Id: 43364 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5FA48218DB for ; Tue, 20 Jan 2015 13:22:12 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id bs8sf10934433wib.1 for ; Tue, 20 Jan 2015 05:22:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:mime-version:date:message-id:subject:from:to :content-type:x-original-sender:x-original-authentication-results; bh=s/cJhCk4WAWcxhDMgpJr3MNYOtlRPkhWxdHHMxmMd94=; b=fJanVAON0NXFBbXOl5AZz5IKrov2T0VYhi600QQiT0UCN1PigvOstp2v37kayInkp0 TGlLBMH4riz5Tj9mq/O7BGADubQOWoV+qy799Ce7WFbVW+wWrrtiZoOICKYwqLqE0n48 +RnTJxGKyM0N0wiYU1mt6tnUBc5rkvuVL69evPlkOrxEAJPWZpqpR0c7KbJjh/ujaGCr y5sz+DzeFWc1XpjZ384IRw149CPDi2YOnLNAGCdF0U3JwxVGZ7r2Jz2jH1DWoVKZnQQk Ah43Fz6AnNtO1g+ohp85FXZOCsYHSTWCTF0DAMgt/Fy8bBtWl0e4n0jAdbM7kpisPDZT VAVA== X-Gm-Message-State: ALoCoQmLMhWKCm9P9l5CsrnUizLKsa58ayhBfeRxZxJYNlAhogXV5U2MBcdbxvcaCL6R749SBLaW X-Received: by 10.180.79.133 with SMTP id j5mr2026723wix.0.1421760131686; Tue, 20 Jan 2015 05:22:11 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.100 with SMTP id p4ls773595laj.24.gmail; Tue, 20 Jan 2015 05:22:11 -0800 (PST) X-Received: by 10.152.27.8 with SMTP id p8mr31475267lag.69.1421760131516; Tue, 20 Jan 2015 05:22:11 -0800 (PST) Received: from mail-la0-x232.google.com (mail-la0-x232.google.com. [2a00:1450:4010:c03::232]) by mx.google.com with ESMTPS id h9si13074619lah.13.2015.01.20.05.22.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Jan 2015 05:22:11 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::232 as permitted sender) client-ip=2a00:1450:4010:c03::232; Received: by mail-la0-f50.google.com with SMTP id pn19so34113932lab.9 for ; Tue, 20 Jan 2015 05:22:11 -0800 (PST) X-Received: by 10.152.45.4 with SMTP id i4mr38446236lam.74.1421760131353; Tue, 20 Jan 2015 05:22:11 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp1415952lbb; Tue, 20 Jan 2015 05:22:09 -0800 (PST) X-Received: by 10.68.203.35 with SMTP id kn3mr44474828pbc.78.1421760129071; Tue, 20 Jan 2015 05:22:09 -0800 (PST) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id nt7si4433526pbc.127.2015.01.20.05.22.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 05:22:09 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-389993-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 21383 invoked by alias); 20 Jan 2015 13:21:54 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 21374 invoked by uid 89); 20 Jan 2015 13:21:52 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f177.google.com Received: from mail-qc0-f177.google.com (HELO mail-qc0-f177.google.com) (209.85.216.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 20 Jan 2015 13:21:46 +0000 Received: by mail-qc0-f177.google.com with SMTP id p6so5538793qcv.8 for ; Tue, 20 Jan 2015 05:21:44 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.140.46.37 with SMTP id j34mr54343852qga.12.1421760104221; Tue, 20 Jan 2015 05:21:44 -0800 (PST) Received: by 10.140.91.202 with HTTP; Tue, 20 Jan 2015 05:21:44 -0800 (PST) Date: Tue, 20 Jan 2015 18:51:44 +0530 Message-ID: Subject: [PATCH]: Conditionally include target specific files while building TSAN From: Venkataramanan Kumar To: "gcc-patches@gcc.gnu.org" , Jakub Jelinek , Christophe Lyon , Dmitry Vyukov X-IsSubscribed: yes X-Original-Sender: venkataramanan.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::232 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Hi all, This patch changes make file and configure under libsanitizer, to separate out X86_64 specific file "tsan_rtl_amd64.S" from getting build for targets other than X86_64. Ok for trunk? Please review. regards, Venkat, ChangeLog ---------------- 2015-01-19 Venkataramanan Kumar * configure.ac (TSAN_TARGET_DEPENDENT_OBJECTS): Define. * configure: Regenerate. * tsan/Makefile.am (EXTRA_libtsan_la_SOURCES): Define, (libtsan_la_DEPENDENCIES): Likewise. * Makefile.in: Regenerate. * asan/Makefile.in: Regenerate. * interception/Makefile.in: Regenerate. * libbacktrace/Makefile.in: Regenerate. * lsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.in: Regenerate. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.in: Regenerate. diff --git a/libsanitizer/Makefile.in b/libsanitizer/Makefile.in index 0b89245..79a1be6 100644 --- a/libsanitizer/Makefile.in +++ b/libsanitizer/Makefile.in @@ -185,6 +185,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@ VERSION = @VERSION@ VIEW_FILE = @VIEW_FILE@ abs_builddir = @abs_builddir@ diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in index 1a65944..e61ceda 100644 --- a/libsanitizer/asan/Makefile.in +++ b/libsanitizer/asan/Makefile.in @@ -194,6 +194,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@ VERSION = @VERSION@ VIEW_FILE = @VIEW_FILE@ abs_builddir = @abs_builddir@ diff --git a/libsanitizer/configure b/libsanitizer/configure index 108b1fd..4a90acf 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -604,6 +604,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +TSAN_TARGET_DEPENDENT_OBJECTS LIBBACKTRACE_SUPPORTED_FALSE LIBBACKTRACE_SUPPORTED_TRUE BACKTRACE_SUPPORTS_THREADS @@ -12019,7 +12020,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12022 "configure" +#line 12023 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12125,7 +12126,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12128 "configure" +#line 12129 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16362,6 +16363,12 @@ if test "x$TSAN_SUPPORTED" = "xyes"; then fi +case "${target}" in + x86_64-*-linux-*) TSAN_TARGET_DEPENDENT_OBJECTS='tsan_rtl_amd64.lo' ;; + *) TSAN_TARGET_DEPENDENT_OBJECTS='' ;; +esac + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac index e672131..03208db 100644 --- a/libsanitizer/configure.ac +++ b/libsanitizer/configure.ac @@ -346,4 +346,10 @@ _EOF ]) fi +case "${target}" in + x86_64-*-linux-*) TSAN_TARGET_DEPENDENT_OBJECTS='tsan_rtl_amd64.lo' ;; + *) TSAN_TARGET_DEPENDENT_OBJECTS='' ;; +esac +AC_SUBST([TSAN_TARGET_DEPENDENT_OBJECTS]) + AC_OUTPUT diff --git a/libsanitizer/interception/Makefile.in b/libsanitizer/interception/Makefile.in index 8ce4fd0..0e261b4 100644 --- a/libsanitizer/interception/Makefile.in +++ b/libsanitizer/interception/Makefile.in @@ -150,6 +150,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@ VERSION = @VERSION@ VIEW_FILE = @VIEW_FILE@ abs_builddir = @abs_builddir@ diff --git a/libsanitizer/libbacktrace/Makefile.in b/libsanitizer/libbacktrace/Makefile.in index a4f9912..7d2e244 100644 --- a/libsanitizer/libbacktrace/Makefile.in +++ b/libsanitizer/libbacktrace/Makefile.in @@ -192,6 +192,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@ VERSION = @VERSION@ VIEW_FILE = @VIEW_FILE@ abs_builddir = @abs_builddir@ diff --git a/libsanitizer/lsan/Makefile.in b/libsanitizer/lsan/Makefile.in index bb6f95f..3ad4401 100644 --- a/libsanitizer/lsan/Makefile.in +++ b/libsanitizer/lsan/Makefile.in @@ -185,6 +185,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@ VERSION = @VERSION@ VIEW_FILE = @VIEW_FILE@ abs_builddir = @abs_builddir@ diff --git a/libsanitizer/sanitizer_common/Makefile.in b/libsanitizer/sanitizer_common/Makefile.in index 86bf787..4a0e727 100644 --- a/libsanitizer/sanitizer_common/Makefile.in +++ b/libsanitizer/sanitizer_common/Makefile.in @@ -178,6 +178,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@ VERSION = @VERSION@ VIEW_FILE = @VIEW_FILE@ abs_builddir = @abs_builddir@ diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am index c532590..abfafb7 100644 --- a/libsanitizer/tsan/Makefile.am +++ b/libsanitizer/tsan/Makefile.am @@ -37,13 +37,15 @@ tsan_files = \ tsan_stat.cc \ tsan_suppressions.cc \ tsan_symbolize.cc \ - tsan_sync.cc \ - tsan_rtl_amd64.S + tsan_sync.cc -libtsan_la_SOURCES = $(tsan_files) -libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la +libtsan_la_SOURCES = $(tsan_files) +EXTRA_libtsan_la_SOURCES = tsan_rtl_amd64.S +libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(TSAN_TARGET_DEPENDENT_OBJECTS) +libtsan_la_DEPENDENCIES = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(TSAN_TARGET_DEPENDENT_OBJECTS) if LIBBACKTRACE_SUPPORTED libtsan_la_LIBADD += $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la +libtsan_la_DEPENDENCIES +=$(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la endif libtsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libtsan) diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in index 93ffc9e..c4e6490 100644 --- a/libsanitizer/tsan/Makefile.in +++ b/libsanitizer/tsan/Makefile.in @@ -36,6 +36,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @LIBBACKTRACE_SUPPORTED_TRUE@am__append_1 = $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la +@LIBBACKTRACE_SUPPORTED_TRUE@am__append_2 = $(top_builddir)/libbacktrace/libsanitizer_libbacktrace.la subdir = tsan DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -80,10 +81,6 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(toolexeclib_LTLIBRARIES) am__DEPENDENCIES_1 = -libtsan_la_DEPENDENCIES = \ - $(top_builddir)/sanitizer_common/libsanitizer_common.la \ - $(top_builddir)/interception/libinterception.la \ - $(am__append_1) $(am__DEPENDENCIES_1) am__objects_1 = tsan_clock.lo tsan_fd.lo tsan_flags.lo \ tsan_ignoreset.lo tsan_interceptors.lo tsan_interface_ann.lo \ tsan_interface_atomic.lo tsan_interface.lo \ @@ -92,7 +89,7 @@ am__objects_1 = tsan_clock.lo tsan_fd.lo tsan_flags.lo \ tsan_platform_windows.lo tsan_report.lo tsan_rtl.lo \ tsan_rtl_mutex.lo tsan_rtl_report.lo tsan_rtl_thread.lo \ tsan_stack_trace.lo tsan_stat.lo tsan_suppressions.lo \ - tsan_symbolize.lo tsan_sync.lo tsan_rtl_amd64.lo + tsan_symbolize.lo tsan_sync.lo am_libtsan_la_OBJECTS = $(am__objects_1) libtsan_la_OBJECTS = $(am_libtsan_la_OBJECTS) libtsan_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ @@ -125,7 +122,7 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libtsan_la_SOURCES) +SOURCES = $(libtsan_la_SOURCES) $(EXTRA_libtsan_la_SOURCES) ETAGS = etags CTAGS = ctags ACLOCAL = @ACLOCAL@ @@ -201,6 +198,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@ VERSION = @VERSION@ VIEW_FILE = @VIEW_FILE@ abs_builddir = @abs_builddir@ @@ -306,14 +304,19 @@ tsan_files = \ tsan_stat.cc \ tsan_suppressions.cc \ tsan_symbolize.cc \ - tsan_sync.cc \ - tsan_rtl_amd64.S + tsan_sync.cc -libtsan_la_SOURCES = $(tsan_files) +libtsan_la_SOURCES = $(tsan_files) +EXTRA_libtsan_la_SOURCES = tsan_rtl_amd64.S libtsan_la_LIBADD = \ $(top_builddir)/sanitizer_common/libsanitizer_common.la \ $(top_builddir)/interception/libinterception.la \ - $(am__append_1) $(LIBSTDCXX_RAW_CXX_LDFLAGS) + $(TSAN_TARGET_DEPENDENT_OBJECTS) $(am__append_1) \ + $(LIBSTDCXX_RAW_CXX_LDFLAGS) +libtsan_la_DEPENDENCIES = \ + $(top_builddir)/sanitizer_common/libsanitizer_common.la \ + $(top_builddir)/interception/libinterception.la \ + $(TSAN_TARGET_DEPENDENT_OBJECTS) $(am__append_2) libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(link_libtsan) # Work around what appears to be a GNU make bug handling MAKEFLAGS diff --git a/libsanitizer/ubsan/Makefile.in b/libsanitizer/ubsan/Makefile.in index 0bec083..e0f8914 100644 --- a/libsanitizer/ubsan/Makefile.in +++ b/libsanitizer/ubsan/Makefile.in @@ -181,6 +181,7 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TSAN_TARGET_DEPENDENT_OBJECTS = @TSAN_TARGET_DEPENDENT_OBJECTS@ VERSION = @VERSION@ VIEW_FILE = @VIEW_FILE@ abs_builddir = @abs_builddir@