From owner-svn-src-all@FreeBSD.ORG Tue Nov 5 15:43:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D49E095; Tue, 5 Nov 2013 15:43:35 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 9602D20EE; Tue, 5 Nov 2013 15:43:31 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A6D567300A; Tue, 5 Nov 2013 16:45:19 +0100 (CET) Date: Tue, 5 Nov 2013 16:45:19 +0100 From: Luigi Rizzo To: Dimitry Andric Subject: Re: svn commit: r257691 - head/gnu/lib/libgcc Message-ID: <20131105154519.GD65141@onelab2.iet.unipi.it> References: <201311050737.rA57bZkq059529@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311050737.rA57bZkq059529@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 15:43:35 -0000 On Tue, Nov 05, 2013 at 07:37:35AM +0000, Dimitry Andric wrote: > Author: dim > Date: Tue Nov 5 07:37:35 2013 > New Revision: 257691 > URL: http://svnweb.freebsd.org/changeset/base/257691 > > Log: > Fix libgcc build with gcc after r257645, by using -Wno-static-in-inline > for clang only. thanks. I wonder if it is worthwhile adding to the default rules some compiler-specific CFLAGS, say CFLAGS_CLANG and CFLAGS_GCC (there is only a handful of cases now so maybe it is overkill, and it harms readability; on the other hand, the Makefiles already make a lot of assumptions on variable names) % find ../head -name Makefile -exec grep -H COMPILER_TYPE \{\} \; ../head/gnu/lib/libgcc/Makefile:.if ${COMPILER_TYPE} != "clang" || ${TARGET_CPUARCH} != "arm" ../head/gnu/lib/libgcc/Makefile:.if ${COMPILER_TYPE} == "clang" ../head/gnu/lib/libsupc++/Makefile:.if ${COMPILER_TYPE} == "clang" ../head/gnu/lib/libstdc++/Makefile:.if ${COMPILER_TYPE} == "clang" ../head/tools/tools/ath/athstats/Makefile:.if (${COMPILER_TYPE} == "clang") ../head/tools/tools/net80211/wlanstats/Makefile:.if ${COMPILER_TYPE} == "clang" cheers luigi > Modified: > head/gnu/lib/libgcc/Makefile > > Modified: head/gnu/lib/libgcc/Makefile > ============================================================================== > --- head/gnu/lib/libgcc/Makefile Tue Nov 5 07:36:17 2013 (r257690) > +++ head/gnu/lib/libgcc/Makefile Tue Nov 5 07:37:35 2013 (r257691) > @@ -36,7 +36,9 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F > # function with external linkage [-Wstatic-in-inline] > # gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); > # ^ > +.if ${COMPILER_TYPE} == "clang" > CFLAGS+= -Wno-static-in-inline > +.endif > > LDFLAGS+= -nodefaultlibs > LDADD+= -lc