Skip to content

gnu-config broke powerpc64-unknown-linux-elfvN config parsing #115312

@r-burns

Description

@r-burns

Describe the bug
f22e410 broke parsing of powerpc64 abi-specific configs powerpc64-unknown-linux-elfv1 and powerpc64-unknown-linux-elfv2. Previously these ad hoc ELF ABI specifiers passed through fine. Since https://git.savannah.gnu.org/cgit/config.git/commit/?id=5e531d391852a54e7fab2d8ff55625fca514b305 (cc @Ericson2314) they error with:

checking host system type... Invalid configuration `powerpc64-unknown-linux-elfv2': Kernel `linux' not known to work with OS `elfv2'.
configure: error: /nix/store/f7jzmxq9bpbxsg69cszx56mw14n115n5-bash-4.4-p23/bin/bash /build/build/../glibc-2.32/scripts/config.sub powerpc64-unknown-linux-elfv2 failed

(https://hydra.nixos.org/build/137824567)

It's possible this only worked due to gnu-config being permissive with its parsing. The -elfv2 abi suffix is just a convention I came up with for powerpc64 weirdness, so I'm open to changing the way this is specified, if there is a more established convention for this.

To Reproduce
nix-build . --arg crossSystem '{ config = "powerpc64-unknown-linux-elfv2"; }' -A stdenv.cc.libc

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken0.kind: regressionSomething that worked before working no longer6.topic: cross-compilationBuilding packages on a different platform than they will be used on6.topic: exoticExotic hardware or software platform
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions