This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: s-oscons technique does not work for RTEMS
On Fri, 2008-08-08 at 11:14 -0500, Joel Sherrill wrote:
> Samuel Tardieu wrote:
> >>>>>> "Thomas" == Thomas Quinot <quinot@adacore.com> 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]
> 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
Ralf