Skip to content

Commit 87f9969

Browse files
committed
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 <[email protected]>
1 parent 5eccf75 commit 87f9969

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

arch/Config.in.powerpc

+10-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ config BR2_POWERPC_CPU_HAS_SPE
99

1010
choice
1111
prompt "Target Architecture Variant"
12-
default BR2_generic_powerpc
12+
default BR2_generic_powerpc if !BR2_ARCH_IS_64
13+
default BR2_generic_powerpc64 if BR2_ARCH_IS_64
14+
default BR2_powerpc_power8 if BR2_powerpc64le
1315
help
1416
Specific CPU variant to use
1517
config BR2_generic_powerpc
16-
bool "generic"
17-
# No C library supports this variant on ppc64le
18+
bool "generic (32 bit)"
19+
depends on !BR2_ARCH_IS_64
20+
config BR2_generic_powerpc64
21+
bool "generic (64 bit)"
22+
depends on BR2_ARCH_IS_64
1823
depends on !BR2_powerpc64le
1924
config BR2_powerpc_401
2025
bool "401"
@@ -218,6 +223,8 @@ config BR2_GCC_TARGET_CPU
218223
default "power6" if BR2_powerpc_power6
219224
default "power7" if BR2_powerpc_power7
220225
default "power8" if BR2_powerpc_power8
226+
default "powerpc64" if BR2_generic_powerpc64
227+
default "powerpc" if BR2_generic_powerpc
221228

222229
config BR2_READELF_ARCH_NAME
223230
default "PowerPC" if BR2_powerpc

0 commit comments

Comments
 (0)