problem with gcc 4.7 on host

Yann E. MORIN yann.morin.1998@free.fr
Thu Nov 15 09:18:00 GMT 2012


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.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< O_o >==-- '------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
'------------------------------'-------'------------------'--------------------'

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



More information about the crossgcc mailing list