Skip to content

Commit 6590c80

Browse files
committed
Support GCC for PowerPC
`LLVM=1` is not supported by the kernel for PPC, so we disable it (at the moment, it builds, but does not boot). Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 225d455 commit 6590c80

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
arch: [x86_64, arm64]
13+
arch: [x86_64, arm64, ppc64le]
1414
toolchain: [gcc, clang, llvm]
1515
config: [debug, release]
1616
rustc: [2021-02-20]
1717
output: [src] # [src, build]
1818
install: [rustup] # [rustup, standalone]
1919
sysroot: [common] # [common, custom]
2020

21+
# Exclude `LLVM=1` where not supported.
22+
exclude:
23+
- arch: ppc64le
24+
toolchain: llvm
25+
2126
# A few independent combinations to avoid exploding the matrix:
2227
# - The other option for `output`.
2328
# - Different nightlies for `rustc`.
@@ -48,14 +53,6 @@ jobs:
4853
install: standalone
4954
sysroot: custom
5055

51-
- arch: ppc64le
52-
toolchain: clang
53-
config: debug
54-
rustc: 2021-02-20
55-
output: src
56-
install: rustup
57-
sysroot: common
58-
5956
steps:
6057
# Setup: checkout
6158
- uses: actions/checkout@v2

Documentation/rust/arch-support.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ support corresponds to ``S`` values in the ``MAINTAINERS`` file.
2323
- None
2424
* - ``powerpc``
2525
- Maintained
26-
- ``ppc64le`` only, ``RUST_OPT_LEVEL >= 2``, Clang only
26+
- ``ppc64le`` only, ``RUST_OPT_LEVEL >= 2``
2727
* - ``x86``
2828
- Maintained
2929
- ``x86_64`` only

init/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ config LLD_VERSION
5858
default 0
5959

6060
config HAS_RUST
61-
depends on ARM64 || X86_64 || (PPC64 && CPU_LITTLE_ENDIAN && CC_IS_CLANG)
61+
depends on ARM64 || X86_64 || (PPC64 && CPU_LITTLE_ENDIAN)
6262
def_bool $(success,$(RUSTC) --version)
6363

6464
config RUSTC_VERSION

rust/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
5454
-Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized \
5555
-Werror=designated-init -Wno-zero-length-bounds \
5656
--param=% --param asan-%
57+
58+
# PowerPC
59+
bindgen_skip_c_flags += -mtraceback=no -mno-pointers-to-nested-functions \
60+
-mno-string -mno-strict-align
61+
5762
bindgen_extra_c_flags = $(TENTATIVE_CLANG_FLAGS) -Wno-address-of-packed-member
5863
bindgen_c_flags = $(filter-out $(bindgen_skip_c_flags), $(c_flags)) \
5964
$(bindgen_extra_c_flags)

0 commit comments

Comments
 (0)