Re: Cross compiler build for Ada build fails with "unrecognized intrinsic subprogram"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello again gcc-all,

I've spent the past few days experimenting with building the native
compiler first, as suggested, and then building the Ada cross compiler.
This has definitely helped with the most cryptic errors I've been seeing.
Unfortunately there is still something I cannot figure out.

I'm hoping to target bare-metal targets here (in this case, arm-eabi).
Since there's no operating system, there's no libc and there's not libc++,
which I expected. However, when I try to build gnattools (or make all with
--enable-language=c,c++,ada), I get errors that seem to basically boil down
to "trying to build something with the assumption that libc or libc++ is
available when it isn't". I wouldn't even be using libada for this project,
I would be providing my own zero-footprint ada runtime. It would all just
compile down to bare metal. I would assume that the target "arm-eabi" would
tell the build system as much but I must be missing something.

For example, I configured with "../gcc/configure
--prefix=/opt/gcc-arm-eabi/ --target=arm-eabi --enable-languages=c,c++,ada
--disable-libada --disable-libc --disable-libc++". When I tried to build
gnat with "make all-gnattools", I eventually ran into the following:
  make[1]: Leaving directory '/home/ablinux/gcc-objdir/arm-eabi/libgcc'
  Checking multilib configuration for libstdc++-v3...
  Configuring in arm-eabi/libstdc++-v3
  configure: loading cache ./config.cache
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... arm-unknown-eabi
  checking target system type... arm-unknown-eabi
  ...
  checking whether the  /home/ablinux/gcc-objdir/./gcc/xgcc
-B/home/ablinux/gcc-objdir/./gcc/ -B/opt/gcc-arm-eabi/arm-eabi/bin/
-B/opt/gcc-arm-eabi/arm-eabi/lib/ -isystem
/opt/gcc-arm-eabi/arm-eabi/include -isystem
/opt/gcc-arm-eabi/arm-eabi/sys-include    linker
(/home/ablinux/gcc-objdir/./gcc/collect-ld) supports shared libraries... yes
  checking whether -lc should be explicitly linked in... yes
  checking dynamic linker characteristics... no
  checking how to hardcode library paths into programs... immediate
  checking for shl_load... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.
  make: *** [Makefile:14010: configure-target-libstdc++-v3] Error 1

Seemingly because the target "all-gnattools" seems to depend on libada and
libc++ anyway.

Is there a subset of targets I should build if I just want the frontend
necessary to compile, bind, and link Ada programs for bare metal?

Thanks again for the help so far,
Ahmad



On Wed, Aug 7, 2024 at 5:57 PM Ahmad Bamba <ahmad.eb.bamba@xxxxxxxxx> wrote:

> I haven't yet! I will give it a try and report back.
>
> On Wed, Aug 7, 2024, 8:07 AM Xi Ruoyao <xry111@xxxxxxxxxxx> wrote:
>
>> On Mon, 2024-08-05 at 14:04 +0000, Ahmad Bamba via Gcc-help wrote:
>> > I installed my host gcc-11 and gnat-11 via the Ubuntu package manager.
>> > Although I am trying to build gcc-14, I've had this happen swapping
>> over to
>> > the gcc-13 and gcc-12 branches. When I invoke a parallel build, I notice
>> > other Ada source files failing to compile as well.
>>
>> Per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116147#c4:
>>
>> "So iirc for building a cross Ada compiler you need to first build a new
>> native one for the same version. Did you do that?"
>>
>> So building a cross gnat-14 (or 13, 12) with native gnat-11 won't work.
>>
>> --
>> Xi Ruoyao <xry111@xxxxxxxxxxx>
>> School of Aerospace Science and Technology, Xidian University
>>
>




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux