]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: set CONFIG_USE_PRIVATE_LIBGCC to y
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 23 Oct 2014 16:30:41 +0000 (01:30 +0900)
committerTom Rini <trini@ti.com>
Thu, 23 Oct 2014 17:19:04 +0000 (13:19 -0400)
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>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/config.mk
arch/x86/include/asm/config.h
arch/x86/lib/Makefile

index 3106079c852c0ca54a4c3609805e3413909be2d4..3e7fedb913bed80965c0ca4e2765a35aaec98017 100644 (file)
@@ -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
index ff15828a713de5d1258aada2dc5aa599734ca900..fedcaeacdab6f792fc9800327421aaf9bcc01a80 100644 (file)
@@ -11,4 +11,6 @@
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 
+#define CONFIG_USE_PRIVATE_LIBGCC
+
 #endif
index f7303abccbd3380384b1fa5624cf305683ddfab8..25b672a0c13d831f0ddf1df0f4c17717dab8c863 100644 (file)
@@ -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)