[coreboot] [PATCH] libgcc regparm workaround

Segher Boessenkool segher at kernel.crashing.org
Sat Sep 26 12:08:27 CEST 2009

> 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 $ 
> +	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  
coreboot.a ;-)


More information about the coreboot mailing list