2013-06-30 21:29:02 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# gcc-final
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
GCC_FINAL_VERSION = $(GCC_VERSION)
|
.mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.
This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.
Alignment of line continuation characters (\) is kept as-is.
The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
-e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
-e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
-e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
-e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'
Brief explanation of this command:
^\([A-Z0-9a-z_]\+\) a regular variable at the beginning of the line
\([?:+]\?=\) any assignment character =, :=, ?=, +=
\([^\\]\+\) any string not containing a line continuation
\([^\\ \t]\+\s*\\\) string, optional whitespace, followed by a
line continuation character
\(\s*\\\) optional whitespace, followed by a line
continuation character
Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.
This expression was tested on following test text: (initial tab not
included)
FOO = spaces before
FOO = spaces before and after
FOO = tab before
FOO = tab and spaces before
FOO = tab after
FOO = tab and spaces after
FOO = spaces and tab after
FOO = \
FOO = bar \
FOO = bar space \
FOO = \
GENIMAGE_DEPENDENCIES = host-pkgconf libconfuse
FOO += spaces before
FOO ?= spaces before and after
FOO :=
FOO =
FOO =
FOO =
FOO =
$(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
AT91BOOTSTRAP3_DEFCONFIG = \
AXEL_DISABLE_I18N=--i18n=0
After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
expression leaves the number of whitespace between the value and line
continuation character intact, but the whitespace before that could have
changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
actually makes the code more readable.
Finally, the end result was manually reviewed.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 09:06:03 +02:00
|
|
|
GCC_FINAL_SITE = $(GCC_SITE)
|
|
|
|
GCC_FINAL_SOURCE = $(GCC_SOURCE)
|
2013-06-30 21:29:02 +02:00
|
|
|
|
|
|
|
HOST_GCC_FINAL_DEPENDENCIES = \
|
|
|
|
$(HOST_GCC_COMMON_DEPENDENCIES) \
|
2014-02-04 15:03:06 +01:00
|
|
|
$(BR_LIBC)
|
2013-06-30 21:29:02 +02:00
|
|
|
|
2013-06-30 21:29:04 +02:00
|
|
|
HOST_GCC_FINAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS)
|
|
|
|
|
2013-06-30 21:29:02 +02:00
|
|
|
ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),)
|
2014-02-27 06:07:20 +01:00
|
|
|
HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
|
2013-06-30 21:29:02 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
HOST_GCC_FINAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES
|
|
|
|
|
|
|
|
# gcc doesn't support in-tree build, so we create a 'build'
|
|
|
|
# subdirectory in the gcc sources, and build from there.
|
|
|
|
HOST_GCC_FINAL_SUBDIR = build
|
|
|
|
|
2013-09-02 18:06:34 +02:00
|
|
|
HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
|
2013-06-30 21:29:02 +02:00
|
|
|
|
2013-10-10 11:40:42 +02:00
|
|
|
define HOST_GCC_FINAL_CONFIGURE_CMDS
|
2014-10-25 20:29:31 +02:00
|
|
|
(cd $(HOST_GCC_FINAL_SRCDIR) && rm -rf config.cache; \
|
|
|
|
$(HOST_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(HOST_CFLAGS)" \
|
|
|
|
LDFLAGS="$(HOST_LDFLAGS)" \
|
|
|
|
$(HOST_GCC_FINAL_CONF_ENV) \
|
|
|
|
./configure \
|
|
|
|
--prefix="$(HOST_DIR)/usr" \
|
|
|
|
--sysconfdir="$(HOST_DIR)/etc" \
|
|
|
|
--enable-static \
|
|
|
|
$(QUIET) $(HOST_GCC_FINAL_CONF_OPTS) \
|
|
|
|
)
|
2013-10-10 11:40:42 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
2013-06-30 21:29:02 +02:00
|
|
|
# Languages supported by the cross-compiler
|
|
|
|
GCC_FINAL_CROSS_LANGUAGES-y = c
|
|
|
|
GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
|
|
|
|
GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y))
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GCC_FINAL_CONF_OPTS = \
|
|
|
|
$(HOST_GCC_COMMON_CONF_OPTS) \
|
2013-06-30 21:29:02 +02:00
|
|
|
--enable-languages=$(GCC_FINAL_CROSS_LANGUAGES) \
|
2014-12-10 23:53:55 +01:00
|
|
|
--enable-poison-system-directories \
|
2013-06-30 21:29:02 +02:00
|
|
|
--with-build-time-tools=$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin
|
|
|
|
|
sh4: fix toolchain creation
The Linux kernel does force compile with -m4-nofpu, which is only
available when building a multilib toolchain.
The interesting part here is, that buildroot use --disable-multilib for
gcc configure, but enables --with-multilib-list=m4,m4-nofpu in
the default configuration for Qemu targeting r2d emulation.
This results in a toolchain, which can be used for the kernel and
for userland without creating a multilib toolchain with different
kinds of libgcc version. In the multilib case there would be
subdirectories created (!m4 and m4-nofpu). As buildroot uses a
short version of toolchain creation, a multilib enabled gcc build
fails when creating libgcc.
So the best solution is to just keep multilib disabled, but always
add --with-multilib-list when sh4/sh4eb/sh4a/sh4aeb is choosen.
Tested with sh4/sh4a toolchain build and qemu defconfig with
gcc 4.8.x/4.9.x (with and without C++ enabled), uClibc and glibc.
Disable sh4a/sh4aeb for uClibc, as it does not implemented, yet.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(ARM and SH4 uClibc toolchain builds)
2015-04-08 10:54:55 +02:00
|
|
|
HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*
|
|
|
|
# The kernel wants to use the -m4-nofpu option to make sure that it
|
|
|
|
# doesn't use floating point operations.
|
|
|
|
ifeq ($(BR2_sh4)$(BR2_sh4eb),y)
|
|
|
|
HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4,m4-nofpu"
|
|
|
|
HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib/!m4*
|
|
|
|
endif
|
|
|
|
ifeq ($(BR2_sh4a)$(BR2_sh4aeb),y)
|
|
|
|
HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4a,m4a-nofpu"
|
|
|
|
HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib/!m4*
|
|
|
|
endif
|
|
|
|
|
2014-05-26 00:12:57 +02:00
|
|
|
# Disable shared libs like libstdc++ if we do static since it confuses linking
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GCC_FINAL_CONF_OPTS += --disable-shared
|
2014-05-26 00:12:57 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GCC_FINAL_CONF_OPTS += --enable-shared
|
2014-05-26 00:12:57 +02:00
|
|
|
endif
|
|
|
|
|
2013-06-30 21:29:02 +02:00
|
|
|
ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GCC_FINAL_CONF_OPTS += --enable-libgomp
|
2013-06-30 21:29:02 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GCC_FINAL_CONF_OPTS += --disable-libgomp
|
2013-06-30 21:29:02 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# End with user-provided options, so that they can override previously
|
|
|
|
# defined options.
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GCC_FINAL_CONF_OPTS += \
|
2013-06-30 21:29:02 +02:00
|
|
|
$(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS))
|
|
|
|
|
2013-09-04 16:18:14 +02:00
|
|
|
HOST_GCC_FINAL_CONF_ENV = \
|
|
|
|
$(HOST_GCC_COMMON_CONF_ENV)
|
|
|
|
|
2013-06-30 21:29:02 +02:00
|
|
|
# Make sure we have 'cc'
|
|
|
|
define HOST_GCC_FINAL_CREATE_CC_SYMLINKS
|
|
|
|
if [ ! -e $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc ]; then \
|
|
|
|
ln -snf $(GNU_TARGET_NAME)-gcc \
|
|
|
|
$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \
|
|
|
|
fi
|
|
|
|
if [ ! -e $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc ]; then \
|
|
|
|
ln -snf gcc $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc; \
|
|
|
|
fi
|
|
|
|
endef
|
|
|
|
|
|
|
|
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_CC_SYMLINKS
|
|
|
|
|
|
|
|
# Create <arch>-linux-<tool> symlinks
|
|
|
|
define HOST_GCC_FINAL_CREATE_SIMPLE_SYMLINKS
|
|
|
|
(cd $(HOST_DIR)/usr/bin; for i in $(GNU_TARGET_NAME)-*; do \
|
|
|
|
ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \
|
|
|
|
done)
|
|
|
|
endef
|
|
|
|
|
|
|
|
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_SIMPLE_SYMLINKS
|
|
|
|
|
2013-09-02 18:06:33 +02:00
|
|
|
# In gcc 4.7.x, the ARM EABIhf library loader path for (e)glibc was not
|
2013-07-16 10:03:21 +02:00
|
|
|
# correct, so we create a symbolic link to make things work
|
|
|
|
# properly. eglibc installs the library loader as ld-linux-armhf.so.3,
|
|
|
|
# but gcc creates binaries that reference ld-linux.so.3.
|
2013-09-02 18:06:33 +02:00
|
|
|
ifeq ($(BR2_arm)$(BR2_ARM_EABIHF)$(BR2_GCC_VERSION_4_7_X)$(BR2_TOOLCHAIN_USES_GLIBC),yyyy)
|
2013-07-16 10:03:21 +02:00
|
|
|
define HOST_GCC_FINAL_LD_LINUX_LINK
|
|
|
|
ln -sf ld-linux-armhf.so.3 $(TARGET_DIR)/lib/ld-linux.so.3
|
|
|
|
ln -sf ld-linux-armhf.so.3 $(STAGING_DIR)/lib/ld-linux.so.3
|
|
|
|
endef
|
|
|
|
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_LD_LINUX_LINK
|
|
|
|
endif
|
|
|
|
|
2013-06-30 21:29:02 +02:00
|
|
|
# Cannot use the HOST_GCC_FINAL_USR_LIBS mechanism below, because we want
|
2014-02-04 16:36:18 +01:00
|
|
|
# libgcc_s to be installed in /lib and not /usr/lib.
|
2013-06-30 21:29:02 +02:00
|
|
|
define HOST_GCC_FINAL_INSTALL_LIBGCC
|
sh4: fix toolchain creation
The Linux kernel does force compile with -m4-nofpu, which is only
available when building a multilib toolchain.
The interesting part here is, that buildroot use --disable-multilib for
gcc configure, but enables --with-multilib-list=m4,m4-nofpu in
the default configuration for Qemu targeting r2d emulation.
This results in a toolchain, which can be used for the kernel and
for userland without creating a multilib toolchain with different
kinds of libgcc version. In the multilib case there would be
subdirectories created (!m4 and m4-nofpu). As buildroot uses a
short version of toolchain creation, a multilib enabled gcc build
fails when creating libgcc.
So the best solution is to just keep multilib disabled, but always
add --with-multilib-list when sh4/sh4eb/sh4a/sh4aeb is choosen.
Tested with sh4/sh4a toolchain build and qemu defconfig with
gcc 4.8.x/4.9.x (with and without C++ enabled), uClibc and glibc.
Disable sh4a/sh4aeb for uClibc, as it does not implemented, yet.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(ARM and SH4 uClibc toolchain builds)
2015-04-08 10:54:55 +02:00
|
|
|
-cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/libgcc_s* \
|
2013-06-30 21:29:02 +02:00
|
|
|
$(STAGING_DIR)/lib/
|
sh4: fix toolchain creation
The Linux kernel does force compile with -m4-nofpu, which is only
available when building a multilib toolchain.
The interesting part here is, that buildroot use --disable-multilib for
gcc configure, but enables --with-multilib-list=m4,m4-nofpu in
the default configuration for Qemu targeting r2d emulation.
This results in a toolchain, which can be used for the kernel and
for userland without creating a multilib toolchain with different
kinds of libgcc version. In the multilib case there would be
subdirectories created (!m4 and m4-nofpu). As buildroot uses a
short version of toolchain creation, a multilib enabled gcc build
fails when creating libgcc.
So the best solution is to just keep multilib disabled, but always
add --with-multilib-list when sh4/sh4eb/sh4a/sh4aeb is choosen.
Tested with sh4/sh4a toolchain build and qemu defconfig with
gcc 4.8.x/4.9.x (with and without C++ enabled), uClibc and glibc.
Disable sh4a/sh4aeb for uClibc, as it does not implemented, yet.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(ARM and SH4 uClibc toolchain builds)
2015-04-08 10:54:55 +02:00
|
|
|
-cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/libgcc_s* \
|
2013-06-30 21:29:02 +02:00
|
|
|
$(TARGET_DIR)/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_LIBGCC
|
|
|
|
|
2015-04-19 11:48:16 +02:00
|
|
|
define HOST_GCC_FINAL_INSTALL_LIBATOMIC
|
2015-06-05 02:28:47 +02:00
|
|
|
-cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/libatomic* \
|
2015-04-19 11:48:16 +02:00
|
|
|
$(STAGING_DIR)/lib/
|
2015-06-05 02:28:47 +02:00
|
|
|
-cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/libatomic* \
|
2015-04-19 11:48:16 +02:00
|
|
|
$(TARGET_DIR)/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_LIBATOMIC
|
|
|
|
|
2013-06-30 21:29:02 +02:00
|
|
|
# Handle the installation of libraries in /usr/lib
|
|
|
|
HOST_GCC_FINAL_USR_LIBS =
|
|
|
|
|
gcc: remove BR2_GCC_SHARED_LIBGCC option
Commit 6b48b4803450 ("add a know to enable/disable building a shared
libgcc"), from october 2006, isn't really as to why a
BR2_GCC_SHARED_LIBGCC option was needed. However, now that gcc has
been converted to the package infrastructure, it causes problems
because the host packages are always being passed --enable-shared
--disable-static, so re-adding --disable-shared on top of that break
things.
Moreover, our tests indicate that both a shared *and* a static version
of libgcc are built, and that linking dynamically and statically a
program that uses libgcc_s gives correct results: dynamically linked
against libgcc_s in the first case, statically linked in the second
case.
Therefore, it appears that this option is no longer necessary, and
removing it has the advantage of fixing the builds of
qemu_mips64_malta_defconfig and qemu_sparc_ss10_defconfig, both of
which had BR2_GCC_SHARED_LIBGCC not enabled.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-08 17:59:45 +02:00
|
|
|
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
|
2013-06-30 21:29:02 +02:00
|
|
|
HOST_GCC_FINAL_USR_LIBS += libstdc++
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
|
|
|
|
HOST_GCC_FINAL_USR_LIBS += libgomp
|
|
|
|
endif
|
|
|
|
|
2013-09-02 18:06:38 +02:00
|
|
|
ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y)
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
|
|
|
HOST_GCC_FINAL_USR_LIBS += libmudflapth
|
|
|
|
else
|
|
|
|
HOST_GCC_FINAL_USR_LIBS += libmudflap
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-06-30 21:29:02 +02:00
|
|
|
ifneq ($(HOST_GCC_FINAL_USR_LIBS),)
|
2014-05-26 00:12:57 +02:00
|
|
|
define HOST_GCC_FINAL_INSTALL_STATIC_LIBS
|
2013-06-30 21:29:02 +02:00
|
|
|
for i in $(HOST_GCC_FINAL_USR_LIBS) ; do \
|
sh4: fix toolchain creation
The Linux kernel does force compile with -m4-nofpu, which is only
available when building a multilib toolchain.
The interesting part here is, that buildroot use --disable-multilib for
gcc configure, but enables --with-multilib-list=m4,m4-nofpu in
the default configuration for Qemu targeting r2d emulation.
This results in a toolchain, which can be used for the kernel and
for userland without creating a multilib toolchain with different
kinds of libgcc version. In the multilib case there would be
subdirectories created (!m4 and m4-nofpu). As buildroot uses a
short version of toolchain creation, a multilib enabled gcc build
fails when creating libgcc.
So the best solution is to just keep multilib disabled, but always
add --with-multilib-list when sh4/sh4eb/sh4a/sh4aeb is choosen.
Tested with sh4/sh4a toolchain build and qemu defconfig with
gcc 4.8.x/4.9.x (with and without C++ enabled), uClibc and glibc.
Disable sh4a/sh4aeb for uClibc, as it does not implemented, yet.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(ARM and SH4 uClibc toolchain builds)
2015-04-08 10:54:55 +02:00
|
|
|
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.a \
|
2013-10-10 11:40:42 +02:00
|
|
|
$(STAGING_DIR)/usr/lib/ ; \
|
2014-05-26 00:12:57 +02:00
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),)
|
2014-05-26 00:12:57 +02:00
|
|
|
define HOST_GCC_FINAL_INSTALL_SHARED_LIBS
|
|
|
|
for i in $(HOST_GCC_FINAL_USR_LIBS) ; do \
|
sh4: fix toolchain creation
The Linux kernel does force compile with -m4-nofpu, which is only
available when building a multilib toolchain.
The interesting part here is, that buildroot use --disable-multilib for
gcc configure, but enables --with-multilib-list=m4,m4-nofpu in
the default configuration for Qemu targeting r2d emulation.
This results in a toolchain, which can be used for the kernel and
for userland without creating a multilib toolchain with different
kinds of libgcc version. In the multilib case there would be
subdirectories created (!m4 and m4-nofpu). As buildroot uses a
short version of toolchain creation, a multilib enabled gcc build
fails when creating libgcc.
So the best solution is to just keep multilib disabled, but always
add --with-multilib-list when sh4/sh4eb/sh4a/sh4aeb is choosen.
Tested with sh4/sh4a toolchain build and qemu defconfig with
gcc 4.8.x/4.9.x (with and without C++ enabled), uClibc and glibc.
Disable sh4a/sh4aeb for uClibc, as it does not implemented, yet.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(ARM and SH4 uClibc toolchain builds)
2015-04-08 10:54:55 +02:00
|
|
|
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.so* \
|
2014-05-26 00:12:57 +02:00
|
|
|
$(STAGING_DIR)/usr/lib/ ; \
|
sh4: fix toolchain creation
The Linux kernel does force compile with -m4-nofpu, which is only
available when building a multilib toolchain.
The interesting part here is, that buildroot use --disable-multilib for
gcc configure, but enables --with-multilib-list=m4,m4-nofpu in
the default configuration for Qemu targeting r2d emulation.
This results in a toolchain, which can be used for the kernel and
for userland without creating a multilib toolchain with different
kinds of libgcc version. In the multilib case there would be
subdirectories created (!m4 and m4-nofpu). As buildroot uses a
short version of toolchain creation, a multilib enabled gcc build
fails when creating libgcc.
So the best solution is to just keep multilib disabled, but always
add --with-multilib-list when sh4/sh4eb/sh4a/sh4aeb is choosen.
Tested with sh4/sh4a toolchain build and qemu defconfig with
gcc 4.8.x/4.9.x (with and without C++ enabled), uClibc and glibc.
Disable sh4a/sh4aeb for uClibc, as it does not implemented, yet.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(ARM and SH4 uClibc toolchain builds)
2015-04-08 10:54:55 +02:00
|
|
|
cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.so* \
|
2013-06-30 21:29:02 +02:00
|
|
|
$(TARGET_DIR)/usr/lib/ ; \
|
|
|
|
done
|
|
|
|
endef
|
2014-05-26 00:12:57 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
define HOST_GCC_FINAL_INSTALL_USR_LIBS
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/lib
|
|
|
|
$(HOST_GCC_FINAL_INSTALL_STATIC_LIBS)
|
|
|
|
$(HOST_GCC_FINAL_INSTALL_SHARED_LIBS)
|
|
|
|
endef
|
2013-06-30 21:29:02 +02:00
|
|
|
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_USR_LIBS
|
|
|
|
endif
|
|
|
|
|
2015-05-26 09:32:36 +02:00
|
|
|
ifeq ($(BR2_xtensa),y)
|
|
|
|
HOST_GCC_FINAL_CONF_OPTS += --enable-cxx-flags="$(TARGET_ABI)"
|
|
|
|
endif
|
|
|
|
|
2013-06-30 21:29:02 +02:00
|
|
|
$(eval $(host-autotools-package))
|