Commit e75e73dd5f280b91f5bfc0a76a0fd09b6eba1c66
Committed by
Tom Rini
1 parent
1dd6e3c2dd
Exists in
v2017.01-smarct4x
and in
40 other branches
examples: select libgcc for non-default architecture
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@synopsys.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Wolfgang Denx <wd@denx.de> Acked-by: WOlfgang Denk <wd@denx.de> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Showing 2 changed files with 2 additions and 3 deletions Side-by-side Diff
Makefile
examples/standalone/Makefile
... | ... | @@ -38,8 +38,6 @@ |
38 | 38 | LIBOBJS := $(addprefix $(obj)/,$(LIBOBJS-y)) |
39 | 39 | ELF := $(addprefix $(obj)/,$(ELF)) |
40 | 40 | |
41 | -gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) | |
42 | - | |
43 | 41 | # For PowerPC there's no need to compile standalone applications as a |
44 | 42 | # relocatable executable. The relocation data is not needed, and |
45 | 43 | # also causes the entry point of the standalone application to be |
... | ... | @@ -63,7 +61,7 @@ |
63 | 61 | |
64 | 62 | quiet_cmd_link_elf = LD $@ |
65 | 63 | cmd_link_elf = $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ |
66 | - -o $@ -e $(SYM_PREFIX)$(@F) $< $(LIB) -L$(gcclibdir) -lgcc | |
64 | + -o $@ -e $(SYM_PREFIX)$(@F) $< $(LIB) $(PLATFORM_LIBGCC) | |
67 | 65 | |
68 | 66 | $(ELF): $(obj)/%: $(obj)/%.o $(LIB) FORCE |
69 | 67 | $(call if_changed,link_elf) |