programs that are compiled with non-default regparm values are
miscompiled if they use libgcc.
This patch works around the problem for coreboot.

Please mention the GCC bugreport # in the source near every workaround;
that way, you can one day get rid of it.  This is PR41055.

 makerule coreboot_ram.o
depends "src/arch/$(CONFIG_ARCH)/lib/c_start.o $(DRIVER) coreboot.a $(LIBGCC_FILE_NAME)" - action "$(CC) $(DISTRO_LFLAGS) -nostdlib -r -o $@ src/arch/$ (CONFIG_ARCH)/lib/c_start.o $(DRIVER) -Wl,-\( coreboot.a $ (LIBGCC_FILE_NAME) -Wl,-\)" + action "$(CC) $(DISTRO_LFLAGS) -nostdlib -r -o $@ src/arch/$ (CONFIG_ARCH)/lib/c_start.o $(DRIVER) -Wl,--wrap,__divdi3 -Wl,-- wrap,__udivdi3 -Wl,--wrap,__moddi3 -Wl,--wrap,__umoddi3 -Wl,-\ ( coreboot.a $(LIBGCC_FILE_NAME) -Wl,-\)"
 end

You don't need the -( -) here, FWIW. libgcc does not require symbols from
coreboot.a ;-)


Segher


--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to