pkgsrc-Bugs archive

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

Re: pkg/42746 (devel/boost-libs needs an extra flag with gcc-4.4)



The following reply was made to PR pkg/42746; it has been noted by GNATS.

From: Steven Drake <sbd%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/42746 (devel/boost-libs needs an extra flag with gcc-4.4)
Date: Fri, 8 Oct 2010 10:51:38 +1300 (NZDT)

 On Wed, 6 Oct 2010, Tim Zingelman wrote:
 
 >  So, it looks like the real fix might be to adjust
 >  pkgsrc/mk/compiler/gcc.mk to add something like these lines:
 >  
 >   .if !empty(USE_LANGUAGES:Mc++0x)
 >   GCC_REQD+=  4.4
 >   _WRAP_EXTRA_ARGS.CXX+=   -std=c++0x
 >   .endif
 >  and then add to the pkgsrc/devel/boost-libs/Makefile this line:
 >   USE_LANGUAGES+=  c++0x
 >  
 >  Trouble is this then requires at least gcc 4.4 to build boost-libs,
 >  while in reality they build fine with 3.4.6... a bit of chicken and
 >  egg, since we'd like to check CC_VERSION to see which compiler version
 >  we have and then if we have gcc-4.4+ add the USE_LANGUAGES+=  c++0x...
 >  but it is not clear if there is a clean way to do that since
 >  mk/compiler.mk sets CC_VERSION and so it can't also later act on
 >  USE_LANGUAGES.
 
 How about the following patch:
 
 ===================================================================
 RCS file: /srv/NetBSD-cvs/pkgsrc/mk/compiler/gcc.mk,v
 retrieving revision 1.106
 diff -u -p -r1.106 gcc.mk
 --- compiler/gcc.mk     30 Jul 2010 07:58:59 -0000      1.106
 +++ compiler/gcc.mk     7 Oct 2010 21:48:38 -0000
 @@ -185,6 +185,9 @@ _NEED_GCC34=        yes
  .endfor
  _NEED_GCC44?=  no
  .for _pattern_ in ${_GCC44_PATTERNS}
 +.  if !empty(_GCC_VERSION:M${_pattern_})
 +_GCC44=                yes
 +.  endif
  .  if !empty(_GCC_REQD:M${_pattern_})
  _NEED_GCC44=   yes
  .  endif
 @@ -213,6 +216,9 @@ _LANGUAGES.gcc+=    ${LANGUAGES.gcc:M${_lan
  .if !empty(USE_LANGUAGES:Mc99)
  _WRAP_EXTRA_ARGS.CC+=  -std=gnu99
  .endif
 +.if !empty(USE_LANGUAGES:Mc++0x) && defined(_GCC44)
 +_WRAP_EXTRA_ARGS.CXX+=   -std=c++0x
 +.endif
 
 -- 
 Steven
 


Home | Main Index | Thread Index | Old Index