On Thu, 13 Jun 2024, Maciej W. Rozycki wrote: > > This was tricky to duplicate without access to an alpha-linux-gnu > > machine. I ended up building an uberbaum tree with --disable-shared > > --disable-threads --enable-languages=ada up to all-target-libgcc, then I > > replaced gcc/collect2 with a wrapper script that dropped crt[1in].o and > > -lc, so that link tests in libada/configure would succeed without glibc > > for the target. libada still wouldn't build, because of the missing > > glibc headers, but I could compile g-depboo.adb with -I pointing at a > > x86_64-linux-gnu's gcc/ada/rts build tree, and with that, at -O2, I > > could trigger the problem and investigate it. And with the following > > patch, the problem seems to be gone. > > If you like, I'll share with you a pair of scripts I use to cross-compile > Linux configurations. No target system is required to build things and > all is done based on git checkouts from the relevant upstream repos, which > then bootstrap themselves using whatever compiler is locally available to > bootstrap native GCC first and then going through the ususal steps to get > a target cross-compiler.
Also, you can use build-many-glibcs.py --full-gcc to build a cross compiler with all languages (for any architecture and ABI supported by glibc), but you need to build the same-version native compiler yourself first (and put it in the PATH) in order to build Ada; that bit isn't automated by build-many-glibcs.py. -- Joseph S. Myers josmy...@redhat.com