Boost logo

Boost-Build :

Subject: Re: [Boost-build] How does one pass user flags to gcc.compile.asm?
From: etwietmeyer_at_[hidden]
Date: 2014-04-04 13:42:06


> > Hello,
> >
> > I'm using a version of gcc that requires a -sysroot flag for all
> > invocations. This includes invocations for assembling .S files in
> the
> > context lib. Looking at gcc.jam, I see that there is no
> $(USER_OPTIONS) parameter passed. I tried mimicking the msvc.jam
> mechanism that specifies <asmflags> as USER_ASMFLAGS, but as my
> knowledge of bjam is virtually nil I have not been successful.
> >
> > Can someone provide a pointer or a suggestion as to what to do?
>
> Eric,
>
> it might be easier to specify such global option as 'sysroot' in user-
> config.jam, like:
>
> using gcc : : arm-none-linux-gnueabi-gcc --sysroot=/whatever ;
>
>
> Thanks,
> Volodya
>

Thanks very much for the quick response. I had tried that before however
and gotten an error, so I thought I needed to use the <cxxflags> option.
After debugging further (using -d9 option to bjam) I see that because I
was passing the command (with the --sysroot option) as an environment
variable and simply specifying that as gcc : : $(GXX) ; it was interpreted
as a single command argument and not two separate (space separated)
elements. So the check-tool-aux rule in common.jam was receiving a
"command" which contained the --sysroot option and then it of course
returned indicating failure.

The fix then is to specify something like gcc : : $(GXX) $(SYSROOT) ; so
that it receives appropriately two separate elements as $(command).

Thanks for the pointer.

-Eric


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk