[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wip-arm-bootstrap: Reduced binary seed bootstrap
From: |
Jan Nieuwenhuizen |
Subject: |
Re: wip-arm-bootstrap: Reduced binary seed bootstrap |
Date: |
Wed, 23 Dec 2020 13:14:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Ludovic Courtès writes:
Hi!
> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> I pushed an initial wip-arm-bootstrap that builds up to tcc-boot:
>>
>> ./pre-inst-env guix build -e '(@@ (gnu packages commencement) tcc-boot)'
>>
>>
>> Danny did a terrific job on armhf-linux support for GNU Mes and we are
>> getting close to release v0.23. What's known to be missing is "setjmp"
>> support for tcc/gcc. And, of course, for the Reduced binary seed
>> bootstrap to work on ARM!
>
> Woohoo, thumbs up for this great milestone, hackers! 🎉
Thanks!!
>> Anyway, the problem I'm looking at now is that while tcc-boot builds on
>> an ARM box, it does not build on aarch64-linux, i.e. this
>>
>> ./pre-inst-env guix build --system=armhf-linux \
>> -e '(@@ (gnu packages commencement) tcc-boot0)'
>>
>> fails on overdrive1.
>
> That’s “interesting”. Did you eventually find a lead?
Yes, I added '|| BOOTSTRAP' in tccelf.c:
--8<---------------cut here---------------start------------->8---
#if defined (TCC_ARM_EABI) || BOOTSTRAP
ehdr.e_ident[EI_OSABI] = 0;
ehdr.e_flags = EF_ARM_EABI_VER4;
if (file_type == TCC_OUTPUT_EXE || file_type == TCC_OUTPUT_DLL)
ehdr.e_flags |= EF_ARM_HASENTRY;
if (s1->float_abi == ARM_HARD_FLOAT)
ehdr.e_flags |= EF_ARM_VFP_FLOAT;
else
ehdr.e_flags |= EF_ARM_SOFT_FLOAT;
#else
ehdr.e_ident[EI_OSABI] = ELFOSABI_ARM;
#endif
--8<---------------cut here---------------end--------------->8---
this should be investigated a bit further. Compiling with TCC_ARM_EABI
fails (which should work, really), but for this linking stage we need it
set to produce an aarch64-linux-compatible ELF header. Dunno!
> Thanks for the update, it’s exciting!
You're welcome! Meanwhile, I built gcc-core-mesboot0 (2.95.3).
However, that's using bash from %bootstrap-coreutils&co.
The last thing I did was to investigate into bash-2.05b and found that
bash depends on a working setjmp/longjmp for tinycc. I tried several
versions of macro substitution on x86 instead of setjmp/longjmp, but
that doesn't seem possible: subshells and such. So Danny, would you
like to look at that?
Greetings,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com