gnattools cannot be built for freestanding/bare metal environment without hacking up the build machinery
Luke A. Guest
laguest@archeia.com
Fri Feb 14 14:01:00 GMT 2014
On Fri, 2014-02-14 at 12:11 +0000, Brian Drummond wrote:
> Revisiting the MSP430 as it's now an official gcc target, this is still a
> problem here too, so there are at least 3 targets for which it's a problem.
It's a problem for all targets.
> Looking at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19959
> and comparing comments #6 and #14, perhaps this command should be
> "make -C gcc gnattools-cross" ? I'll try to do a clean build and test this
> today.
>
It won't work, I've tried all those so called work arounds. They rely on
having libada built, it will complain to say that it can't be built
because there is no libada. See the attachments.
> But it would be better if the build "just worked" so at
>
> > if test "${ENABLE_LIBADA}" != "yes" ; then
> > noconfigdirs="$noconfigdirs"
> > fi
> we need a better test here (also checking for a crosscompiler build).
I have added one. It does work, sort of.
> > I think that we need a configure flag to disable libada and not
> > gnattools for these bare board targets.
>
> Following comment #15 in bug 19959, perhaps it's time to open a bug against
> --disable-libada.
The attachments allow you to configure the toolchain for bare metal, no
RTS. This flag is --enable-cross-gnattools, it checks if this is a cross
compiler and if it is, disables libada, but not gnattools.
There is an issue and I don't know why it does this, but it won't allow
you to build the gnattools straight away. You have to use:
make all-gcc
make -C gnattools/ gnattools
rm gcc/stamp-tools
make -C gcc cross-gnattools
make install-gcc
This will then build.
I have not checked to see if you can still build gcc for normal hosted
with this patch, neither have I checked to make sure --disable-libada
works in hosted either.
I have built the following with these patches:
arm-none-eabi
mips-elf
msp430-elf
x86_64-elf
Not one installs libada and I have gnattools:
$ ls ~/opt/tinyada/lib/gcc/arm-none-eabi/4.9.0/
include include-fixed install-tools plugin
$ ls ~/opt/tinyada/lib/gcc/mips-elf/4.9.0/
include include-fixed install-tools plugin
$ ls ~/opt/tinyada/lib/gcc/msp430-elf/4.9.0/
include include-fixed install-tools plugin
$ ls ~/opt/tinyada/lib/gcc/x86_64-elf/4.9.0/
include include-fixed install-tools plugin
Luke.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Set-the-target-for-a-bare-metal-environment.patch
Type: text/x-patch
Size: 1608 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20140214/e959bfc3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Added-enable-cross-gnattools-flag-for-bare-metal-env.patch
Type: text/x-patch
Size: 10033 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20140214/e959bfc3/attachment-0001.bin>
More information about the Gcc
mailing list