2013-07-22 07:56:13 +02:00
|
|
|
################################################################################
|
2013-06-30 21:28:57 +02:00
|
|
|
#
|
|
|
|
# elf2flt
|
|
|
|
#
|
2013-07-22 07:56:13 +02:00
|
|
|
################################################################################
|
2013-06-30 21:28:57 +02:00
|
|
|
|
2022-04-28 22:55:44 +02:00
|
|
|
ELF2FLT_VERSION = 2021.08
|
|
|
|
ELF2FLT_SITE = $(call github,uclinux-dev,elf2flt,v$(ELF2FLT_VERSION))
|
2017-03-30 15:43:32 +02:00
|
|
|
ELF2FLT_LICENSE = GPL-2.0+
|
2013-06-30 21:28:57 +02:00
|
|
|
ELF2FLT_LICENSE_FILES = LICENSE.TXT
|
|
|
|
|
|
|
|
HOST_ELF2FLT_DEPENDENCIES = host-binutils host-zlib
|
|
|
|
|
2022-05-30 21:05:09 +02:00
|
|
|
# 0001-elf2flt-handle-binutils-2.34.patch
|
2020-11-07 23:55:35 +01:00
|
|
|
HOST_ELF2FLT_AUTORECONF = YES
|
|
|
|
|
2013-06-30 21:28:57 +02:00
|
|
|
# It is not exactly a host variant, but more a cross variant, which is
|
|
|
|
# why we pass a special --target option.
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_ELF2FLT_CONF_OPTS = \
|
2013-06-30 21:28:57 +02:00
|
|
|
--with-bfd-include-dir=$(HOST_BINUTILS_DIR)/bfd/ \
|
|
|
|
--with-binutils-include-dir=$(HOST_BINUTILS_DIR)/include/ \
|
|
|
|
--with-libbfd=$(HOST_BINUTILS_DIR)/bfd/libbfd.a \
|
|
|
|
--with-libiberty=$(HOST_BINUTILS_DIR)/libiberty/libiberty.a \
|
2016-04-15 23:02:17 +02:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--disable-werror
|
2013-06-30 21:28:57 +02:00
|
|
|
|
package/gcc: remove BR2_GCC_ENABLE_LTO
Currently, this option doesn't do anything. It only adds
--enable-plugins --enable-lto to the configure flags, but doesn't
disable them if it is not set. Since both of these default to enabled,
plugins and lto are effectively always enabled.
There really is no need to make this configurable: it adds a bit of size
and build time to host-gcc, but we don't care about that for host tools.
It's still up to individual builds to enable the LTO options.
Therefore, remove the option entirely. For clarity, explicitly pass
--enable-plugins --enable-lto to configure.
No legacy handling is added for the removed option. Since the behaviour
hasn't actually changed (independently of whether the option was enabled
or not), there's no point bothering the user with a legacy option.
elf2flt was linking with libdl depending on this option. Since the
option doesn't do anything, this is probably not needed. Still, to avoid
breaking things, and because linking with libdl doesn't cost us anything
anyway, always link with libdl.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-25 17:22:29 +02:00
|
|
|
HOST_ELF2FLT_LIBS = -lz -ldl
|
2015-09-06 17:48:19 +02:00
|
|
|
|
|
|
|
HOST_ELF2FLT_CONF_ENV = LIBS="$(HOST_ELF2FLT_LIBS)"
|
2013-07-08 08:14:53 +02:00
|
|
|
|
2018-05-28 21:45:18 +02:00
|
|
|
# Hardlinks between binaries in different directories cause a problem
|
|
|
|
# with rpath fixup, so we de-hardlink those binaries, and replace them
|
|
|
|
# with copies instead. Note that elf2flt will rename ld to ld.real
|
|
|
|
# before installing its own ld, but we already took care of the
|
|
|
|
# original ld from binutils so that it is already de-hardlinked. So
|
|
|
|
# ld is now the one from elf2flt, and we want to de-hardlinke it.
|
|
|
|
ELF2FLT_TOOLS = elf2flt flthdr ld
|
|
|
|
define HOST_ELF2FLT_FIXUP_HARDLINKS
|
|
|
|
$(foreach tool,$(ELF2FLT_TOOLS),\
|
|
|
|
rm -f $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/$(tool) && \
|
|
|
|
cp -a $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-$(tool) \
|
|
|
|
$(HOST_DIR)/$(GNU_TARGET_NAME)/bin/$(tool)
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
HOST_ELF2FLT_POST_INSTALL_HOOKS += HOST_ELF2FLT_FIXUP_HARDLINKS
|
|
|
|
|
2013-06-30 21:28:57 +02:00
|
|
|
$(eval $(host-autotools-package))
|