]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
lib: Enable private libgcc by default
authorMarek Vasut <marex@denx.de>
Thu, 26 May 2016 16:01:47 +0000 (18:01 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 Jun 2016 01:21:47 +0000 (21:21 -0400)
This patch decouples U-Boot binary from the toolchain on systems where
private libgcc is available. Instead of pulling in functions provided
by the libgcc from the toolchain, U-Boot will use it's own set of libgcc
functions. These functions are usually imported from Linux kernel, which
also uses it's own libgcc functions instead of the ones provided by the
toolchain.

This patch solves a rather common problem. The toolchain can usually
generate code for many variants of target architecture and often even
different endianness. The libgcc on the other hand is usually compiled
for one particular configuration and the functions provided by it may
or may not be suited for use in U-Boot. This can manifest in two ways,
either the U-Boot fails to compile altogether and linker will complain
or, in the much worse case, the resulting U-Boot will build, but will
misbehave in very subtle and hard to debug ways.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
lib/Kconfig

index 2b97c2b0a47f177b7a7d0db17bbf3b43d605f946..02ca4058d37e0b4e7f23b9885e9cc051d292c0ec 100644 (file)
@@ -14,6 +14,7 @@ config HAVE_PRIVATE_LIBGCC
 config USE_PRIVATE_LIBGCC
        bool "Use private libgcc"
        depends on HAVE_PRIVATE_LIBGCC
+       default y if HAVE_PRIVATE_LIBGCC && ((ARM && !ARM64) || MIPS)
        help
          This option allows you to use the built-in libgcc implementation
          of U-Boot instead of the one provided by the compiler.