Enable multilib for target gcc
cover Enable multilib for target gcc
From: Nitin A Kamble <[email protected]>
These commits enable the target gcc for multilib compilation.
The tune file definitions are rearranged for easy parsing by multilib code.
Multilib setup code is added for target gcc recipe. This code looks at the multilib configuration defined in local.conf and generates multilib setup files for target gcc accordingly.
Also target libgcc recipe is extended to have correct paths for non-default gcc multilib options.
All this code added for multilib setup is inactive if multilib is not enabled in the local.conf
This has tested to work with x86 & x86-64 enabled multilib configuration for x86-64 machine.
Thanks,
Nitin
The following changes since commit 87e32edb88c30ac116fa396148ac26357051f93a:
iputils: Add base_libdir to VPATH in order to find the crypto library (2012-02-21 17:59:40 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib nitin/gcc-multilib-for-push
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/gcc-multilib-for-push
Nitin A Kamble (10):
arch-ia32: rearrange tune configuration arch-ia32.inc: restructure TUNE_ARCH definition arch-mips.inc: rearrange for gcc-multilib arch-mips.inc: define TUNE_FEATURE_ARCH vars for multilib tunes arch-powerpc*.inc: rearrange for gcc-multilib arch-powerpc*.inc: rearrange TUNE_ARCH definition
gcc: remove the 64bithack patch
target gcc: gcc-multilib-setup
libgcc_4.6.bb: Complete quote in definition of FILES_libgcov-dev
libgcc: get the gcc header files working
meta/conf/machine/include/ia32/arch-ia32.inc | 50 ++++--- meta/conf/machine/include/mips/arch-mips.inc | 68 +++++---- meta/conf/machine/include/powerpc/arch-powerpc.inc | 25 ++-- .../machine/include/powerpc/arch-powerpc64.inc | 12 +- meta/recipes-devtools/gcc/gcc-4.6.inc | 3 +- meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 68 --------- meta/recipes-devtools/gcc/gcc-configure-common.inc | 2 +- meta/recipes-devtools/gcc/gcc-configure-target.inc | 1 + meta/recipes-devtools/gcc/gcc-multilib-config.inc | 149 ++++++++++++++++++++ meta/recipes-devtools/gcc/libgcc_4.6.bb | 55 +++++++- 10 files changed, 291 insertions(+), 142 deletions(-) delete mode 100644 meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch create mode 100644 meta/recipes-devtools/gcc/gcc-multilib-config.inc
Signature · 1 line
1.7.6.4
PATCH 1/10 arch-ia32: rearrange tune configuration
From: Nitin A Kamble <[email protected]>
This makes tune names arch specific.
there is no functional change here.
This is done for multilib enabling of gcc recipe.
--- meta/conf/machine/include/ia32/arch-ia32.inc | 45 ++++++++++++++------------ 1 files changed, 24 insertions(+), 21 deletions(-)
meta/conf/machine/include/ia32/arch-ia32.inc +24 -21
@@ -8,42 +8,45 @@ X86ARCH32 ?= "i586" X86ARCH64 ?= "x86_64" # ELF32 ABI -TUNEVALID[m32] = "IA32 ELF32 standard ABI" -TUNECONFLICTS[m32] = "m64 mx32" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "${X86ARCH32}", "" ,d)}" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}" -MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "m32", ":x86", "" ,d)}" +TUNEVALID[x86-m32] = "IA32 ELF32 standard ABI" +TUNECONFLICTS[x86-m32] = "x86-64-m64 x86-64-mx32" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${X86ARCH32}", "" ,d)}" +TUNE_FEATURE_CCARGS-x86-m32 ?= "-m32" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${TUNE_FEATURE_CCARGS-x86-m32}", "", d)}" +MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", ":x86", "" ,d)}" # x32 ABI -TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI" -TUNECONFLICTS[mx32] = "m64 m32" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "${X86ARCH64}", "" ,d)}" -ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "x32", "" ,d)}" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-mx32", "", d)}" -TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}" -TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}" +TUNEVALID[x86-64-mx32] = "IA32e (x86_64) ELF32 standard ABI" +TUNECONFLICTS[x86-64-mx32] = "x86-64-m64 x86-m32" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${X86ARCH64}", "" ,d)}" +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "x32", "" ,d)}" +TUNE_FEATURE_CCARGS-x86-64-mx32 ?= "-mx32" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${TUNE_FEATURE_CCARGS-x86-64-mx32}", "", d)}" +TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "-m elf32_x86_64", "", d)}" +TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "-x32", "", d)}" # ELF64 ABI -TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI" -TUNECONFLICT[m64] = "m32 mx32" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "${X86ARCH64}", "" ,d)}" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}" +TUNEVALID[x86-64-m64] = "IA32e (x86_64) ELF64 standard ABI" +TUNECONFLICT[x86-64-m64] = "x86-m32 x86-64-mx32" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${X86ARCH64}", "" ,d)}" +TUNE_FEATURE_CCARGS-x86-64-m64 ?= "-m64" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${TUNE_FEATURE_CCARGS-x86-64-m64}", "", d)}" -TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}" +TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "x86", "x86_64", d)}" # Default Tune configurations AVAILTUNES += "x86" -TUNE_FEATURES_tune-x86 ?= "m32" +TUNE_FEATURES_tune-x86 ?= "x86-m32" BASE_LIB_tune-x86 ?= "lib" PACKAGE_EXTRA_ARCHS_tune-x86 = "x86" AVAILTUNES += "x86-64" -TUNE_FEATURES_tune-x86-64 ?= "m64" +TUNE_FEATURES_tune-x86-64 ?= "x86-64-m64" BASE_LIB_tune-x86-64 ?= "lib64" PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64" AVAILTUNES += "x86-64-x32" -TUNE_FEATURES_tune-x86-64-x32 ?= "mx32" +TUNE_FEATURES_tune-x86-64-x32 ?= "x86-64-mx32" BASE_LIB_tune-x86-64-x32 ?= "libx32" PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86_64_x32" -TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "_x32", "", d)}" +TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "_x32", "", d)}"
Signature · 1 line
1.7.6.4
PATCH 2/10 arch-ia32.inc: restructure TUNE_ARCH definition
From: Nitin A Kamble <[email protected]>
So that multilib code can find out TUNE_ARCH for any tune.
--- meta/conf/machine/include/ia32/arch-ia32.inc | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
meta/conf/machine/include/ia32/arch-ia32.inc +6 -5
@@ -4,13 +4,12 @@ DEFAULTTUNE ?= "x86" TARGET_FPU ?= "" -X86ARCH32 ?= "i586" -X86ARCH64 ?= "x86_64" # ELF32 ABI TUNEVALID[x86-m32] = "IA32 ELF32 standard ABI" TUNECONFLICTS[x86-m32] = "x86-64-m64 x86-64-mx32" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${X86ARCH32}", "" ,d)}" +TUNE_FEATURE_ARCH-x86-m32 = "i586" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${TUNE_FEATURE_ARCH-x86-m32}", "" ,d)}" TUNE_FEATURE_CCARGS-x86-m32 ?= "-m32" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${TUNE_FEATURE_CCARGS-x86-m32}", "", d)}" MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", ":x86", "" ,d)}"
@@ -18,7 +17,8 @@ MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", ":x86", "" # x32 ABI TUNEVALID[x86-64-mx32] = "IA32e (x86_64) ELF32 standard ABI" TUNECONFLICTS[x86-64-mx32] = "x86-64-m64 x86-m32" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${X86ARCH64}", "" ,d)}" +TUNE_FEATURE_ARCH-x86-64-mx32 = "x86_64" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${TUNE_FEATURE_ARCH-x86-64-mx32}", "" ,d)}" ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "x32", "" ,d)}" TUNE_FEATURE_CCARGS-x86-64-mx32 ?= "-mx32" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${TUNE_FEATURE_CCARGS-x86-64-mx32}", "", d)}"
@@ -28,7 +28,8 @@ TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "-x32", "", # ELF64 ABI TUNEVALID[x86-64-m64] = "IA32e (x86_64) ELF64 standard ABI" TUNECONFLICT[x86-64-m64] = "x86-m32 x86-64-mx32" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${X86ARCH64}", "" ,d)}" +TUNE_FEATURE_ARCH-x86-64-m64 = "x86_64" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${TUNE_FEATURE_ARCH-x86-64-m64}", "" ,d)}" TUNE_FEATURE_CCARGS-x86-64-m64 ?= "-m64" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${TUNE_FEATURE_CCARGS-x86-64-m64}", "", d)}"
Signature · 1 line
1.7.6.4
PATCH 3/10 arch-mips.inc: rearrange for gcc-multilib
In reply to [email protected]From: Nitin A Kamble <[email protected]>
make tune feature names mips specific
no functional changes here
--- meta/conf/machine/include/mips/arch-mips.inc | 65 +++++++++++++------------ 1 files changed, 34 insertions(+), 31 deletions(-)
meta/conf/machine/include/mips/arch-mips.inc +34 -31
@@ -7,61 +7,64 @@ DEFAULTTUNE ?= "mips" # Endianess -TUNEVALID[bigendian] = "Enable big-endian mode" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-meb", "-mel", d)}" +TUNEVALID[mips-bigendian] = "Enable big-endian mode" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-bigendian", "-meb", "-mel", d)}" # ABI flags -TUNEVALID[o32] = "MIPS o32 ABI" -TUNECONFLICT[o32] = "n32 n64" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "o32", "-mabi=32", "", d)}" +TUNEVALID[mips-o32] = "MIPS o32 ABI" +TUNECONFLICT[mips-o32] = "mips-n32 mips-n64" +TUNE_FEATURE_CCARGS-mips-o32 ?= "-mabi=32" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-o32", "${TUNE_FEATURE_CCARGS-mips-o32}", "", d)}" -TUNEVALID[n32] = "MIPS64 n32 ABI" -TUNECONFLICT[n32] = "o32 n64" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "n32", "-mabi=n32", "", d)}" +TUNEVALID[mips-n32] = "MIPS64 n32 ABI" +TUNECONFLICT[mips-n32] = "mips-o32 mips-n64" +TUNE_FEATURE_CCARGS-mips-n32 ?= "-mabi=n32" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-n32", "${TUNE_FEATURE_CCARGS-mips-n32}", "", d)}" -TUNEVALID[n64] = "MIPS64 n64 ABI" -TUNECONFLICT[n64] = "o32 n32" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "n64", "-mabi=64", "", d)}" +TUNEVALID[mips-n64] = "MIPS64 n64 ABI" +TUNECONFLICT[mips-n64] = "mips-o32 mips-n32" +TUNE_FEATURE_CCARGS-mips-n64 ?= "-mabi=64" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-n64", "${TUNE_FEATURE_CCARGS-mips-n64}", "", d)}" # Floating point -TUNEVALID[fpu-hard] = "Use hardware FPU" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "-msoft-float", d)}" -TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "", "soft", d)}" +TUNEVALID[mips-fpu-hard] = "Use hardware FPU" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-fpu-hard", "-mhard-float", "-msoft-float", d)}" +TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "mips-fpu-hard", "", "soft", d)}" # Package naming -MIPSPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}" -MIPSPKGSFX_BYTE = "${@bb.utils.contains("TUNE_FEATURES", "n64" , "64", "", d)}" -MIPSPKGSFX_BYTE .= "${@bb.utils.contains("TUNE_FEATURES", "n32" , "64", "", d)}" -MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}" -MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "n32", "-n32", "", d)}" +MIPSPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "mips-bigendian", "", "el", d)}" +MIPSPKGSFX_BYTE = "${@bb.utils.contains("TUNE_FEATURES", "mips-n64" , "64", "", d)}" +MIPSPKGSFX_BYTE .= "${@bb.utils.contains("TUNE_FEATURES", "mips-n32" , "64", "", d)}" +MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "mips-fpu-hard" , "", "-nf", d)}" +MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "mips-n32", "-n32", "", d)}" TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}" TUNE_PKGARCH ?= "${TUNE_ARCH}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}" # Base tunes AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf" -TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard" +TUNE_FEATURES_tune-mips = "mips-o32 mips-bigendian mips-fpu-hard" BASE_LIB_tune-mips = "lib" -TUNE_FEATURES_tune-mips64-n32 = "n32 bigendian fpu-hard" +TUNE_FEATURES_tune-mips64-n32 = "mips-n32 mips-bigendian mips-fpu-hard" BASE_LIB_tune-mips64-n32 = "lib32" -TUNE_FEATURES_tune-mips64 = "n64 bigendian fpu-hard" +TUNE_FEATURES_tune-mips64 = "mips-n64 mips-bigendian mips-fpu-hard" BASE_LIB_tune-mips64 = "lib64" -TUNE_FEATURES_tune-mipsel = "o32 fpu-hard" +TUNE_FEATURES_tune-mipsel = "mips-o32 mips-fpu-hard" BASE_LIB_tune-mipsel = "lib" -TUNE_FEATURES_tune-mips64el-n32 = "n32 fpu-hard" +TUNE_FEATURES_tune-mips64el-n32 = "mips-n32 mips-fpu-hard" BASE_LIB_tune-mips64el-n32 = "lib32" -TUNE_FEATURES_tune-mips64el = "n64 fpu-hard" +TUNE_FEATURES_tune-mips64el = "mips-n64 mips-fpu-hard" BASE_LIB_tune-mips64el = "lib64" -TUNE_FEATURES_tune-mips-nf = "o32 bigendian" +TUNE_FEATURES_tune-mips-nf = "mips-o32 mips-bigendian" BASE_LIB_tune-mips-nf = "lib" -TUNE_FEATURES_tune-mips64-nf-n32 = "n32 bigendian" +TUNE_FEATURES_tune-mips64-nf-n32 = "mips-n32 mips-bigendian" BASE_LIB_tune-mips64-nf-n32 = "lib32" -TUNE_FEATURES_tune-mips64-nf = "n64 bigendian" +TUNE_FEATURES_tune-mips64-nf = "mips-n64 mips-bigendian" BASE_LIB_tune-mips64-nf = "lib64" -TUNE_FEATURES_tune-mipsel-nf = "o32" +TUNE_FEATURES_tune-mipsel-nf = "mips-o32" BASE_LIB_tune-mipsel-nf = "lib" -TUNE_FEATURES_tune-mips64el-nf-n32 = "n32" +TUNE_FEATURES_tune-mips64el-nf-n32 = "mips-n32" BASE_LIB_tune-mips64el-nf-n32 = "lib32" -TUNE_FEATURES_tune-mips64el-nf = "n64" +TUNE_FEATURES_tune-mips64el-nf = "mips-n64" BASE_LIB_tune-mips64el-nf = "lib64"
Signature · 1 line
1.7.6.4
PATCH 4/10 arch-mips.inc: define TUNE_FEATURE_ARCH vars for multilib tunes
In reply to [email protected]From: Nitin A Kamble <[email protected]>
--- meta/conf/machine/include/mips/arch-mips.inc | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
meta/conf/machine/include/mips/arch-mips.inc +3 -0
@@ -15,16 +15,19 @@ TUNEVALID[mips-o32] = "MIPS o32 ABI" TUNECONFLICT[mips-o32] = "mips-n32 mips-n64" TUNE_FEATURE_CCARGS-mips-o32 ?= "-mabi=32" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-o32", "${TUNE_FEATURE_CCARGS-mips-o32}", "", d)}" +TUNE_FEATURE_ARCH-mips-o32 = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}" TUNEVALID[mips-n32] = "MIPS64 n32 ABI" TUNECONFLICT[mips-n32] = "mips-o32 mips-n64" TUNE_FEATURE_CCARGS-mips-n32 ?= "-mabi=n32" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-n32", "${TUNE_FEATURE_CCARGS-mips-n32}", "", d)}" +TUNE_FEATURE_ARCH-mips-n32 = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}" TUNEVALID[mips-n64] = "MIPS64 n64 ABI" TUNECONFLICT[mips-n64] = "mips-o32 mips-n32" TUNE_FEATURE_CCARGS-mips-n64 ?= "-mabi=64" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-n64", "${TUNE_FEATURE_CCARGS-mips-n64}", "", d)}" +TUNE_FEATURE_ARCH-mips-n64 = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}" # Floating point TUNEVALID[mips-fpu-hard] = "Use hardware FPU"
Signature · 1 line
1.7.6.4
PATCH 5/10 arch-powerpc*.inc: rearrange for gcc-multilib
In reply to [email protected]From: Nitin A Kamble <[email protected]>
make tune_feature names ppc specific
no functional change here
this helps gcc multilib code get tune parameter for any tune.
--- meta/conf/machine/include/powerpc/arch-powerpc.inc | 24 ++++++++++--------- .../machine/include/powerpc/arch-powerpc64.inc | 11 +++++---- 2 files changed, 19 insertions(+), 16 deletions(-)
meta/conf/machine/include/powerpc/arch-powerpc.inc +13 -11
@@ -5,30 +5,32 @@ DEFAULTTUNE ?= "powerpc" -TUNEVALID[m32] = "Power ELF32 standard ABI" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "powerpc", "", d)}" +TUNEVALID[ppc-m32] = "Power ELF32 standard ABI" +TUNE_FEATURE_CCARGS-ppc-m32 ?= "-m32" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "${TUNE_FEATURE_CCARGS-ppc-m32}", "", d)}" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "powerpc", "", d)}" -TUNEVALID[fpu-hard] = "Use hardware FPU." -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "", d)}" +TUNEVALID[ppc-fpu-hard] = "Use hardware FPU." +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-hard", "-mhard-float", "", d)}" -TUNEVALID[fpu-soft] = "Use software FPU." -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)}" -TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}" +TUNEVALID[ppc-fpu-soft] = "Use software FPU." +TUNE_FEATURE_CCARGS-ppc-fpu-soft ?= "-msoft-float" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-soft", "${TUNE_FEATURE_CCARGS-ppc-fpu-soft}", "", d)}" +TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-soft", "soft", "", d)}" ABIEXTENSION = "${@['','spe'][d.getVar('TARGET_FPU', True) in ['ppc-efd', 'ppc-efs']]}" -PPCPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}" +PPCPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-hard" , "", "-nf", d)}" PPCPKGARCH = "${TUNE_ARCH}${PPCPKGSFX_FPU}" TUNE_PKGARCH ?= "${PPCPKGARCH}" # Basic tune definitions AVAILTUNES += "powerpc powerpc-nf" -TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft" +TUNE_FEATURES_tune-powerpc-nf ?= "ppc-m32 ppc-fpu-soft" BASE_LIB_tune-powerpc-nf = "lib" PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf" -TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard" +TUNE_FEATURES_tune-powerpc ?= "ppc-m32 ppc-fpu-hard" BASE_LIB_tune-powerpc = "lib" PACKAGE_EXTRA_ARCHS_tune-powerpc = "${PACKAGE_EXTRA_ARCHS_tune-powerpc-nf} powerpc"
meta/conf/machine/include/powerpc/arch-powerpc64.inc +6 -5
@@ -2,11 +2,12 @@ DEFAULTTUNE ?= "powerpc64" require conf/machine/include/powerpc/arch-powerpc.inc -TUNEVALID[m64] = "Power ELF64 standard ABI" -TUNE_CONFLICTS[m64] = "m32 nf" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "m64" ], "powerpc64", "", d)}" +TUNEVALID[ppc-m64] = "Power ELF64 standard ABI" +TUNE_CONFLICTS[ppc-m64] = "ppc-m32 ppc-nf" +TUNE_FEATURE_CCARGS-ppc-m64 ?= "-m64" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-m64", "${TUNE_FEATURE_CCARGS-ppc-m64}", "", d)}" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppc-m64" ], "powerpc64", "", d)}" AVAILTUNES += "powerpc64" -TUNE_FEATURES_tune-powerpc64 ?= "m64 fpu-hard" +TUNE_FEATURES_tune-powerpc64 ?= "ppc-m64 ppc-fpu-hard" BASE_LIB_tune-powerpc64 = "lib64"
Signature · 1 line
1.7.6.4
PATCH 6/10 arch-powerpc*.inc: rearrange TUNE_ARCH definition
In reply to [email protected]From: Nitin A Kamble <[email protected]>
This helps gcc mutlilib code find definitions used by various tunes
--- meta/conf/machine/include/powerpc/arch-powerpc.inc | 3 ++- .../machine/include/powerpc/arch-powerpc64.inc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
meta/conf/machine/include/powerpc/arch-powerpc.inc +2 -1
@@ -8,7 +8,8 @@ DEFAULTTUNE ?= "powerpc" TUNEVALID[ppc-m32] = "Power ELF32 standard ABI" TUNE_FEATURE_CCARGS-ppc-m32 ?= "-m32" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "${TUNE_FEATURE_CCARGS-ppc-m32}", "", d)}" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "powerpc", "", d)}" +TUNE_FEATURE_ARCH-ppc-m32 = "powerpc" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "${TUNE_FEATURE_ARCH-ppc-m32}", "" ,d)}" TUNEVALID[ppc-fpu-hard] = "Use hardware FPU." TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-hard", "-mhard-float", "", d)}"
meta/conf/machine/include/powerpc/arch-powerpc64.inc +2 -1
@@ -6,7 +6,8 @@ TUNEVALID[ppc-m64] = "Power ELF64 standard ABI" TUNE_CONFLICTS[ppc-m64] = "ppc-m32 ppc-nf" TUNE_FEATURE_CCARGS-ppc-m64 ?= "-m64" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-m64", "${TUNE_FEATURE_CCARGS-ppc-m64}", "", d)}" -TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppc-m64" ], "powerpc64", "", d)}" +TUNE_FEATURE_ARCH-ppc-m64 = "powerpc64" +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppc-m64" ], "${TUNE_FEATURE_ARCH-ppc-m64}", "", d)}" AVAILTUNES += "powerpc64" TUNE_FEATURES_tune-powerpc64 ?= "ppc-m64 ppc-fpu-hard"
Signature · 1 line
1.7.6.4
PATCH 7/10 gcc: remove the 64bithack patch
In reply to [email protected]From: Nitin A Kamble <[email protected]>
and bump PR
--- meta/recipes-devtools/gcc/gcc-4.6.inc | 3 +- meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 68 --------------------- 2 files changed, 1 insertions(+), 70 deletions(-) delete mode 100644 meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch
meta/recipes-devtools/gcc/gcc-4.6.inc +1 -2
@@ -1,6 +1,6 @@ require gcc-common.inc -PR = "r22" +PR = "r23" # Third digit in PV should be incremented after a minor release # happens from this branch on gcc e.g. currently its 4.6.0
@@ -59,7 +59,6 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \ file://gcc-poison-system-directories.patch \ file://gcc-poison-dir-extend.patch \ file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ - file://64bithack.patch \ file://optional_libstdc.patch \ file://disable_relax_pic_calls_flag.patch \ file://COLLECT_GCC_OPTIONS.patch \
meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch deleted +0 -68
68 lines not on this page · raw message
Signature · 1 line
1.7.6.4
PATCH 8/10 target gcc: gcc-multilib-setup
In reply to [email protected]From: Nitin A Kamble <[email protected]>
add a task to setup multilib configuration for target gcc.
now the multilib setup file is tweeked as needed.
gcc-multilib-config.inc: tail
--- meta/recipes-devtools/gcc/gcc-configure-common.inc | 2 +- meta/recipes-devtools/gcc/gcc-configure-target.inc | 1 + meta/recipes-devtools/gcc/gcc-multilib-config.inc | 149 ++++++++++++++++++++ 3 files changed, 151 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-devtools/gcc/gcc-multilib-config.inc
meta/recipes-devtools/gcc/gcc-configure-common.inc +1 -1
@@ -25,7 +25,7 @@ EXTRA_OECONF_PATHS ?= "" EXTRA_OECONF_INITIAL ?= "" EXTRA_OECONF_INTERMEDIATE ?= "" -GCCMULTILIB = "--disable-multilib" +GCCMULTILIB ?= "--disable-multilib" EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', 1) != 'no']} \ --with-gnu-ld \
meta/recipes-devtools/gcc/gcc-configure-target.inc +1 -0
@@ -1,4 +1,5 @@ require gcc-configure-common.inc +require gcc-multilib-config.inc EXTRA_OECONF_PATHS = " \ --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +149 -0
149 lines not on this page · raw message
Signature · 1 line
1.7.6.4
PATCH 9/10 libgcc_4.6.bb: Complete quote in definition of FILES_libgcov-dev
In reply to [email protected]From: Nitin A Kamble <[email protected]>
--- meta/recipes-devtools/gcc/libgcc_4.6.bb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-devtools/gcc/libgcc_4.6.bb +1 -1
@@ -16,7 +16,7 @@ FILES_${PN}-dev = " \ ${libdir}/${TARGET_SYS}/${BINV}/crt* \ ${libdir}/${TARGET_SYS}/${BINV}/libgcc*" FILES_libgcov-dev = " \ - ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \ + ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a " FILES_${PN}-dbg += "${base_libdir}/.debug/"
Signature · 1 line
1.7.6.4
PATCH 10/10 libgcc: get the gcc header files working
In reply to [email protected]From: Nitin A Kamble <[email protected]>
--- meta/recipes-devtools/gcc/libgcc_4.6.bb | 53 +++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-)
meta/recipes-devtools/gcc/libgcc_4.6.bb +53 -0
@@ -14,6 +14,9 @@ FILES_${PN} = "${base_libdir}/libgcc*.so.*" FILES_${PN}-dev = " \ ${base_libdir}/libgcc*.so \ ${libdir}/${TARGET_SYS}/${BINV}/crt* \ + ${libdir}/${TARGET_SYS}/${BINV}/32 \ + ${libdir}/${TARGET_SYS}/${BINV}/x32 \ + ${libdir}/${TARGET_SYS}/${BINV}/n32 \ ${libdir}/${TARGET_SYS}/${BINV}/libgcc*" FILES_libgcov-dev = " \ ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a "
@@ -51,3 +54,53 @@ BBCLASSEXTEND = "nativesdk" INSANE_SKIP_libgcc-dev = "staticdev" INSANE_SKIP_libgcov-dev = "staticdev" +addtask multilib_install after do_install before do_package + + +# this makes multilib gcc files findable for target gcc +# like this directory is made findable +# /usr/lib/i586-pokymllib32-linux/4.6.3/ +# by creating this symlink to it +# /usr/lib64/x86_64-poky-linux/4.6.3/32 + +python do_multilib_install() { + import re + # do this only for multilib extended recipe + if d.getVar('PN', 1) != 'libgcc': + return + + tune_arch = d.getVar('TUNE_ARCH', 1) or '' + defaulttune = d.getVar('DEFAULTTUNE', 1) or '' + multilibs = d.getVar('MULTILIB_VARIANTS', 1) or '' + if multilibs == '': + return + + tunes_32 = ['x86', 'core2', 'i586', 'mips', 'mipsel', 'mips-nf', 'mipsel-nf', 'powerpc', 'powerpc-nf'] + tunes_64 = ['x86-64', 'core2-64', 'mips64', 'mips64el', 'mips64-nf', 'mips64el-nf', 'powerpc64'] + tunes_x32 = ['x86-64-x32', 'core2-64-x32'] + tunes_n32 = ['mips64-n32', 'mips64el-n32', 'mips64-nf-n32', 'mips64el-nf-n32'] + + for ml in multilibs.split(' '): + ml_tune = d.getVar('DEFAULTTUNE_virtclass-multilib-' + ml, 1) or '' + ml_tune_features = d.getVar('TUNE_FEATURES_tune-' + ml_tune, 1) or '' + ml_baselib = d.getVar('BASE_LIB_tune-' + ml_tune, 1) or '' + for feature in ml_tune_features.split(): + ml_feature_arch = d.getVar('TUNE_FEATURE_ARCH-' + feature, 1) or '' + if ml_tune in tunes_32: + bitness = '32' + elif ml_tune in tunes_64: + bitness = '64' + elif ml_tune in tunes_x32: + bitness = 'x32' + elif ml_tune in tunes_n32: + bitness = 'n32' + + binv = d.getVar('BINV', 1) or '' + + src = '/usr/' + ml_baselib + '/' + ml_feature_arch + '-pokyml' + ml + '-linux/' + binv + '/' + dest = (d.getVar('D', 1) or '') + (d.getVar('libdir', 1) or '') + '/' + (d.getVar('TARGET_SYS', 1) or '') + '/' + binv + '/' + bitness + if os.path.lexists(dest): + os.unlink(dest) + os.symlink(src, dest) + +}
Signature · 1 line
1.7.6.4
Re: [PATCH 08/10] target gcc: gcc-multilib-setup
In reply to [email protected]Hi Nitin,
This is a good start but I think this still needs a little bit of work. I'm particularly concerned it appears necessary to rewrite all the tune files to make this work, we shouldn't need to do that.
I've given this some thought and explained how I think we can avoid this and some other issues below.
meta/recipes-devtools/gcc/gcc-multilib-config.inc line 27
Quoted 6 lines · On Tue, 2012-02-21 at 22:37 -0800, [email protected] wrote:
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +6
-0+python do_gcc_multilib_setup() { + import re + + # do this only for target recipe + if d.getVar('PN', 1) != 'gcc': + return
Please use ", True" instead of ", 1" in all new code.
meta/recipes-devtools/gcc/gcc-multilib-config.inc line 33
Quoted 5 lines
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +5
-0+ srcdir = d.getVar('S', 1) or '' + + multilibs = d.getVar('MULTILIB_VARIANTS', 1) or '' + if multilibs == '': + return
Even in the non multilib case, we still need to alter the configuration to match whatever library layout is being used (the values of base_libdir and libdir) as the 64bithack.patch does now.
meta/recipes-devtools/gcc/gcc-multilib-config.inc line 41
Quoted 7 lines
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +7
-0+ gcc_target_config_files = { 'x86_64' : 'gcc/config/i386/t-linux64', + 'mips' : 'gcc/config/mips/t-linux64' , + 'ppc' : 'gcc/config/rs6000/t-linux64' } + + gcc_header_config_files = { 'x86_64' : 'gcc/config/i386/linux64.h', + 'mips' : 'gcc/config/mips/linux64.h' , + 'ppc' : 'gcc/config/rs6000/linux64.h' }
What about building 64 bit as a multilib on an i586 system? This also doesn't account for powerpc64.
For i586, we probably need to add the configure option --enable_targets=all and then we can add i*86 to the above list also pointing at gcc/config/i386/t-linux64. We'd need more investigation to figure out what is needed for powerpc64.
Quoted 8 lines
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +8
-0+ target_arch = d.getVar('TARGET_ARCH', 1) or '' + + if target_arch not in gcc_target_config_files: + bb.warn('gcc multilib setup is not supported for TARGET_ARCH=' + target_arch) + return + + gcc_multilib_target_config_file = gcc_target_config_files[target_arch] +
meta/recipes-devtools/gcc/gcc-multilib-config.inc line 60
Quoted 10 lines
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +10
-0+ gcc_multilib_header_config_file = gcc_header_config_files[target_arch] + + ml_list = ['DEFAULTTUNE'] + for ml in multilibs.split(' '): + ml_list.append('DEFAULTTUNE_virtclass-multilib-' + ml) + + tunes_32 = ['x86', 'core2', 'i586', 'mips', 'mipsel', 'mips-nf', 'mipsel-nf', 'powerpc', 'powerpc-nf'] + tunes_64 = ['x86-64', 'core2-64', 'mips64', 'mips64el', 'mips64-nf', 'mips64el-nf', 'powerpc64'] + tunes_x32 = ['x86-64-x32', 'core2-64-x32'] + tunes_n32 = ['mips64-n32', 'mips64el-n32', 'mips64-nf-n32', 'mips64el-nf-n32']
I'm afraid I strongly dislike lists of hardcoded values. How about having the code below that uses this doing something like:
if ml_tune.find("-n32") != -1:
libdirn32 = ml_baselib
elif ml_tune.find("-x32") != -1:
libdirx32 = ml_baselib
elif ml_tune.find("64") != -1:
libdir64 = ml_baselib
else:
libdir32 = ml_baselib
?
This also reminds me that we have an open bug about sanity checking the multilib configuration. This code would lend itself well to sanity checking the multilib configuration, e.g. if any of the above variables all get set to the same library location, that would be an error. I'm starting to think we may need some library functions to handle this better.
The sanity checks can be a secondary step and patch but it would be good to start thinking about this now.
Quoted 18 lines
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +18
-0+ libdir32 = 'SYSTEMLIBS_DIR' + libdir64 = 'SYSTEMLIBS_DIR' + libdirx32 = 'SYSTEMLIBS_DIR' + libdirn32 = 'SYSTEMLIBS_DIR' + + multilib_options = [] + multilib_dirnames = [] + multilib_osdirnames = [] + + for ml in ml_list: + ml_tune = d.getVar(ml, 1) or '' + ml_tune_features = d.getVar('TUNE_FEATURES_tune-' + ml_tune, 1) or '' + ml_baselib = d.getVar('BASE_LIB_tune-' + ml_tune, 1) or '' + + if ml_tune in tunes_32: + libdir32 = ml_baselib + elif ml_tune in tunes_64: + libdir64 = ml_baselib
meta/recipes-devtools/gcc/gcc-multilib-config.inc line 89
Quoted 10 lines
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +10
-0+ elif ml_tune in tunes_x32: + libdirx32 = ml_baselib + elif ml_tune in tunes_n32: + libdirn32 = ml_baselib + + ml_tune_ccargs_list = [] + for feature in ml_tune_features.split(): + ml_feature_ccargs = d.getVar('TUNE_FEATURE_CCARGS-' + feature, 1) or '' + ml_tune_ccargs_list.append(ml_feature_ccargs) + ml_tune_ccargs = ' '.join(ml_tune_ccargs_list)
I'm guessing this piece is why you ended up changing all the tune files. To access this (and other multilib information) you should be able to do something like:
for ml in multilibs:
localdata = bb.data.createCopy(d)
override = ":virtclass-multilib-" + ml localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override) bb.data.update_data(localdata)
tune_ccargs = localdata.getVar("TUNE_CCARGS", True) tune_features = localdata.getVar("TUNE_FEATURES", True) baselib = localdata.getVar("BASE_LIB", True)
and here tune_ccargs will get the value applied in each multilib along with some other variables I noticed you were looking up.
Of course this doesn't get you just the TUNE_FEATURE piece of tune_ccargs but it does remove the need to re-namespace all the variables.
Quoted 49 lines
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +49
-0+ # take out '-' in parameters + multilib_options.append(re.sub(r'^\-+', '', re.sub(r' \-+', ' ', ml_tune_ccargs))) + if ml_baselib == 'lib': + multilib_dirnames.append('32') + else: + multilib_dirnames.append(ml_baselib.replace('lib', '')) + multilib_osdirnames.append('../' + ml_baselib) + + with open(srcdir + '/' + gcc_multilib_target_config_file, 'r') as f: + filelines = f.read() + f.close() + + # recreate multilib configuration variables + + filelines = re.sub(r'^\s*MULTILIB_OPTIONS\s*=.*$', + 'MULTILIB_OPTIONS = ' + '/'.join(multilib_options), + filelines, flags=re.MULTILINE) + + filelines = re.sub(r'^\s*MULTILIB_DIRNAMES\s*=.*$', + 'MULTILIB_DIRNAMES = ' + ' '.join(multilib_dirnames), + filelines, flags=re.MULTILINE) + + filelines = re.sub(r'^\s*MULTILIB_OSDIRNAMES\s*=.*$', + 'MULTILIB_OSDIRNAMES = ' + ' '.join(multilib_osdirnames), + filelines, flags=re.MULTILINE) + + with open(srcdir + '/' + gcc_multilib_target_config_file, 'w') as f: + f.write(filelines) + f.close() + + with open(srcdir + '/' + gcc_multilib_header_config_file, 'r') as f: + filelines = f.read() + f.close() + + # replace lines like + # #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" + # by + # #define GLIBC_DYNAMIC_LINKER32 "/lib/" "ld-linux.so.2" + # this is needed to put the correct dynamic loader path in the generated binaries + + filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKER32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$', + r'\1"/' + libdir32 + r'/"\3', + filelines, flags=re.MULTILINE) + + filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$', + r'\1"/' + libdir64 + r'/"\3', + filelines, flags=re.MULTILINE) + + filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
meta/recipes-devtools/gcc/gcc-multilib-config.inc line 148
Quoted 10 lines
meta/recipes-devtools/gcc/gcc-multilib-config.inc new file +10
-0+ r'\1"/' + libdirx32 + r'/"\3', + filelines, flags=re.MULTILINE) + + filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$', + r'\1"/' + libdirn32 + r'/"\3', + filelines, flags=re.MULTILINE) + + with open(srcdir + '/' + gcc_multilib_header_config_file, 'w') as f: + f.write(filelines) + f.close()
I'm slightly puzzled why this last open/clode is indented differently to the first set above. I'm also wondering why you don't do all of this in one pass over the file and instead use two?
Cheers,
Richard
Re: [PATCH 10/10] libgcc: get the gcc header files working
In reply to [email protected]Quoted 23 lines · On Tue, 2012-02-21 at 22:37 -0800, [email protected] wrote:
From: Nitin A Kamble <[email protected]>
Signed-off-by Nitin A Kamble <[email protected]>--- meta/recipes-devtools/gcc/libgcc_4.6.bb | 53 +++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-)meta/recipes-devtools/gcc/libgcc_4.6.bb +3
-0@@ -14,6 +14,9 @@ FILES_${PN} = "${base_libdir}/libgcc*.so.*" FILES_${PN}-dev = " \ ${base_libdir}/libgcc*.so \ ${libdir}/${TARGET_SYS}/${BINV}/crt* \ + ${libdir}/${TARGET_SYS}/${BINV}/32 \ + ${libdir}/${TARGET_SYS}/${BINV}/x32 \ + ${libdir}/${TARGET_SYS}/${BINV}/n32 \ ${libdir}/${TARGET_SYS}/${BINV}/libgcc*" FILES_libgcov-dev = " \ ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a "@@ -51,3 +54,53 @@ BBCLASSEXTEND = "nativesdk" INSANE_SKIP_libgcc-dev = "staticdev"
meta/recipes-devtools/gcc/libgcc_4.6.bb BBCLASSEXTEND = "nativesdk" · line 64
Quoted 10 lines
meta/recipes-devtools/gcc/libgcc_4.6.bb +8
-0INSANE_SKIP_libgcov-dev = "staticdev" +addtask multilib_install after do_install before do_package + + +# this makes multilib gcc files findable for target gcc +# like this directory is made findable +# /usr/lib/i586-pokymllib32-linux/4.6.3/ +# by creating this symlink to it +# /usr/lib64/x86_64-poky-linux/4.6.3/32
This might be one case where moving the files is actually the right thing to do. The "pokymllib32" is an artefact of the way we do multilib builds and likely shouldn't be exposed on the target. I'm not sure how relocatable these files are though.
Quoted 6 lines
meta/recipes-devtools/gcc/libgcc_4.6.bb +6
-0+python do_multilib_install() { + import re + # do this only for multilib extended recipe + if d.getVar('PN', 1) != 'libgcc': + return +
meta/recipes-devtools/gcc/libgcc_4.6.bb BBCLASSEXTEND = "nativesdk" · line 81
Quoted 10 lines
meta/recipes-devtools/gcc/libgcc_4.6.bb +10
-0+ tune_arch = d.getVar('TUNE_ARCH', 1) or '' + defaulttune = d.getVar('DEFAULTTUNE', 1) or '' + multilibs = d.getVar('MULTILIB_VARIANTS', 1) or '' + if multilibs == '': + return + + tunes_32 = ['x86', 'core2', 'i586', 'mips', 'mipsel', 'mips-nf', 'mipsel-nf', 'powerpc', 'powerpc-nf'] + tunes_64 = ['x86-64', 'core2-64', 'mips64', 'mips64el', 'mips64-nf', 'mips64el-nf', 'powerpc64'] + tunes_x32 = ['x86-64-x32', 'core2-64-x32'] + tunes_n32 = ['mips64-n32', 'mips64el-n32', 'mips64-nf-n32', 'mips64el-nf-n32']
Just for reference, duplicating these lists over two files is an extremely bad idea...
I'm hoping we can clean some of this up with the comments in my reply to the other patch too.
Cheers,
Richard