Skip to content

Commit

Permalink
Merge pull request ziglang#20934 from alexrp/sparc32-leon3
Browse files Browse the repository at this point in the history
`std.Target`: Bump baseline CPU for sparc32 to v9; add `sparcv9-linux-gnu` to `process_headers.zig`
  • Loading branch information
andrewrk authored Aug 5, 2024
2 parents 388248a + 27775f1 commit fab5df4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/std/Target.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ pub const Cpu = struct {
.x86 => &x86.cpu.pentium4,
.nvptx, .nvptx64 => &nvptx.cpu.sm_20,
.s390x => &s390x.cpu.arch8,
.sparc => &sparc.cpu.v8,
.sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
.loongarch64 => &loongarch.cpu.loongarch64,

else => generic(arch),
Expand Down
11 changes: 5 additions & 6 deletions tools/process_headers.zig
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,11 @@ const glibc_targets = [_]LibCTarget{
.arch = MultiArch{ .specific = Arch.s390x },
.abi = MultiAbi{ .specific = Abi.gnu },
},
// It's unclear which zig target this glibc sparcv9 target maps to.
//LibCTarget{
// .name = "sparcv9-linux-gnu",
// .arch = MultiArch{ .specific = Arch.sparc },
// .abi = MultiAbi{ .specific = Abi.gnu },
//},
LibCTarget{
.name = "sparcv9-linux-gnu",
.arch = MultiArch{ .specific = Arch.sparc },
.abi = MultiAbi{ .specific = Abi.gnu },
},
LibCTarget{
.name = "sparc64-linux-gnu",
.arch = MultiArch{ .specific = Arch.sparc64 },
Expand Down

0 comments on commit fab5df4

Please sign in to comment.