Skip to content

Conversation

tonycoz
Copy link
Contributor

@tonycoz tonycoz commented Jun 9, 2022

I haven't done a full make test on this, my ppc machine is qemu, so it would finish some time next week, but Configure is producing an archname like those discussed in the ticket.

The substitution is a NOP on amd64, there both uname -m and uname -p are "amd64".

Fixes #19791

On FreeBSD C<uname -m> produces "powerpc" for all of 32-bit power pc, 32-powerpc little endian,
64-bit powerpc and 64-bit powerpc little endian, which means we produce the same archname
for all 4 of those incompatible architectures.

To avoid that, if no -Darchname has been supplied, the FreeBSD hints now creates an archname.cbu
to postprocess archname replacing a leading "`uname -m`-" with "`uname -p`-" which does
distinguish between the different architectures.

This change isn't suitable for all non-FreeBSD systems, on Linux at least, C<uname -p> is
"unknown" on my x86_64 machine.

Fixes Perl#19791
@jkeenan
Copy link
Contributor

jkeenan commented Jun 9, 2022

I haven't done a full make test on this, my ppc machine is qemu, so it would finish some time next week, but Configure is producing an archname like those discussed in the ticket.

The substitution is a NOP on amd64, there both uname -m and uname -p are "amd64".

Given that the FreeBSD machines (and VMs) to which I have access are all amd64, am I correct in thinking that I myself would not see any change in output or behavior if this patch were applied?

@tonycoz
Copy link
Contributor Author

tonycoz commented Jun 13, 2022

Given that the FreeBSD machines (and VMs) to which I have access are all amd64, am I correct in thinking that I myself would not see any change in output or behavior if this patch were applied?

That's correct.

I should probably dig up my FreeBSD Pi to check ARM.

@jkeenan
Copy link
Contributor

jkeenan commented Jul 9, 2022

Given that the FreeBSD machines (and VMs) to which I have access are all amd64, am I correct in thinking that I myself would not see any change in output or behavior if this patch were applied?

That's correct.

I should probably dig up my FreeBSD Pi to check ARM.

@tonycoz, were you able to make any progress on this?

@tonycoz
Copy link
Contributor Author

tonycoz commented Jul 9, 2022

Not yet, it might be best to just merge it.

@jkeenan
Copy link
Contributor

jkeenan commented Jul 9, 2022

Not yet, it might be best to just merge it.

Okay, let's hope that smoke-tests, etc., sort it out.

@jkeenan jkeenan merged commit bd0937a into Perl:blead Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perl misdetects architecture on FreeBSD

2 participants