This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with gcc 4.7 on host


Hi Yann,

On Thursday 15 November 2012 10:18:30 Yann E. MORIN wrote:
> Jeremy, All,
> 
> On Thursday 15 November 2012 09:53:16 Jeremy Rosen wrote:
> > for some time I was having trouble compiling crosstool-ng using buildroot
> > on my machine,
> > 
> > it typically failed while building ppl with the type of error below
> > 
> > [ERROR]    /home/rosen/projets/mini2440/buildroot/output/build/build-
> > toolchain/.build/src/ppl-0.10.2/src/Interval.defs.hh:432:5: error:
> > 'f_info' was not declared in this scope, and no declarations were
> > found by argument-dependent lookup at the point of instantiation
> > [-fpermissive]
> 
> > after some investigation (thx a lot to kos_tom on IRC) this error only
> > happens when compiling with gcc 4.7 on the host machine.
> > 
> > the workaround (described at http://comments.gmane.org/gmane.comp.
> > gcc.cross-compiling/14909) is to add the -fpermissive flag to the host
> > compiler via the crosstool-ng compile option
> 
> > I am sending this email for two reasons
> > 2) to ask how to write a workaround, or a way for crosstool-ng to detect
> > the problem. I was compiling the default gcc version from my buildroot
> > defconfig (which is 4.4.6)  but trying with gcc 4.6 (latest version
> > available in ctng afaict) did not solve the problem...
> 
> That's because it is not the cross-compiler that is at /fault/ here, but
> the compiler on your host. So, switching to another version in crosstool-NG
> will not solve the issue.
> 
> > if anybody has an idea how to do an upstreamable patch, i would gladly
> > write it...
> 
> In scripts/build/companion_libs/ppl.sh:
>   - look for calls to ppl_do_backend (hint: two call sites)
>   - just before those calls, add a line like:
>         ppl_opts+=( "cflags=-fpermissive" )
>   - warning: there's already a call site that sets cflags ;-)
> 
> This will unconditionally add the -fpermissive CFLAG when building ppl.
> I am not sure it is worth doing it conditionally on the gcc version.

You could probably do it based on a specific PPL version at least, so that
whenever the upstream version receives the proper fix, it does no longer need
to be enabled.
--
Florian

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]