--disable-werror \
--disable-nls \
--enable-poison-system-directories \
- ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)}"
+ ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
do_install () {
oe_runmake 'DESTDIR=${D}' install
EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
--enable-install-libbfd \
- --enable-shared"
+ --enable-shared \
+ ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd"
return "--with-mips-plt"
return ""
+def get_gcc_multiarch_setting(bb, d):
+ if 'multiarch' in bb.data.getVar('DISTRO_FEATURES',d,1).split() :
+ if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'i586', 'i686' ] :
+ return "--enable-targets=all"
+ if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'powerpc' ] :
+ return "--enable-targets=powerpc64"
+ if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'sparc' ] :
+ return "--enable-targets=all"
+ return ""
+
# We really need HOST_SYS here for some packages and TARGET_SYS for others.
# For now, libgcc is most important so we fix for that - RP.
SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
${EXTRA_OECONF_BASE} \
${EXTRA_OECONF_FPU} \
${EXTRA_OECONF_PATHS} \
- ${@get_gcc_mips_plt_setting(bb, d)}"
+ ${@get_gcc_mips_plt_setting(bb, d)} \
+ ${@get_gcc_multiarch_setting(bb, d)}"
# Build uclibc compilers without cxa_atexit support
EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"