Message ID | 1411727024-19153-3-git-send-email-yamada.m@jp.panasonic.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show |
On 26 September 2014 04:23, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote: > The motivation of this commit is to change CONFIG_USE_PRIVATE_LIBGCC > to a boolean macro so we can move it to Kconfig. > > In the current implementation, there are two forms of syntax > for this macro: > > - CONFIG_USE_PRIVATE_LIBGCC=y > - CONFIG_USE_PRIVATE_LIBGCC=<path/to/private/libgcc> > > The latter is only used by x86 architecture. > With a little bit refactoring, it can be converted to the former. > > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> > Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Tested on link (Chromebook Pixel) Tested-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/x86/config.mk b/arch/x86/config.mk index 3106079..3e7fedb 100644 --- a/arch/x86/config.mk +++ b/arch/x86/config.mk @@ -28,6 +28,3 @@ PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386 LDFLAGS_FINAL += --gc-sections -pie LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3 LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3 - -export NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name) -CONFIG_USE_PRIVATE_LIBGCC := arch/x86/lib diff --git a/arch/x86/include/asm/config.h b/arch/x86/include/asm/config.h index f06a15c..6827424 100644 --- a/arch/x86/include/asm/config.h +++ b/arch/x86/include/asm/config.h @@ -8,4 +8,7 @@ #define _ASM_CONFIG_H_ #define CONFIG_SYS_GENERIC_BOARD + +#define CONFIG_USE_PRIVATE_LIBGCC + #endif diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index f7303ab..25b672a 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -20,9 +20,9 @@ obj-$(CONFIG_SYS_X86_TSC_TIMER) += tsc_timer.o obj-$(CONFIG_VIDEO_VGA) += video.o obj-$(CONFIG_CMD_ZBOOT) += zimage.o -LIBGCC := $(notdir $(NORMAL_LIBGCC)) -extra-y := $(LIBGCC) +extra-$(CONFIG_USE_PRIVATE_LIBGCC) := lib.a +NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name) OBJCOPYFLAGS := --prefix-symbols=__normal_ -$(obj)/$(LIBGCC): $(NORMAL_LIBGCC) FORCE +$(obj)/lib.a: $(NORMAL_LIBGCC) FORCE $(call if_changed,objcopy)
The motivation of this commit is to change CONFIG_USE_PRIVATE_LIBGCC to a boolean macro so we can move it to Kconfig. In the current implementation, there are two forms of syntax for this macro: - CONFIG_USE_PRIVATE_LIBGCC=y - CONFIG_USE_PRIVATE_LIBGCC=<path/to/private/libgcc> The latter is only used by x86 architecture. With a little bit refactoring, it can be converted to the former. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> --- arch/x86/config.mk | 3 --- arch/x86/include/asm/config.h | 3 +++ arch/x86/lib/Makefile | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-)