[U-Boot] [PATCH] examples: select libgcc for non-default architecture

Wolfgang Denk wd at denx.de
Fri May 16 06:27:26 CEST 2014


Dear Alexey Brodkin,

In message <1400176075-8709-1-git-send-email-abrodkin at synopsys.com> you wrote:
> In case of multilib-enabled toolchains if default architecture differ from
> the one examples are being built for linker will fail to link example object
> files with libgcc of another (non-compatible) architecture.
> 
> Interesting enough for years in main Makefile we used CFLAGS/c_flags for this
> but not for examples.
> 
> So fixing it now.
> 
> Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
> 
> Cc: Masahiro Yamada <yamada.m at jp.panasonic.com>
> Cc: Tom Rini <trini at ti.com>
> ---
>  examples/standalone/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
> index 9ab5446..7234f30 100644
> --- a/examples/standalone/Makefile
> +++ b/examples/standalone/Makefile
> @@ -38,7 +38,8 @@ targets += $(patsubst $(obj)/%,%,$(LIB)) $(COBJS) $(LIBOBJS-y)
>  LIBOBJS	:= $(addprefix $(obj)/,$(LIBOBJS-y))
>  ELF	:= $(addprefix $(obj)/,$(ELF))
>  
> -gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
> +gcclibdir := $(shell dirname \
> +	       `$(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name`)

Should this not also take CONFIG_USE_PRIVATE_LIBGCC into account ?
I. e. use PLATFORM_LIBGCC ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Business is like a wheelbarrow. Nothing ever happens until you  start
pushing.


More information about the U-Boot mailing list