Skip to content

Commit

Permalink
Merge pull request #584 from stilor/disallow-gold-for-elf2flt
Browse files Browse the repository at this point in the history
Require BFD linker if building for flat format
  • Loading branch information
stilor committed Feb 11, 2017
2 parents e6a748c + a41978b commit 93db580
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
18 changes: 12 additions & 6 deletions config/binutils/binutils.in
Expand Up @@ -178,10 +178,14 @@ config BINUTILS_HAS_PLUGINS
config BINUTILS_HAS_PKGVERSION_BUGURL
bool

# Force using the BFD linker if needed
# This is the case for some C libraries (eg. glibc at least) and affected
# components can select this
config BINUTILS_FORCE_LD_BFD
# Force using the BFD linker if needed. There are two options:
# - For some C libraries (eg. glibc at least), BFD ld must be
# built and be selected by default.
# - For elf2flt, BFD ld must be the only linker built.
config BINUTILS_FORCE_LD_BFD_DEFAULT
bool

config BINUTILS_FORCE_LD_BFD_ONLY
bool

choice
Expand All @@ -198,7 +202,7 @@ config BINUTILS_LINKER_GOLD
bool
prompt "gold"
depends on BINUTILS_GOLD_SUPPORT
depends on ! BINUTILS_FORCE_LD_BFD
depends on !BINUTILS_FORCE_LD_BFD_DEFAULT && !BINUTILS_FORCE_LD_BFD_ONLY
select BINUTILS_GOLD_INSTALLED
help
gold is a new, optimised, multi-threaded linker with support
Expand All @@ -209,6 +213,7 @@ config BINUTILS_LINKER_GOLD
config BINUTILS_LINKER_LD_GOLD
bool
prompt "ld, gold"
depends on !BINUTILS_FORCE_LD_BFD_ONLY
depends on BINUTILS_GOLD_SUPPORT
select BINUTILS_GOLD_INSTALLED
select BINUTILS_LINKER_BOTH
Expand All @@ -221,10 +226,11 @@ config BINUTILS_LINKER_LD_GOLD
config BINUTILS_LINKER_GOLD_LD
bool
prompt "gold, ld"
depends on !BINUTILS_FORCE_LD_BFD_ONLY
depends on BINUTILS_GOLD_SUPPORT
select BINUTILS_GOLD_INSTALLED
select BINUTILS_LINKER_BOTH
select BINUTILS_LD_WRAPPER if BINUTILS_FORCE_LD_BFD
select BINUTILS_LD_WRAPPER if BINUTILS_FORCE_LD_BFD_DEFAULT
help
Both the historical ld and the new gold linkers will be
installed, with gold being the default linker used.
Expand Down
3 changes: 2 additions & 1 deletion config/binutils/binutils.in.2
Expand Up @@ -2,9 +2,10 @@

if ARCH_BINFMT_FLAT

config ELF2FLT_REQUIRES_ZLIB
config ELF2FLT_REQUIRES
def_bool y
select ZLIB
select BINUTILS_FORCE_LD_BFD_ONLY

comment "elf2flt"

Expand Down
2 changes: 1 addition & 1 deletion config/libc/glibc.in.2
Expand Up @@ -20,7 +20,7 @@ config LIBC_GLIBC_MAY_FORCE_PORTS
config LIBC_glibc_familly
bool
default y
select BINUTILS_FORCE_LD_BFD
select BINUTILS_FORCE_LD_BFD_DEFAULT

config LIBC_GLIBC_EXTRA_CONFIG_ARRAY
string
Expand Down
8 changes: 1 addition & 7 deletions samples/armv6-nommu-linux-uclibcgnueabi/crosstool.config
Expand Up @@ -5,16 +5,10 @@ CT_TARGET_VENDOR="nommu"
CT_KERNEL_linux=y
# CT_SHARED_LIBS is not set
# CT_KERNEL_LINUX_INSTALL_CHECK is not set
CT_BINUTILS_LINKER_LD_GOLD=y
CT_BINUTILS_GOLD_THREADS=y
CT_BINUTILS_LD_WRAPPER=y
CT_BINUTILS_PLUGINS=y
CT_THREADS_NONE=y
CT_CC_GCC_SHOW_LINARO=y
CT_CC_GCC_DISABLE_PCH=y
CT_CC_GCC_BUILD_ID=y
CT_CC_GCC_LNK_HASH_STYLE_BOTH=y
CT_CC_LANG_CXX=y
CT_DEBUG_gdb=y
# CT_GDB_CROSS_PYTHON is not set
CT_GDB_GDBSERVER=y
CT_GETTEXT=y
4 changes: 0 additions & 4 deletions scripts/build/debug/300-gdb.sh
@@ -1,7 +1,5 @@
# Build script for the gdb debug facility

if [ "${CT_GDB_CROSS}" = y -o "${CT_GDB_GDBSERVER}" = "y" -o "${CT_GDB_NATIVE}" = "y" ]; then

do_debug_gdb_get() {
local linaro_version=""
local linaro_series=""
Expand Down Expand Up @@ -346,5 +344,3 @@ do_debug_gdb_build() {
CT_EndStep
fi
}

fi

0 comments on commit 93db580

Please sign in to comment.