Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: open-power/buildroot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: shenki/buildroot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: arch-powerpc
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 9 commits
  • 5 files changed
  • 1 contributor

Commits on Jul 28, 2022

  1. arch/powerpc: Clarify generic CPUs

    In the case where a specific CPU is not selected, set an appropriate
    gcc target for the architecture.
    
    For clarity this introduces a BR2_generic_powerpc64 as a generic 64 bit
    CPU as this makes the it clearer when browsing menuconfig.
    
    There's no such thing as a generic ppc64le CPU. Attempting to configure
    glibc for powerpc64le fails:
    
     configure: error: ***  POWER8 or newer is required on powerpc64le.
     __builtin_signbit is broken.  GCC 7.4 or newer is required to resolve
     (PR83862). The compiler must support -mabi=ieeelongdouble and
     -mlong-double-128 simultaneously.
    
    Hence set Power8 as the default CPU when using ppc64le.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    87f9969 View commit details
  2. arch/powerpc: Hide SPE ABI behind CPU type

    The target ABI option for PowerPC is for selecting the SPE ABI, not the
    ELF ABI that users may expect.
    
    Hide it when there is no option available to make it clearer when
    browsing menuconfig.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    766ef3b View commit details
  3. arch/powerpc: Enable powerpc64le only on CPUs that support it

    Invalid configurations lead to build failures, such as trying to enable
    ppc64le for the ppc970:
    
      http://autobuild.buildroot.net/results/fda886768fce25ccd9b52b635ff5b13da7ba2d0c/
    
    In order to run a ppc64le userspace a kernel that runs in this mode is
    required. The only CPU supported in buildroot that can boot a ppc64le
    kernel is Power8, so mark all of the other 64-bit capable CPUs as not
    supporting ppc64le.
    
    This drops the comment about libc, which is true but doesn't tell the
    whole story.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    bfc236c View commit details
  4. package/glibc: Use powerpc64le instead of power8

    With "arch/powerpc: Enable powerpc64le only on CPUs that support it"
    we can use this symbol to indicate the CPU is supported by glibc.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    3ecbfc2 View commit details
  5. arch/powerpc: Add Power9 CPU type

    The Power9 CPU was released by IBM in 2016. It is a 64-bit CPU
    implementing ISA v3.0. It runs in big and little endian modes, and
    supports VSX and AltiVec.
    
    Power9 is supported as of GCC 6.1 and Binutils 2.26.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    9f591c2 View commit details
  6. arch/powerpc: Add Power10 CPU type

    The Power10 CPU was released by IBM in 2021. It is a 64-bit CPU
    implementing ISA v3.1. It runs in big and little endian modes, and
    supports VSX and AltiVec.
    
    It introduces prefix (8 byte) instructions along side the existing 4
    byte instructions, and new SIMD MMA instructions.
    
    Power10 is supported as of GCC 10 and Binutils 2.35.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    3e8ee2b View commit details
  7. package/mesa3d: Remove force disable of power8

    With "arch/powerpc: Enable powerpc64le only on CPUs that support it"
    buildroot will no longer build a toolchain that has broken VMX support.
    
    Remove the special casing so the build system can do feature detection.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    2fdd519 View commit details
  8. package/zlib-ng: Revert Power8 special casing

    With "arch/powerpc: Enable powerpc64le only on CPUs that support it"
    buildroot will no longer build a toolchain that breaks feature
    detection.
    
    Remove the special casing so the build system can do feature detection.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    76c1530 View commit details
  9. package/openblas: Add Power9 and Power10 targets

    Now that buildroot supports these CPUs set the target type.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki committed Jul 28, 2022
    Copy the full SHA
    5bded6e View commit details
Showing with 37 additions and 16 deletions.
  1. +33 −7 arch/Config.in.powerpc
  2. +1 −1 package/glibc/Config.in
  3. +1 −2 package/mesa3d/mesa3d.mk
  4. +2 −0 package/openblas/Config.in
  5. +0 −6 package/zlib-ng/zlib-ng.mk
40 changes: 33 additions & 7 deletions arch/Config.in.powerpc
Original file line number Diff line number Diff line change
@@ -9,12 +9,17 @@ config BR2_POWERPC_CPU_HAS_SPE

choice
prompt "Target Architecture Variant"
default BR2_generic_powerpc
default BR2_generic_powerpc if !BR2_ARCH_IS_64
default BR2_generic_powerpc64 if BR2_ARCH_IS_64
default BR2_powerpc_power8 if BR2_powerpc64le
help
Specific CPU variant to use
config BR2_generic_powerpc
bool "generic"
# No C library supports this variant on ppc64le
bool "generic (32 bit)"
depends on !BR2_ARCH_IS_64
config BR2_generic_powerpc64
bool "generic (64 bit)"
depends on BR2_ARCH_IS_64
depends on !BR2_powerpc64le
config BR2_powerpc_401
bool "401"
@@ -66,11 +71,9 @@ config BR2_powerpc_604e
depends on !BR2_ARCH_IS_64
config BR2_powerpc_620
bool "620"
# No C library supports this variant on ppc64le
depends on !BR2_powerpc64le
config BR2_powerpc_630
bool "630"
# No C library supports this variant on ppc64le
depends on !BR2_powerpc64le
config BR2_powerpc_740
bool "740"
@@ -97,6 +100,7 @@ config BR2_powerpc_860
depends on !BR2_ARCH_IS_64
config BR2_powerpc_970
bool "970"
depends on !BR2_powerpc64le
select BR2_POWERPC_CPU_HAS_ALTIVEC
config BR2_powerpc_8540
bool "8540 / e500v1"
@@ -124,25 +128,42 @@ config BR2_powerpc_e6500
select BR2_POWERPC_CPU_HAS_ALTIVEC
config BR2_powerpc_power4
bool "power4"
# No C library supports this variant on ppc64le
depends on !BR2_powerpc64le
config BR2_powerpc_power5
bool "power5"
# No C library supports this variant on ppc64le
depends on !BR2_powerpc64le
depends on BR2_ARCH_IS_64
config BR2_powerpc_power6
bool "power6"
depends on !BR2_powerpc64le
depends on BR2_ARCH_IS_64
select BR2_POWERPC_CPU_HAS_ALTIVEC
config BR2_powerpc_power7
bool "power7"
depends on !BR2_powerpc64le
depends on BR2_ARCH_IS_64
select BR2_POWERPC_CPU_HAS_ALTIVEC
select BR2_POWERPC_CPU_HAS_VSX
config BR2_powerpc_power8
bool "power8"
depends on BR2_ARCH_IS_64
select BR2_POWERPC_CPU_HAS_ALTIVEC
select BR2_POWERPC_CPU_HAS_VSX
config BR2_powerpc_power9
bool "power9"
depends on BR2_ARCH_IS_64
select BR2_POWERPC_CPU_HAS_ALTIVEC
select BR2_POWERPC_CPU_HAS_VSX
select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
config BR2_powerpc_power10
bool "power10"
depends on BR2_ARCH_IS_64
select BR2_POWERPC_CPU_HAS_ALTIVEC
select BR2_POWERPC_CPU_HAS_VSX
select BR2_ARCH_NEEDS_GCC_AT_LEAST_10
endchoice

if BR2_POWERPC_CPU_HAS_SPE
choice
prompt "Target ABI"
default BR2_powerpc_SPE if BR2_POWERPC_CPU_HAS_SPE
@@ -157,6 +178,7 @@ config BR2_powerpc_SPE
bool "SPE"
depends on BR2_POWERPC_CPU_HAS_SPE
endchoice
endif

config BR2_POWERPC_SOFT_FLOAT
bool "Use soft-float"
@@ -218,6 +240,10 @@ config BR2_GCC_TARGET_CPU
default "power6" if BR2_powerpc_power6
default "power7" if BR2_powerpc_power7
default "power8" if BR2_powerpc_power8
default "power9" if BR2_powerpc_power9
default "power10" if BR2_powerpc_power10
default "powerpc64" if BR2_generic_powerpc64
default "powerpc" if BR2_generic_powerpc

config BR2_READELF_ARCH_NAME
default "PowerPC" if BR2_powerpc
2 changes: 1 addition & 1 deletion package/glibc/Config.in
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ config BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
default y if BR2_or1k
default y if BR2_powerpc
default y if BR2_powerpc64
default y if BR2_powerpc_power8
default y if BR2_powerpc64le
default y if BR2_riscv
default y if BR2_s390x
default y if BR2_sh
3 changes: 1 addition & 2 deletions package/mesa3d/mesa3d.mk
Original file line number Diff line number Diff line change
@@ -26,8 +26,7 @@ MESA3D_DEPENDENCIES = \
zlib

MESA3D_CONF_OPTS = \
-Dgallium-omx=disabled \
-Dpower8=disabled
-Dgallium-omx=disabled

# Codesourcery ARM 2014.05 fail to link libmesa_dri_drivers.so with --as-needed linker
# flag due to a linker bug between binutils 2.24 and 2.25 (2.24.51.20140217).
2 changes: 2 additions & 0 deletions package/openblas/Config.in
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@ config BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET
default "POWER6" if BR2_powerpc_power6
default "POWER7" if BR2_powerpc_power7
default "POWER8" if BR2_powerpc_power8
default "POWER9" if BR2_powerpc_power9
default "POWER10" if BR2_powerpc_power10
default "PPCG4" if BR2_powerpc_7400 || BR2_powerpc_7450
default "PPC970" if BR2_powerpc_970
default "PPC440" if BR2_powerpc_440
6 changes: 0 additions & 6 deletions package/zlib-ng/zlib-ng.mk
Original file line number Diff line number Diff line change
@@ -23,10 +23,4 @@ ifeq ($(BR2_arm),y)
ZLIB_NG_CONF_OPTS += -DWITH_ACLE=1 -DWITH_NEON=1
endif

ifeq ($(BR2_powerpc_power8),y)
ZLIB_NG_CONF_OPTS += -DWITH_POWER8=ON
else
ZLIB_NG_CONF_OPTS += -DWITH_POWER8=OFF
endif

$(eval $(cmake-package))