Skip to content

Conversation

@hpckurt
Copy link

@hpckurt hpckurt commented Dec 21, 2024

This PR adds build support for Big Endian PPC32.

As there's currently no conda distribution for PPC32, you have to manually compile and install the static libraries (which is why the target_link_libraries are different for PPC32).

Tested and verified working on the Nintendo Wii U.

@hpckurt
Copy link
Author

hpckurt commented Dec 24, 2024

I could be wrong, but I don't believe the workflow errors are related to my code.

I can build using -D CMAKE_BUILD_TYPE="Release" and it successfully builds. My full build command is:

cmake -B build/ -G Ninja -D CMAKE_INSTALL_PREFIX=/opt/mamba -D CMAKE_BUILD_TYPE="Release" -D BUILD_LIBMAMBA=ON -D BUILD_STATIC=ON -D BUILD_MICROMAMBA=ON -DCMAKE_C_FLAGS="-mcpu=espresso -latomic" -DCMAKE_CXX_FLAGS="-fdiagnostics-color=always -mcpu=espresso -latomic" -DCMAKE_STRIP=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-strip -DCMAKE_CXX_COMPILER=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-g++ -DCMAKE_C_COMPILER=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-gcc -DCMAKE_LINKER=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-ld -DCMAKE_READELF=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-readelf -DCMAKE_RANLIB=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-ranlib -DCMAKE_OBJDUMP=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-objdump -DCMAKE_OBJCOPY=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-objcopy -DCMAKE_NM=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-nm -DCMAKE_AR=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-ar -DCMAKE_C_COMPILER_AR=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-ar -DCMAKE_C_COMPILER_RANLIB=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-ranlib -DCMAKE_CXX_COMPILER_AR=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-ar -DCMAKE_CXX_COMPILER_RANLIB=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-ranlib -DCMAKE_ADDR2LINE=/root/toolchain/x-tools/powerpc-espresso-linux-gnu/bin/powerpc-espresso-linux-gnu-addr2line -Dfmt_DIR=/usr/local/include/fmt -Dspdlog_DIR=/usr/local/include/spdlog -Dtl-expected_DIR=/usr/local/include/tl -Dnlohmann_json_DIR=/usr/local/include/nlohmann -Dyaml-cpp_DIR=/usr/local/include/yaml-cpp -Dreproc_DIR=/usr/local/include/reproc -Dsimdjson_DIR=/usr/local/include  -Dreproc++_DIR=/usr/local/include/reproc++ -DZLIB_ROOT=/opt/zlib -DLibsolv_INCLUDE_DIR=/usr/local/include/solv -DMAMBA_WARNING_AS_ERROR=OFF -DPPC32=ON

You do have to disable MAMBA_WARNING_AS_ERROR for it to build correctly though.

The OS it was tested on is debian ppc, but it's also known to build on adelie linux. It also builds without -mcpu=espresso, but you need -mcpu=espresso for it to run on the Wii U with the SMP kernel.

@JohanMabille JohanMabille added the release::enhancements For enhancements PRs or implementing features label Jan 2, 2025
@jjerphan jjerphan mentioned this pull request Aug 8, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release::enhancements For enhancements PRs or implementing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants