On 22.07.20 21:11, Michael Tokarev wrote: > Switching to gcc-10 makes seabios-hppa unbuildable. > It fails at the final linking step with a lot of > missing references to memcpy & memcmp all over the > places. > > The notable difference between gcc-10 and previous > gcc is that ccode32flat.o does _not_ have the text > for these two functions but have two .isra.0: > > $ hppa-linux-gnu-nm ccode32flat.o | grep mem[sc] > 000003e0 t memcmp > U memcpy > 00002f38 t memcpy.isra.0 > U memset > 00003a84 t memset.isra.0 > > > while previous version of the compiler did have them: > > $ hppa-linux-gnu-nm ccode32flat.o | grep mem[sc] > 000002fc t memcmp > 0000370c t memcpy > 0000036c t memset
I believe this is a compiler bug in gcc-10. Adding other flags like -fno-builtin or similiar doesn't fix the issue. > After adding -fno-ipa-sra to the gcc flags, the firmware > is built successfully. > > I don't know what to make out of this. Previous versions > of gcc apparently accepts -fno-ipa-sra too, for quite some > time. So maybe add this to the flags unconditionally? I think this is currently the best way forward. Do you want to send a patch, or should I just add this upstream to seabios-hppa? Helge
