siteinfo: Recognize 64bit PPC LE
PATCH 1/3 siteinfo: Recognize 64bit PPC LE
Signed-off-by Khem Raj <[email protected]>
--- meta/classes/siteinfo.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/siteinfo.bbclass +5 -2
@@ -48,6 +48,7 @@ def siteinfo_data_for_machine(arch, os, d): "powerpc": "endian-big bit-32 powerpc-common", "nios2": "endian-little bit-32 nios2-common", "powerpc64": "endian-big bit-64 powerpc-common", + "powerpc64le": "endian-little bit-64 powerpc-common", "ppc": "endian-big bit-32 powerpc-common", "ppc64": "endian-big bit-64 powerpc-common", "ppc64le" : "endian-little bit-64 powerpc-common",
@@ -106,8 +107,10 @@ def siteinfo_data_for_machine(arch, os, d): "powerpc-linux-muslspe": "powerpc-linux powerpc32-linux", "powerpc64-linux-gnuspe": "powerpc-linux powerpc64-linux", "powerpc64-linux-muslspe": "powerpc-linux powerpc64-linux", - "powerpc64-linux": "powerpc-linux", - "powerpc64-linux-musl": "powerpc-linux", + "powerpc64-linux": "powerpc-linux powerpc64-linux", + "powerpc64-linux-musl": "powerpc-linux powerpc64-linux", + "powerpc64le-linux": "powerpc-linux powerpc64-linux", + "powerpc64le-linux-musl": "powerpc-linux powerpc64-linux", "riscv32-linux": "riscv32-linux", "riscv32-linux-musl": "riscv32-linux", "riscv64-linux": "riscv64-linux",
Signature · 1 line
2.24.1
PATCH 2/3 powerpc, powerpc64: Append little-endianness to tune arch
This helps in constructing right arch for target tuple name for Little-endian ppc
Signed-off-by Khem Raj <[email protected]>
--- meta/conf/machine/include/powerpc/arch-powerpc.inc | 3 ++- meta/conf/machine/include/powerpc/arch-powerpc64.inc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
meta/conf/machine/include/powerpc/arch-powerpc.inc +2 -1
@@ -15,7 +15,8 @@ TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endia 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)}" +TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', 'powerpc${ENDIAN_SFX}', '', d)}" +ENDIAN_SFX = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'le', d)}" TUNEVALID[fpu-hard] = "Use hardware FPU." TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', ' -mhard-float', '', d)}"
meta/conf/machine/include/powerpc/arch-powerpc64.inc +1 -1
@@ -5,7 +5,7 @@ require conf/machine/include/powerpc/arch-powerpc.inc TUNEVALID[m64] = "Power ELF64 standard ABI" TUNECONFLICTS[m64] = "m32 nf" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', ' -m64', '', d)}" -TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', [ 'm64' ], 'powerpc64', '', d)}" +TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', [ 'm64' ], 'powerpc64${ENDIAN_SFX}', '', d)}" # musl only supports elfv2 ABI for ppc64 TUNE_CCARGS .= "${@['', ' -mabi=elfv2']['libc-musl' in d.getVar('OVERRIDES').split(':')]}"
Signature · 1 line
2.24.1
PATCH 3/3 tune-power9: Add power9 tunings
In reply to Khem RajAdd Little/big Endian, 32bit/64bit
Signed-off-by Khem Raj <[email protected]>
--- meta/conf/machine/include/tune-power9.inc | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 meta/conf/machine/include/tune-power9.inc
meta/conf/machine/include/tune-power9.inc new file +35 -0
@@ -0,0 +1,35 @@ +DEFAULTTUNE ?= "ppc64p9le" + +require conf/machine/include/powerpc/arch-powerpc64.inc + +TUNEVALID[power9] = "Enable IBM Power9 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'power9', ' -mcpu=power9', '', d)}" + +AVAILTUNES += "ppcp9 ppc64p9 ppcp9le ppc64p9le" + +TUNE_FEATURES_tune-ppcp9 = "m32 fpu-hard power9 altivec bigendian" +BASE_LIB_tune-ppcp9 = "lib" +TUNE_PKGARCH_tune-ppcp9 = "ppcp9" +PACKAGE_EXTRA_ARCHS_tune-ppcp9 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppcp9" + +TUNE_FEATURES_tune-ppc64p9 = "m64 fpu-hard power9 altivec bigendian" +BASE_LIB_tune-ppc64p9 = "lib64" +TUNE_PKGARCH_tune-ppc64p9 = "ppc64p9" +PACKAGE_EXTRA_ARCHS_tune-ppc64p9 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p9" + +TUNE_FEATURES_tune-ppcp9le = "m32 fpu-hard power9 altivec" +BASE_LIB_tune-ppcp9le = "lib" +TUNE_PKGARCH_tune-ppcp9le = "ppcp9le" +PACKAGE_EXTRA_ARCHS_tune-ppcp9le = "${PACKAGE_EXTRA_ARCHS_tune-powerpcle} ppcp9le" + +TUNE_FEATURES_tune-ppc64p9le = "m64 fpu-hard power9 altivec" +BASE_LIB_tune-ppc64p9le = "lib64" +TUNE_PKGARCH_tune-ppc64p9le = "ppc64p9le" +PACKAGE_EXTRA_ARCHS_tune-ppc64p9le = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64le} ppc64p9le" + +# glibc configure options to get power9 specific library +GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power9', '--with-cpu=power9', '', d)}" +GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power9', '--with-cpu=power9', '', d)}" + +# QEMU usermode fails with invalid instruction error +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'power9', ' qemu-usermode', '', d)}"
Signature · 1 line
2.24.1