From patchwork Fri Jan 27 01:20:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Kosnik X-Patchwork-Id: 138097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 38F4DB6F13 for ; Fri, 27 Jan 2012 12:21:23 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1328232085; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: Mime-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=v+uTcAE1fy0/1ldOHhcgAt6ulTM=; b=fX3yFNbj/XpXc2D TV+lIuGhdqvthALqOAeF5IzlBlVBlAQwGjk/RtKYfb7Nikmy8iYJCXx3rTiIF8oR xKWCsG9q/HSGISCUzR1+gghlcVzIJ+2cwTSvvCRYHzs4Yz/J4WJ2Sno0H4lhEqv5 2aqoi1wI9o80O8XOjLn88Kyt8hOw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:Mime-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=tp4xJEJyTYVfTCDD5wGSp0/3KlljJriFVQW5mQlDXeqisXE321DWw9lb8cA7GL VufYT09QbPsSQVhYoViIRSjjGtGpX7l5lVXzgAHT3QXE+CI9gacGpoMPWAeRn3nf BPfw6qfYq4qHaWB7HGdzmEK8oFfulIqxPDn3k717l/KEc=; Received: (qmail 27913 invoked by alias); 27 Jan 2012 01:21:15 -0000 Received: (qmail 27896 invoked by uid 22791); 27 Jan 2012 01:21:14 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_GD, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Jan 2012 01:20:56 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0R1KtE8023265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 26 Jan 2012 20:20:56 -0500 Received: from shotwell (ovpn-113-141.phx2.redhat.com [10.3.113.141]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0R1Ksv0030342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 26 Jan 2012 20:20:55 -0500 Date: Thu, 26 Jan 2012 17:20:26 -0800 From: Benjamin Kosnik To: Matthias Klose Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [v3] libstdc++/49829 Message-ID: <20120126172026.67d9758b@shotwell> In-Reply-To: <4F200D9E.20203@ubuntu.com> References: <20120123152716.67be01bb@shotwell> <4F1EDFBE.1000107@ubuntu.com> <20120124212637.47fb3b10@shotwell> <4F200D9E.20203@ubuntu.com> Mime-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk 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 > > OK. The attached is closer, but still not quite there. > > one step further, to avoid the endless recursion in the install-debug > target. unsure if that is the right approach. the install now works, > but the debug library is now built in the install step, not in the > build step. As checked in. tested x86/linux -benjamin 2012-01-27 Benjamin Kosnik Matthias Klose * configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Use -gdwarf-4 -g3 -O0. * configure.in: Regenerated. * src/Makefile.am (all-once, install-data-once): New rules. (all-local, install-data-local): Use them. (build-debug, install-debug): Tweak. * src/Makefile.in: Regenerate. diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index c5f7901..7607e5b 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -124,7 +124,7 @@ GLIBCXX_ENABLE_LONG_LONG([yes]) GLIBCXX_ENABLE_WCHAR_T([yes]) GLIBCXX_ENABLE_C99([yes]) GLIBCXX_ENABLE_CONCEPT_CHECKS([no]) -GLIBCXX_ENABLE_DEBUG_FLAGS(["-g3 -O0"]) +GLIBCXX_ENABLE_DEBUG_FLAGS(["-gdwarf-4 -g3 -O0"]) GLIBCXX_ENABLE_DEBUG([no]) GLIBCXX_ENABLE_PARALLEL([yes]) GLIBCXX_ENABLE_CXX_FLAGS diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 87b2a16..2cd2774 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -168,16 +168,16 @@ version_arg = version_dep = endif -# Added rules. -# 1 debug library -# 2 supra-convenience library -if GLIBCXX_BUILD_DEBUG -all-local: libstdc++convenience.la build_debug -install-data-local: install_debug -else -all-local: libstdc++convenience.la -install-data-local: -endif + +# Control additional build primary rules. +# EXTRA_LTLIBRARIES = +all-once: libstdc++convenience.la $(STAMP_DEBUG) +install-data-once: $(STAMP_INSTALL_DEBUG) + +all-local: all-once +install-data-local: install-data-once +clean-local: + rm -rf libstdc++convenience.la stamp* $(CLEAN_DEBUG) # Make a non-installed convenience library, so that --disable-static # may work. @@ -188,13 +188,26 @@ libstdc++convenience.la: $(toolexeclib_LTLIBRARIES) fi; \ echo `date` > stamp-libstdc++convenience; -debugdir = debug +# Added rules. +# 1 debug library +# 2 supra-convenience library +if GLIBCXX_BUILD_DEBUG +STAMP_DEBUG = build-debug +STAMP_INSTALL_DEBUG = install-debug +CLEAN_DEBUG = debug +else +STAMP_DEBUG = +STAMP_INSTALL_DEBUG = +CLEAN_DEBUG = +endif -# Build a set of debug objects here. +# Build a debug variant. # Take care to fix all possibly-relative paths. +debugdir = ${glibcxx_builddir}/src/debug stamp-debug: if test ! -d ${debugdir}; then \ mkdir -p ${debugdir}; \ + for d in $(SUBDIRS); do mkdir -p ${debugdir}/$$d; done; \ (cd ${debugdir}; \ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \ -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \ @@ -202,16 +215,30 @@ stamp-debug: -e 's/VPATH = \.\./VPATH = ..\/../' \ -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \ -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \ - -e 's/all-local: build_debug/all-local:/' \ - -e 's/install-data-local: install_debug/install-data-local:/' \ - < ../Makefile > Makefile) ; \ + < ../Makefile > Makefile ; \ + for d in . $(SUBDIRS); do \ + sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \ + -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \ + -e 's/srcdir = \.\./srcdir = ..\/../' \ + -e 's/VPATH = \.\./VPATH = ..\/../' \ + -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \ + -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \ + < ../$$d/Makefile > $$d/Makefile ; \ + done) ; \ fi; \ echo `date` > stamp-debug; -build_debug: stamp-debug - (cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' all) - -# Install debug library here. -install_debug: - (cd ${debugdir} && $(MAKE) \ - toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) +build-debug: stamp-debug + (cd ${debugdir}; \ + mv Makefile Makefile.tmp; \ + sed -e 's,all-local: all-once,all-local:,' \ + -e 's,install-data-local: install-data-once,install-data-local:,' \ + -e 's,src/c,src/debug/c,' \ + < Makefile.tmp > Makefile ; \ + $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ; + +# Install debug library. +install-debug: build-debug + (cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ;