Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2018 13:51:04 +0200
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        Dmitry Marakasov <amdmi3@amdmi3.ru>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r474520 - head/x11-clocks/glclock
Message-ID:  <1531914664.994677.1444750728.1BA9F677@webmail.messagingengine.com>
In-Reply-To: <20180713135127.GK7353@hades.panopticon>
References:  <201807121411.w6CEBlZn074328@repo.freebsd.org> <1531464216.1955680.1439350032.7AC058F0@webmail.messagingengine.com> <20180713135127.GK7353@hades.panopticon>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1531914664.994677.1444750728.1BA9F677>