Ralf Corsepius wrote:
On Fri, 2008-08-08 at 11:14 -0500, Joel Sherrill wrote:
Samuel Tardieu wrote:
"Thomas" == Thomas Quinot <[EMAIL PROTECTED]> writes:
Thomas> As an alternative to Arno's suggestion, maybe you could use
Thomas> the --with-sysroot configure parameter to make the required
Thomas> headers available to the build process. I know others have
Thomas> used this method on some cross targets.
Do you mean --with-build-sysroot?
I tried that and got a variation on the theme to work.
I used CFLAGS_FOR_TARGETS to pass in where the
OS include files where. I posted a patch to gcc-patches
and ACATS results to gcc-testresults.
Thanks for the hint. Hopefully the patch is OK. It isn't big.
FWIW cd2a24e now has a gnat bug box on sparc and powerpc.
I filed it as PR 35298.
For those who care, --sysroot does not work RTEMS because:
(1) Apparently the RTEMS standard binutils RPMs do
not support sysroots.
Not quite. We don't use sysroot, because we don't need it.
/home/joel/work-gnat/svn//install/powerpc-rtems4.9/bin/ld: this linker
was not configured to use sysroots
collect2: ld returned 1 exit status
Correct. We don't have a sysroot, because all of our headers are inside
of GCC's standard include directories.
(2) RTEMS doesn't install into a /usr/include structure.
It does.
What you seem to be missing is our toolchains being cross-compilers.
This means our headers land in $exec_prefix/$target/include
(e.g. /opt/rtems-4.9/sparc-rtems4.9/include) instead of
$exec_prefix/include ... AFTER building (!)
[newlib based, one-tree style building: Headers have not yet been
installed while building. Building picks them up from temporary
directories inside of the build tree]
That's OK for newlib .h files. The Ada build procedure
finds them. What it is not finding are RTEMS .h files
like the networking ones and termios.h.
For the test results that are posted this morning, I
added this to the configure:
CFLAGS_FOR_TARGET=-B${BSP_INSTALL}/${TARGET}/${bsp}/lib/
Because I am doing a BSP specific build of RTEMS to run tests with.
I think that if I switched to a multilib'ed RTEMS build, this procedure
would work with no special flags until you were running the tests
and needed to find the RTEMS libraries.
+ build native
+ build C/C++ compiler w/newlib
+ build RTEMS multilib
+ build Ada compiler w/newlib
+ build RTEMS BSP
+ run gcc C/C++ tests
+ run Ada tests
I want to test this procedure because it is long term how
we would like to package RTEMS -- as a reusable library
plus BSP specific libraries.
According to
the gcc documentation--sysroot DIR looks in DIR/usr/[include|lib].
Not true:
# touch tmp.c
# /opt/rtems-4.9/bin/sparc-rtems4.9-gcc -v -c tmp.c
...
ignoring nonexistent directory
"/opt/rtems-4.9/lib64/gcc/sparc-rtems4.9/4.3.1/../../../../sparc-rtems4.9/sys-include"
...
=> /opt/rtems-4.9/sparc-rtems4.9/sys-include
=> the default is $exec_prefix/$target/sys-include
Agreed but there are no .h files from RTEMS in there unless you build
RTEMS and put them there.
--joel