gcc 4.9.0 do not build on OSX

2014-05-03 Thread Franzi Edo.
Hi,
I am trying to build a gcc-4.9.0 ARM cross compiler on OSX Mavericks 
unsuccessfully.
My toolchain works fine with the previous version 4.8.2 but on the 4.9.0 I have 
this error during the gcc building pass 1.

/opt/uKOS/Packages/gcc-4.9.0/gcc/config/arm/neon.md:3486:10917: fatal error:
 bracket nesting level exceeded maximum of 256
/opt/uKOS/Packages/gcc-4.9.0/gcc/config/arm/neon.md:3486:10917: note: use
 -fbracket-depth=N to increase maximum nesting level
32 warnings and 1 error generated.
make[1]: *** [insn-attrtab.o] Error 1
make: *** [all-gcc] Error 2
Error building gcc pass 1

So, I tried to increase the number of nesting level as indicated 
(-fbracket-depth=1024) but I get the same error.
I use these packages:

GMP_VER=6.0.0
MPFR_VER=3.1.2
MPC_VER=1.0.2
BIN_VER=2.24
GCC_VER=4.9.0
NLB_VER=2.1.0
GDB_VER=7.7

The configure for the pass 1 is:

export GCC1_CONFIG=" \
--enable-interwork \
--enable-languages=c,c++ \
--with-newlib \

--with-headers=${PATH_TOOLS_GCC}/Packages/newlib-${NLB_VER}/newlib/libc/include 
\
--with-mpfr=${PATH_TOOLS_GCC}/cross/mpfr-${MPFR_VER} \
--with-gmp=${PATH_TOOLS_GCC}/cross/gmp-${GMP_VER} \
--with-mpc=${PATH_TOOLS_GCC}/cross/mpc-${MPC_VER}"

Any idea? 
Regards,
 Edo

Re: GCC 4.9.1 Status Report (2014-07-10)

2014-07-10 Thread Franzi Edo.
Hi,
As for the version 4.9.0, on OSX stil remain a problem.
I cannot build an ARM a cross compiler!
Here is the message (same as for the 4.9.0)

...
.../Packages/gcc-4.9.1/gcc/config/arm/neon.md:3486:10917: fatal error:
  bracket nesting level exceeded maximum of 256
.../Packages/gcc-4.9.1/gcc/config/arm/neon.md:3486:10917: note: use
  -fbracket-depth=N to increase maximum nesting level
32 warnings and 1 error generated.
make[1]: *** [insn-attrtab.o] Error 1

…
Any suggestions?
Regards,
  Edo


On 10 Jul 2014, at 12:30, Jakub Jelinek  wrote:

> Status
> ==
> 
> GCC 4.9.1-rc1 has been created and announced, the branch is now frozen
> for blocking regressions and documentation fixes only and all changes
> to the branch require a RM approval.
> If all goes well, 4.9.1 will be released in a week.
> 
> Quality Data
> 
> 
> Priority  #   Change from Last Report
> ---   ---
> P10  0
> P2   90   + 12
> P3   18   +  1
> ---   ---
> Total   108   + 13
> 
> 
> Previous Report
> ===
> 
> https://gcc.gnu.org/ml/gcc/2014-04/msg00196.html
> 
> The next report will be sent by me again, announcing the
> 4.9.1 release or another release candidate if needed.



Re: GCC 4.9.1 Status Report (2014-07-10)

2014-07-11 Thread Franzi Edo.
Hi All,
Thank you for your suggestions.
Unfortunately, no way!

I tried these actions:
1. using apple-gcc4.2 for building my cross gcc compiler
2. I tried XCode (llvm)
3. I tried to add this
 make CFLAGS="-g -O2 -fbracket-depth=512”
(512, 1024, 2048 … no way)!

4. I can generate my cross compiler based on the "gcc 4.8.3” without problem 
(using both the apple-gcc4.2 or the XCode llvm)
So, what has changed of fundamental between the 4.8.3 and the 4.9 versions?

So, I am a bit without ideas
Cheers,
   Edo


On 11 Jul 2014, at 00:29, Joel Sherrill  wrote:

> 
> On 7/10/2014 5:14 PM, pins...@gmail.com wrote:
>> 
>>> On Jul 10, 2014, at 3:13 PM, Ian Lance Taylor  wrote:
>>> 
>>>> On Thu, Jul 10, 2014 at 11:40 AM, Franzi Edo.  wrote:
>>>> 
>>>> As for the version 4.9.0, on OSX stil remain a problem.
>>>> I cannot build an ARM a cross compiler!
>>>> Here is the message (same as for the 4.9.0)
>>>> 
>>>> ...
>>>> .../Packages/gcc-4.9.1/gcc/config/arm/neon.md:3486:10917: fatal error:
>>>> bracket nesting level exceeded maximum of 256
>>>> .../Packages/gcc-4.9.1/gcc/config/arm/neon.md:3486:10917: note: use
>>>> -fbracket-depth=N to increase maximum nesting level
>>>> 32 warnings and 1 error generated.
>>>> make[1]: *** [insn-attrtab.o] Error 1
>>> You did not include enough context to be sure, but I don't think that
>>> error message is coming from GCC.  At least, I don't see that error
>>> message in the GCC sources.
>>> 
>>> I think that error message is coming from the host compiler you are
>>> using, in which case, based on the error message, the solution would
>>> seem to be
>>>   make CFLAGS="-g -O2 -fbracket-depth=512"
>> Also i thought we did not support cross building with anything besides gcc. 
> The RTEMS community sees this when using clang/llvm on FreeBSD.
> 
> Franzi.. did the suggestion from Chris Johns to increase the limit
> to 1024, not work?
> 
> https://gcc.gnu.org/ml/gcc/2014-05/msg00018.html
> 
> This ended up being reported at http://llvm.org/bugs/show_bug.cgi?id=19650
> 
> --joel
>> Thanks,
>> Andrew
>> 
>>> Ian
> 
> -- 
> Joel Sherrill, Ph.D. Director of Research & Development
> joel.sherr...@oarcorp.comOn-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available(256) 722-9985
> 



Re: GCC 4.9.1 Status Report (2014-07-10)

2014-07-12 Thread Franzi Edo.
Hi James (all),
Thank you for all of your suggestions.
I tried everything unsuccessfully. Unfortunately,  the

make CFLAGS="-g -O2 -fbracket-depth=1024”
and the 
make BUILD_CFLAGS="-g -O2 -fbracket-depth=1024”
do not solve the problem.

Well, at this point, I have to admit that I am a bit lost.
So, if you have other suggestions, I will check them with pleasure.
Thanks
  Edo



On 12 Jul 2014, at 11:41, James Greenhalgh  wrote:

> On Fri, Jul 11, 2014 at 07:52:06PM +0100, Franzi Edo. wrote:
>> Hi All,
>> Thank you for your suggestions.
>> Unfortunately, no way!
>> 
>> 4. I can generate my cross compiler based on the "gcc 4.8.3” without problem
>> (using both the apple-gcc4.2 or the XCode llvm) So, what has changed of
>> fundamental between the 4.8.3 and the 4.9 versions?
> (Sorry for any duplicate mails, my mailer is having difficulty with
> certain symbols in the body of the mail).
> 
> The fundamental change was a patch I put in to 4.9 in October of 2013 [1].
> 
> In this patch, we use a large define_attr to group together all of the Neon
> types used for (set_attr "type") expressions in the ARM backend in the
> "is_neon_type" attribute, which we use later to decide if an instruction is
> predicable. We end up with a define_attr with around 290 elements for the
> "yes" case.
> 
> As you can see in the preprocessed source on the LLVM bug [2], each element
> in the define_attr is expanded as
> 
>  ((cached_type == TYPE_NEON_FOO) || ...   )
> 
> So after three elements we have 3 levels of nesting. After six, we have 6.
> After around 290 we have 290 levels of bracket nesting, and Clang errors.
> 
> If there is a better way for me to write the "is_neon_type" attribute, I'll
> happily spin a patch for it. Certainly, I don't like the size of that
> generated "if" statement.
> 
> Alternatively, perhaps the code which generates the if statement could be
> rewritten to build a switch rather than the large "||" expression. I don't
> know anything about the gen* programs and how define_attr can be used in
> the general case to say how feasible that change would be.
> 
> None of this solves your problem in the interim, for that I think your best
> bet is to set -fbracket-depth=1024 in your BUILD_CFLAGS, as suggested by
> Chris.
> 
> Thanks,
> James
> 
> [1] 
> https://gcc.gnu.org/viewcvs/gcc/branches/gcc-4_9-branch/gcc/config/arm/arm.md?r1=203059&r2=203613
> [2] http://llvm.org/bugs/show_bug.cgi?id=19650
> 
>> 
>> So, I am a bit without ideas
>> Cheers,
>>   Edo
>> 
>> 
>> On 11 Jul 2014, at 00:29, Joel Sherrill  wrote:
>> 
>>> 
>>> On 7/10/2014 5:14 PM, pins...@gmail.com wrote:
>>>> 
>>>>> On Jul 10, 2014, at 3:13 PM, Ian Lance Taylor  wrote:
>>>>> 
>>>>>> On Thu, Jul 10, 2014 at 11:40 AM, Franzi Edo.  wrote:
>>>>>> 
>>>>>> As for the version 4.9.0, on OSX stil remain a problem.
>>>>>> I cannot build an ARM a cross compiler!
>>>>>> Here is the message (same as for the 4.9.0)
> 
>>>>> You did not include enough context to be sure, but I don't think that
>>>>> error message is coming from GCC.  At least, I don't see that error
>>>>> message in the GCC sources.
>>>>> 
>>>>> I think that error message is coming from the host compiler you are
>>>>> using, in which case, based on the error message, the solution would
>>>>> seem to be
> 
>>>> Also i thought we did not support cross building with anything besides 
>>>> gcc. 
>>> The RTEMS community sees this when using clang/llvm on FreeBSD.
>>> 
>>> Franzi.. did the suggestion from Chris Johns to increase the limit
>>> to 1024, not work?
>>> 
>>> https://gcc.gnu.org/ml/gcc/2014-05/msg00018.html
>>> 
>>> This ended up being reported at http://llvm.org/bugs/show_bug.cgi?id=19650
>>> 
>>> --joel
>>>> Thanks,
>>>> Andrew
>>>> 
>>>>> Ian
>>> 
> 



Re: GCC 4.9.1 Status Report (2014-07-10)

2014-07-14 Thread Franzi Edo.
Hi Chris, no way!
It is like if gcc do not take in account of my BUILD_CFLAGS="-g -O2 
-fbracket-depth=1024“
I even tried N=2048!

/opt/uKOS/Packages/gcc-4.9.1/gcc/config/arm/neon.md:3486:10917: fatal error:
  bracket nesting level exceeded maximum of 256
/opt/uKOS/Packages/gcc-4.9.1/gcc/config/arm/neon.md:3486:10917: note: use
  -fbracket-depth=N to increase maximum nesting level
32 warnings and 1 error generated.
make[1]: *** [insn-attrtab.o] Error 1
make: *** [all-gcc] Error 2
Error building gcc pass 1

here is my script for building gcc …

cd ${PATH_TOOLS_GCC}/Packages
echo "Start building:" > gcc_pass1.txt
date >> gcc_pass1.txt 

mkdir -p ${PATH_TOOLS_GCC}/builds/gcc-${GCC_VER}/${MACHINE}/gcc-${GCC_VER}
cd ${PATH_TOOLS_GCC}/builds/gcc-${GCC_VER}/${MACHINE}/gcc-${GCC_VER}
BUILD_CFLAGS="-g -O2 -fbracket-depth=1024" 
${PATH_TOOLS_GCC}/Packages/gcc-${GCC_VER}/configure \
--target=${TARGET} \
--includedir=/usr/include \
--prefix=${prefix} \
--enable-multilib \
--disable-werror \
--disable-nls \
--disable-libssp \
${GCC1_CONFIG}  || { echo "Error configuring gcc pass 1"; exit 1; }
make all-gcc|| { echo "Error building gcc pass 1";exit 1; }
make install-gcc|| { echo "Error installing gcc pass 1";  exit 1; }

cd ${PATH_TOOLS_GCC}/Packages
echo "End building:" >> gcc_pass1.txt
date >> gcc_pass1.txt 
mv gcc_pass1.txt gcc_pass1_ready.txt

Edo.


On 14 Jul 2014, at 05:01, Chris Johns  wrote:

> On 13/07/2014 3:38 am, Franzi Edo. wrote:
>> Hi James (all),
>> Thank you for all of your suggestions.
>> I tried everything unsuccessfully. Unfortunately,  the
>> 
>> make CFLAGS="-g -O2 -fbracket-depth=1024”
>> and the
>> make BUILD_CFLAGS="-g -O2 -fbracket-depth=1024”
>> do not solve the problem.
> 
> Please add 'BUILD_CFLAGS="-g -O2 -fbracket-depth=1024”' to the configure 
> command line before the configure script is referenced, ie:
> 
> $ BUILD_CFLAGS="-g -O2 -fbracket-depth=1024” ../gcc-4.9.0/configure ...
> 
> Chris



Re: GCC 4.9.1 Status Report (2014-07-10)

2014-07-14 Thread Franzi Edo.
Hi Michael (all),
Thank you for that!
Unfortunately, even with BUILD_CXXFLAGS I have the same error ….
Ciao Edo


On 14 Jul 2014, at 16:53, Michael Matz  wrote:

> Hi,
> 
> On Mon, 14 Jul 2014, Franzi Edo. wrote:
> 
>> It is like if gcc do not take in account of my BUILD_CFLAGS="-g -O2 
>> -fbracket-depth=1024“
> 
> GCC meanwhile is compiled with c++.  Instead of CFLAGS use CXXFLAGS.  I.e. 
> BUILD_CXXFLAGS, and so on.  No guarantees, but at least foobar_CFLAGS only 
> should not be enough.
> 
> 
> Ciao,
> Michael.