All of lore.kernel.org
 help / color / mirror / Atom feed
* boost: Ineffective compileflags and linkflags in user-config.jam
@ 2014-02-18 20:53 Mike Crowe
  2014-02-18 21:01 ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Crowe @ 2014-02-18 20:53 UTC (permalink / raw)
  To: openembedded-core

boost.inc's do_boostconfig task contains:

 # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
 if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/v2/user-config.jam
 then
   echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam
 fi

The compileflags and linkflags have no effect as far as I can tell when
passing -d+2 to bjam to display the command invocations. The "using gcc"
line appears to date back into the mists of meta-oe.

The correct syntax would appear to be:

 'using gcc ; 4.3.1 : ${CXX} : <compileflags>"-DBOOST_SP_USE_PTHREADS -I${includedir}" <linkflags>"-L${libdir}" ;'

(this syntax can be seen in the -sBUILD part of BJAM_TOOLS and is
documented at
http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html .)

But, if those options have no effect then they can't be required so should they just be removed? i.e. just use:

 'using gcc ; 4.3.1 : ${CXX} : ;'

or should users of this recipe be given a convenient ability to override
the compileflags, with perhaps something like:

 'using gcc ; 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" ;'

I'm mainly interested in this because I wish to pass "-std=gnu++11". I can
confirm that the last suggestion solves my problem when I add this to my
bbappend:

CXXFLAGS += "-std=gnu++11"

Any advice gratefully received. Thanks.

Mike.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: boost: Ineffective compileflags and linkflags in user-config.jam
  2014-02-18 20:53 boost: Ineffective compileflags and linkflags in user-config.jam Mike Crowe
@ 2014-02-18 21:01 ` Khem Raj
  2014-02-18 21:24   ` Mike Crowe
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2014-02-18 21:01 UTC (permalink / raw)
  To: Mike Crowe; +Cc: Patches and discussions about the oe-core layer

On Tue, Feb 18, 2014 at 12:53 PM, Mike Crowe <mac@mcrowe.com> wrote:
> or should users of this recipe be given a convenient ability to override
> the compileflags, with perhaps something like:
>
>  'using gcc ; 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" ;'

this one. care to send a patch ?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: boost: Ineffective compileflags and linkflags in user-config.jam
  2014-02-18 21:01 ` Khem Raj
@ 2014-02-18 21:24   ` Mike Crowe
  2014-02-19 10:40     ` [PATCH] boost: Pass CFLAGS, CXXFLAGS and LDFLAGS correctly into boost.build Mike Crowe
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Crowe @ 2014-02-18 21:24 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Tuesday 18 February 2014 at 13:01:31 -0800, Khem Raj wrote:
> On Tue, Feb 18, 2014 at 12:53 PM, Mike Crowe <mac@mcrowe.com> wrote:
> > or should users of this recipe be given a convenient ability to override
> > the compileflags, with perhaps something like:
> >
> >  'using gcc ; 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" ;'
> 
> this one. care to send a patch ?

Hi Khem,

I can do once I've tested it against current master.

Thanks.

Mike.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] boost: Pass CFLAGS, CXXFLAGS and LDFLAGS correctly into boost.build
  2014-02-18 21:24   ` Mike Crowe
@ 2014-02-19 10:40     ` Mike Crowe
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Crowe @ 2014-02-19 10:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

The compileflags and linkflags do_boostconfig puts into user-config.jam are
having no effect. According to
http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html the
correct syntax would be <compileflags>"the flags" <linkflags>"the flags".

Since the flags specified were having no effect they can't be necessary and
can be safely removed. We should be passing ${CFLAGS}, ${CXXFLAGS} and
${LDFLAGS} instead so that users of the recipe can pass arbitrary flags as
they choose.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/recipes-support/boost/boost.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index c7642be..356ca22 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -134,7 +134,7 @@ do_boostconfig() {
 	# D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
 	if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/v2/user-config.jam 
 	then
-		echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam
+		echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/v2/user-config.jam
 	fi	
 
 	echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/v2/user-config.jam
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-19 10:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 20:53 boost: Ineffective compileflags and linkflags in user-config.jam Mike Crowe
2014-02-18 21:01 ` Khem Raj
2014-02-18 21:24   ` Mike Crowe
2014-02-19 10:40     ` [PATCH] boost: Pass CFLAGS, CXXFLAGS and LDFLAGS correctly into boost.build Mike Crowe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.