summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-openstackclient
diff options
context:
space:
mode:
authorAlessandro Di Federico <ale.nix@clearmind.me>2025-10-30 20:19:51 +0100
committerAlessandro Di Federico <ale@rev.ng>2025-12-30 19:05:44 +0100
commite8b384078f32ae8bdf7ded43e035b541d61a8cad (patch)
tree935e89fe3631a095ad2c85571b86981c5b0dfa0c /pkgs/development/python-modules/python-openstackclient
parent2eceab7950edc531fe6a2186442a104f00d6c7e3 (diff)
uclibc-ng: specify architecture in `make defconfig`
This ensures the correct architecture is picked up in the `.config` file. For instance, specifying `ARCH=arm` will correctly set TARGET_ARCH=arm and TARGET_arm=y. This commit has been tested to successfully produce toolchains for: * mipsel-unknown-linux-uclibc (ben-nanonote) * mips-unknown-linux-uclibc * armv7a-unknown-linux-uclibceabihf * armv7a-unknown-linux-uclibceabi Specifically, the following script has been used to test the toolchains: #!/usr/bin/env bash set -euo pipefail function test_toolchain() { TRIPLE="$1" shift EXPRESSION="$1" shift QEMU_ARCH="$1" shift echo "Testing $TRIPLE" > /dev/stderr BUILT_PACKAGE=$(nix-build -E "$EXPRESSION") nix-shell -p "$BUILT_PACKAGE" -p qemu --run ' set -euo pipefail echo "#include <stdio.h>" > program.c echo "int main() { puts(\"Hello!\"); }" >> program.c '"$TRIPLE"'-gcc program.c -o program -static for TO_GREP in '"$(printf "'%s' " "$@")"'; do readelf -h program | grep -F "$TO_GREP" done qemu-'"$QEMU_ARCH"' ./program ' } function test_triple() { TRIPLE="$1" shift QEMU_ARCH="$1" shift test_toolchain "$TRIPLE" '(import ./. { crossSystem = { config = "'"$TRIPLE"'"; }; }).stdenv.cc' "$QEMU_ARCH" "$@" } function test_cross() { TRIPLE="$1" shift CROSS="$1" shift QEMU_ARCH="$1" shift test_toolchain "$TRIPLE" '(import ./. {}).pkgsCross.'"$CROSS"'.stdenv.cc' "$QEMU_ARCH" "$@" } test_cross "mipsel-unknown-linux-uclibc" "ben-nanonote" "mipsel" "little endian" test_triple "mips-unknown-linux-uclibc" "mips" "big endian" test_triple "armv7a-unknown-linux-uclibceabihf" "arm" "little endian" "EABI" "hard-float ABI" test_triple "armv7a-unknown-linux-uclibceabi" "arm" "little endian" "EABI" "soft-float ABI"
Diffstat (limited to 'pkgs/development/python-modules/python-openstackclient')
0 files changed, 0 insertions, 0 deletions