tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GCC g++ 4.4.7 does not accept -std=c++03



* On 2019-06-26 at 16:56 BST, Ryo ONODERA wrote:

> I will commit the following patch.
> 
> Index: mk/compiler/gcc.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/compiler/gcc.mk,v
> retrieving revision 1.198
> diff -u -r1.198 gcc.mk
> --- mk/compiler/gcc.mk	12 Nov 2018 14:22:58 -0000	1.198
> +++ mk/compiler/gcc.mk	26 Jun 2019 15:55:12 -0000
> @@ -185,6 +185,11 @@
>  .endif
>  _GCC_PKG=	gcc-${_GCC_VERSION:C/-.*$//}
>  
> +.if !empty(_GCC_VERSION:M[34].[1234].*)
> +BUILDLINK_TRANSFORM+=	opt:-std=c++03:-std=c++0x
> +BUILDLINK_TRANSFORM+=	opt:-std=gnu++03:-std=gnu++0x
> +.endif
> +

If we're really going to do this (I don't see the point when so much
software now depends on newer compilers) then please do it properly
and abstract away the current _CXX_VERSION_REQD bits in mk/compiler.mk
into the separate compiler files and handle the logic in gcc.mk.

Thanks,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index