Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: Julian Pidancet <julian.pidancet@gmail.com>
Subject: Re: [PATCH v3] Introduce multiarch DISTRO_FEATURE
Date: Tue, 29 Nov 2011 07:48:09 -0800	[thread overview]
Message-ID: <4ED4FEB9.4010704@linux.intel.com> (raw)
In-Reply-To: <5ca10bdeed6e90862311b8417c0e6de353d1dc70.1322223227.git.julian.pidancet@gmail.com>

On 11/25/2011 04:29 AM, Julian Pidancet wrote:
> This patch introduces a distro feature which enables gcc to produce
> both 32bit and 64bit code, and enables binutils to operate on both
> 32bit and 64bit binaries.
>
> v3: - Make get_gcc_multiarch_setting more elegant. Use a dictionnary
> to store the config options and replace bb.data.getVar with d.getVar.
>      - Remove i686 from the architecture list because it doesn't seem
> to be a valid TARGET_ARCH any more in OE.
>      - Configure gdb (gdb and gdb-cross) with --enable-64-bit-bfd if
> multiarch DISTRO_FEATURE is present
>
> Signed-off-by: Julian Pidancet<julian.pidancet@gmail.com>
> ---
>   meta/recipes-devtools/binutils/binutils-cross.inc  |    3 ++-
>   meta/recipes-devtools/binutils/binutils.inc        |    3 ++-
>   meta/recipes-devtools/gcc/gcc-common.inc           |   13 +++++++++++++
>   meta/recipes-devtools/gcc/gcc-configure-common.inc |    3 ++-
>   meta/recipes-devtools/gdb/gdb-common.inc           |    1 +
>   5 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
> index 982224f..f07907e 100644
> --- a/meta/recipes-devtools/binutils/binutils-cross.inc
> +++ b/meta/recipes-devtools/binutils/binutils-cross.inc
> @@ -10,7 +10,8 @@ EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
>                   --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
> diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
> index 58fee85..51e4257 100644
> --- a/meta/recipes-devtools/binutils/binutils.inc
> +++ b/meta/recipes-devtools/binutils/binutils.inc
> @@ -49,7 +49,8 @@ B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
>
>   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"
>
> diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
> index 69e0213..fe112d9 100644
> --- a/meta/recipes-devtools/gcc/gcc-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-common.inc
> @@ -21,6 +21,19 @@ def get_gcc_mips_plt_setting(bb, d):
>           return "--with-mips-plt"
>       return ""
>
> +def get_gcc_multiarch_setting(bb, d):
> +    target_arch = d.getVar('TARGET_ARCH', True)
> +    multiarch_options = {
> +        "i586":    "--enable-targets=all",
> +        "powerpc": "--enable-targets=powerpc64",
> +        "sparc":   "--enable-targets=all",
> +    }
> +
> +    if 'multiarch' in d.getVar('DISTRO_FEATURES', True).split() :
> +        if target_arch in multiarch_options :
> +            return multiarch_options[target_arch]
> +    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"
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index ae23e8e..d014980 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> @@ -42,7 +42,8 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', 1) != 'n
>                   ${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"
> diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
> index e01b57c..d728139 100644
> --- a/meta/recipes-devtools/gdb/gdb-common.inc
> +++ b/meta/recipes-devtools/gdb/gdb-common.inc
> @@ -41,6 +41,7 @@ EXPAT = "--without-expat"
>   EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x \
>                   --with-curses --disable-multilib --with-system-readline --disable-sim \
>                   ${GDBPROPREFIX} --with-libelf=${STAGING_DIR_TARGET} ${EXPAT} \
> +                ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
>                  "
>
>   GDBPROPREFIX = "--program-prefix=''"


Julian,

Thanks for your patience, this is merged into OE-Core

Thanks
	Sau!



  parent reply	other threads:[~2011-11-29 15:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-25 12:29 [PATCH v3] Introduce multiarch DISTRO_FEATURE Julian Pidancet
2011-11-25 19:07 ` McClintock Matthew-B29882
2011-11-25 23:40   ` Richard Purdie
2011-11-28 21:32     ` McClintock Matthew-B29882
2011-11-28 22:14       ` Julian Pidancet
2011-11-28 22:22         ` Khem Raj
2011-11-28 22:24           ` McClintock Matthew-B29882
2011-11-28 22:56       ` Richard Purdie
2011-11-28 23:00         ` McClintock Matthew-B29882
2011-11-29 12:30           ` Richard Purdie
2011-11-29 16:10             ` McClintock Matthew-B29882
2011-11-29 21:48               ` McClintock Matthew-B29882
2011-11-30  1:05                 ` McClintock Matthew-B29882
2011-11-29 15:48 ` Saul Wold [this message]
2011-11-29 15:58   ` Julian Pidancet
2011-11-30 21:21     ` Saul Wold
2011-12-01  0:01       ` [PATCH] Fix " Julian Pidancet
2011-11-30 23:35         ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ED4FEB9.4010704@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=julian.pidancet@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox