<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 21, 2016 at 9:24 AM, Ricardo Derbes <span dir="ltr"><<a href="mailto:rmderbes@gmail.com" target="_blank">rmderbes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello.<br>
I'm trying to build rtems toolchain for i386 using<br>
rtems-source-builder with fortran support (--with-fortran option).<br>
The RSB I'm using has been dowloaded from git, commit<br>
534332f22a66f16b4022e87ae50c11<wbr>ff20c98dcb from Sep 12 2016.<br>
<br>
The full command line is:<br>
../source-builder/sb-set-<wbr>builder<br>
--prefix=~/devel4.12-i386.<wbr>fortran/rtems4.12 4.12/rtems-i386<br>
--without-rtems --with-fortran<br>
<br>
When trying to build gcc, it fails with the following errors (excerpt<br>
from report file<br>
rsb-report-i386-rtems4.12-gcc-<wbr>6-20160609-newlib-2.4.0.<wbr>20160527-x86_64-linux-gnu-1.<wbr>txt):<br>
<br>
Tail of the build log:<br>
~/devel4.12-i386.fortran/<wbr>rtems-source-builder/rtems/<wbr>build/i386-rtems4.12-gcc-6-<wbr>20160609-newlib-2.4.0.<wbr>20160527-x86_64-linux-gnu-1/<wbr>gcc-6-20160609/newlib/libc/<wbr>include/ieeefp.h:196:38:<br>
error: 'EXT_FRACHBITS' undeclared here (not in a function)<br>
__ieee_ext_field_type  ext_frach : EXT_FRACHBITS;<br>
                                      ^~~~~~~~~~~~~<br>
~/devel4.12-i386.fortran/<wbr>rtems-source-builder/rtems/<wbr>build/i386-rtems4.12-gcc-6-<wbr>20160609-newlib-2.4.0.<wbr>20160527-x86_64-linux-gnu-1/<wbr>gcc-6-20160609/newlib/libc/<wbr>include/ieeefp.h:196:26:<br>
error: bit-field 'ext_frach' width not an integer constant<br>
__ieee_ext_field_type  ext_frach : EXT_FRACHBITS;<br>
                          ^~~~~~~~~<br>
/home/dev/devel4.12-i386.<wbr>fortran/rtems-source-builder/<wbr>rtems/build/i386-rtems4.12-<wbr>gcc-6-20160609-newlib-2.4.0.<wbr>20160527-x86_64-linux-gnu-1/<wbr>gcc-6-20160609/newlib/libc/<wbr>include/ieeefp.h:197:3:<br>
error: unknown type name '__ieee_ext_field_type'<br>
   __ieee_ext_field_type  ext_exp   : EXT_EXPBITS;<br>
   ^~~~~~~~~~~~~~~~~~~~~<br>
~/devel4.12-i386.fortran/<wbr>rtems-source-builder/rtems/<wbr>build/i386-rtems4.12-gcc-6-<wbr>20160609-newlib-2.4.0.<wbr>20160527-x86_64-linux-gnu-1/<wbr>gcc-6-20160609/newlib/libc/<wbr>include/ieeefp.h:197:38:<br>
error: 'EXT_EXPBITS' undeclared here (not in a function)<br>
__ieee_ext_field_type  ext_exp   : EXT_EXPBITS;<br>
                                      ^~~~~~~~~~~<br>
/home/dev/devel4.12-i386.<wbr>fortran/rtems-source-builder/<wbr>rtems/build/i386-rtems4.12-<wbr>gcc-6-20160609-newlib-2.4.0.<wbr>20160527-x86_64-linux-gnu-1/<wbr>gcc-6-20160609/newlib/libc/<wbr>include/ieeefp.h:197:26:<br>
error: bit-field 'ext_exp' width not an integer constant<br>
__ieee_ext_field_type  ext_exp   : EXT_EXPBITS;<br>
                          ^~~~~~~<br>
~/devel4.12-i386.fortran/<wbr>rtems-source-builder/rtems/<wbr>build/i386-rtems4.12-gcc-6-<wbr>20160609-newlib-2.4.0.<wbr>20160527-x86_64-linux-gnu-1/<wbr>gcc-6-20160609/newlib/libc/<wbr>include/ieeefp.h:198:3:<br>
error: unknown type name '__ieee_ext_field_type'<br>
__ieee_ext_field_type  ext_sign  : 1;<br>
   ^~~~~~~~~~~~~~~~~~~~~<br>
<br>
As for my application I need fortran support, how can I fix this problem?<br>
As long I can see, all symbols that the compiler claims as undeclared<br>
are indeed declared and accessible in file<br>
~/devel4.12-i386.fortran/<wbr>rtems-source-builder/rtems/<wbr>build/i386-rtems4.12-gcc-6-<wbr>20160609-newlib-2.4.0.<wbr>20160527-x86_64-linux-gnu-1/<wbr>gcc-6-20160609/newlib/libc/<wbr>include/ieeefp.h<br>
May be it's missing a symbol, e.g a proper value for LDBL_MANT_DIG ?<br>
<br></blockquote><div><br></div><div>I see that GCC predefines these symbols:</div><div><br></div><div><div>#define __FLT_MANT_DIG__ 24</div><div>#define __DEC64_MANT_DIG__ 16</div><div>#define __LDBL_MANT_DIG__ 53</div><div>#define __DBL_MANT_DIG__ 53</div><div>#define __DEC32_MANT_DIG__ 7</div><div>#define __DEC128_MANT_DIG__ 34</div></div><div><br></div><div>And ieeefp.h in newlib has this:</div><div><br></div><div><div>#elif LDBL_MANT_DIG == 53</div><div>/* This happens when doubles are 32-bits and long doubles are 64-bits.  */</div><div>#define EXT_EXPBITS     11</div><div>#define EXT_FRACHBITS   20</div><div>#define EXT_FRACLBITS   32</div><div>#define __ieee_ext_field_type unsigned long</div></div><div><br></div><div>I am suspicious that the ifdef should use __LDBL_MANT_DIG__  not LDBL_MANT_DIG.</div><div><br></div><div>But I will have to ask on the newlib mailing list to get an answer.</div><div><br></div><div>--joel</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thank you<br>
______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a><br>
</blockquote></div><br></div></div>