From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91132 invoked by alias); 22 Jul 2019 08:40:05 -0000 Mailing-List: contact libabigail-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Id: List-Subscribe: Sender: libabigail-owner@sourceware.org Received: (qmail 91106 invoked by uid 89); 22 Jul 2019 08:40:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HTo:U*libabigail, HX-Languages-Length:1915, H*MI:google X-Spam-Status: No, score=-23.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mail-ua1-f73.google.com Received: from mail-ua1-f73.google.com (HELO mail-ua1-f73.google.com) (209.85.222.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Jul 2019 08:39:59 +0000 Received: by mail-ua1-f73.google.com with SMTP id c21so3623046uao.21 for ; Mon, 22 Jul 2019 01:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=6cm0MOFuh+ZsGsRRXkJmzQiJi63YSgbj+6fiorUnpa8=; b=o7z1xD8Ba01mdmtcTjaBtcvj3uL64wGqESr+yZv3JyAV2AymCYHLpV0CYAPLsuw6L6 mMzR+WW3Nv1pbXK6vNmXDJhxWwaqsZ9SyeOpzqxhgwyJynjHH+3Jy1ilN4mTNx7jB4Nk HlzgYH8mwYdm1z+F9YWxlxz2m5+7/dNXpUZdW9pKgloD9QjRlZvP7SYxx0RTtTg6q71P WBbUUmJxan8EOCokH6hS5LZhdGkIPs8Yk2CRC2b/0aXtEHbm5fcbpz7qr5L+dY6yb0R5 Vu5eRg1vPg4rVyOoD37vqlWbnEfIFmgNktgFb/8FviG2EEEJYcIRmSTnSDj/2jEkoU3t IprA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=6cm0MOFuh+ZsGsRRXkJmzQiJi63YSgbj+6fiorUnpa8=; b=EBA7iu30gSsW9UcQJQZpagVn9DdnZnrO0nAKmV4mKdU/01G4Bc4OA+KSJN4U0ZzRBb tbMRinO2PBRXD84G6MfMwyOKT5LIzqUwHJOP0k7fKtjv0DV3CLqQtagc1kjVvlgi1NYU ummS9jT49FKsGi+gxTYw4H8kDRtrmrnMGYRi5ngVJjSLLy41CEAVlaeGhxBG9+r2Uso+ 5VZvi3+/2JrmP57TFCg6ICzsCqIs4ebGwH0GmrDkYhUG2vSTxt1DTqRQhxGtjVCCY9Jp fI3qFVV4olx0pw/veSRDntKKoxSoFbRfxEe4lSpRhY0WNFpeP7XzPV7iOu+Z9/moqvzG ywGA== X-Gm-Message-State: APjAAAXt+CH+aPQ/jmnInGeGho6f+atyt0k7MsefH7eV56B4P20HsKjZ 72Y1uAU6V2qFGhNB+mijQVieteWtZcy3/cn/aC2xi+uSNetqhtUO+Stni2ezb1TRU/GOaWVuuHc P2hTg+7Ly8l+Gbt2Ny7HrOuMrWIc7mJ5b/5FYK1Ch8DWcaOg3JR+5pyyq3Sy8tGF54ilY/K4= X-Google-Smtp-Source: APXvYqzCdonajSlMgkG8pEjxSl/xY0Yicm0SwkqD2LLA3v52jWYOhsseTVjq98Zv5Hb3jDJWgGp9WsbbtFKcsQ== X-Received: by 2002:a1f:f282:: with SMTP id q124mr24825174vkh.4.1563784797315; Mon, 22 Jul 2019 01:39:57 -0700 (PDT) Date: Tue, 01 Jan 2019 00:00:00 -0000 Message-Id: <20190722083940.120796-1-maennich@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.657.g960e92d24f-goog Subject: [PATCH v1] make: ensure a consistent C++ standard use From: "Matthias Maennich via libabigail" Reply-To: Matthias Maennich To: libabigail@sourceware.org Cc: dodji@seketeli.org, kernel-team@android.com, Matthias Maennich , Chun-Hung Wu Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-q3/txt/msg00015.txt.bz2 On older compilers (such as g++ 4.8), the default C++ standard is set to gnu++98. When compiling libabigail with --enable-cxx11=yes, src/ and tests/ where compiled with the correct flag, while tools/ was compiled without specifying a standard. With a compiler falling back to gnu++98 that leads to unresolved references when linking the tools against the libabigail library. Fix that by consistently using the std= flag across the code base. * configure.ac: add -std=c++11 flag to CXXFLAGS when compiling for C++11 * src/Makefile.am: drop now obsolete setting of the -std flag * tests/Makefile.am: likewise Reported-by: Chun-Hung Wu Signed-off-by: Matthias Maennich --- configure.ac | 4 ++++ src/Makefile.am | 1 - tests/Makefile.am | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index afcc1db065e9..54ab695ae1e4 100644 --- a/configure.ac +++ b/configure.ac @@ -607,6 +607,10 @@ if test x$ENABLE_UBSAN = xyes; then CXXFLAGS="$CXXFLAGS -fsanitize=undefined" fi +if test x$ENABLE_CXX11 = xyes; then + CXXFLAGS="$CXXFLAGS -std=c++11" +fi + dnl Check if several decls and constant are defined in dependant dnl libraries HAS_EM_AARCH64=no diff --git a/src/Makefile.am b/src/Makefile.am index 7c02d538c50d..1d0e2dcecdee 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,6 @@ if ENABLE_CXX11 CXX11_SOURCES = abg-viz-common.cc \ abg-viz-dot.cc \ abg-viz-svg.cc -AM_CXXFLAGS += "-std=c++11" else CXX11_SOURCES = endif diff --git a/tests/Makefile.am b/tests/Makefile.am index 2104300aed22..14e83608b0e5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -13,7 +13,6 @@ AM_CXXFLAGS = $(VISIBILITY_FLAGS) CXX11_TESTS = if ENABLE_CXX11 CXX11_TESTS += runtestsvg -AM_CXXFLAGS += "-std=c++11" endif FEDABIPKGDIFF_TEST = -- 2.22.0.657.g960e92d24f-goog