From owner-svn-ports-all@freebsd.org Wed Jul 18 11:51:06 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB0E71046693; Wed, 18 Jul 2018 11:51:05 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87E5C768C9; Wed, 18 Jul 2018 11:51:05 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E350821D3C; Wed, 18 Jul 2018 07:51:04 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute4.internal (MEProxy); Wed, 18 Jul 2018 07:51:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=FoLeIX Fw+6e7sILDo4ZkjsFTLjeTCd1y/P/ayGaEMtI=; b=AZT+cJ5VsS5C4HpHR1+hBV YpDyj8bmhXtXIcg2TCPB6BCeL23zh+1hyYAK2FBfn9cEorrE2ANQn/CJeuvja11I QadVYLg3r1MoAowQjWGRgBSHDGPQILrNlcvKYzWCzBYLWKqxC+UEfrs+FvfAx1gS HGNjlP0DSTeMUfhxFKuMqj28D1r6PhPCsAjIMPELaDkMwIMuH9LepxGhyzDnjW/k wtH9g8V4OoDSUE42ZT7YmzO5kWr0VNL/PU2Xe/Ih4K6O9DYI2XxmfmSMNBLYmVZ7 akunf3GsWCREzj6uZXuIr9lEOuaeY1TeL/Lql/rzpzgkeFlInSITm1ORfUsZhmLg == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 5FCB49E0D2; Wed, 18 Jul 2018 07:51:04 -0400 (EDT) Message-Id: <1531914664.994677.1444750728.1BA9F677@webmail.messagingengine.com> From: Tobias Kortkamp To: Dmitry Marakasov Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-e74bb3a0 References: <201807121411.w6CEBlZn074328@repo.freebsd.org> <1531464216.1955680.1439350032.7AC058F0@webmail.messagingengine.com> <20180713135127.GK7353@hades.panopticon> Date: Wed, 18 Jul 2018 13:51:04 +0200 In-Reply-To: <20180713135127.GK7353@hades.panopticon> Subject: Re: svn commit: r474520 - head/x11-clocks/glclock X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 11:51:06 -0000 On Fri, Jul 13, 2018, at 15:51, Dmitry Marakasov wrote: > * Tobias Kortkamp (tobik@FreeBSD.org) wrote: > > > > Author: amdmi3 > > > Date: Thu Jul 12 14:11:46 2018 > > > New Revision: 474520 > > > URL: https://svnweb.freebsd.org/changeset/ports/474520 > > > > > > Log: > > > - Fix build with clang 6 > > > > > > Modified: > > > head/x11-clocks/glclock/Makefile > > > > > > Modified: head/x11-clocks/glclock/Makefile > > > ============================================================================== > > > --- head/x11-clocks/glclock/Makefile Thu Jul 12 14:11:30 2018 (r474519) > > > +++ head/x11-clocks/glclock/Makefile Thu Jul 12 14:11:46 2018 (r474520) > > > @@ -15,6 +15,7 @@ USE_GL= gl glu glut > > > MAKEFILE= makefile > > > > > > CFLAGS+= -DIMAGE_PATH="\\\"${PREFIX}/lib/X11/glclock/\\\"" > > > +CXXFLAGS+= -Wno-c++11-narrowing > > > > Why is this needed after r474251? Was the previous fix not enough? > > It wasn't, I wasn't aware of your fix. > > > Besides that this breaks the build on Tier 2 archs like powerpc. > > gcc 4.2 doesn't recognize -Wno-c++11-narrowing and treats it as an > > error: > > > > cc1plus: error: unrecognized command line option "-Wno-c++11-narrowing" > > > > I think something like > > > > USES= compiler > > CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}} > > CXXFLAGS_clang= -Wno-c++11-narrowing > > > > or similar would be better. > > This is too cumbersome. If it comes to this, this should be added to the > framework as compiler:legacycode or something like that. But I really > prefer for such fixes it to be in the Makefile and not a patch, as it > makes the existence of rotten code more apparent, and makes garbage > collecting either the fix (if the code is fixed upstream) or the whole > port (as unmaintained legacy) easier. Hmm, I'm not sure why this would be more apparent. A mention of the compiler error message in the patch header is surely as good an indicator as adding -Wno-c++11-narrowing to the Makefile. Both can easily be searched for, both can then easily be garbage collected. So what is generally preferred by others? Putting a flag like -Wno-c++11-narrowing onto a port is for sure much quicker than patching it.