-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Description
There are actually two different generally expected encodings of the host tuple and they're subtly different than what some might expect.
For example, 'x86_64-sun-solaris' should probably be x86_64-pc-solaris. The reason for that is that the encoding schemes are actually:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
...
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
https://github.com/gcc-mirror/gcc/blob/master/config.sub
So while 'sparcv9-sun-solaris' is correct because Sun is the (historical) manufacturer of sparc CPUs, 'x86_64-sun-solaris' is not, because the MANUFACTURER here is the manufacturer of the CPU not the operating system. There are special cases for this, for example 'x86_64-apple-darwin', even though Apple doesn't make x86_64 CPUs, but following gcc/clang conventions leads us to x86_64-pc-solaris.
This issue has been assigned to @lzutao via this comment.
Activity
binarycrusader commentedon Mar 14, 2017
/cc @dhduvall
/cc @ebeasant
Mark-Simulacrum commentedon Jun 13, 2017
An interesting discrepancy here is that our target and the LLVM target currently don't match. I'm not sure whether we can/should change anything here for backwards compatibility reasons, though an alias seems fine.
ghost commentedon Feb 25, 2019
Hi, can I take this issue up? Can someone give a hint on how to fix this?
I am a rust beginner, interested in compilers. This would be my first contribution.
varkor commentedon Apr 27, 2019
@Guruhegde: as far as I can tell, you should just be able to add a new line under:
rust/src/tools/build-manifest/src/main.rs
Line 120 in 597f432
containing
"x86_64-pc-solaris",
, and then add a new line under:rust/src/librustc_target/spec/mod.rs
Line 432 in 597f432
containing:
(Sorry for the delay: I only just saw your message.)
tesuji commentedon Jun 12, 2019
@rustbot claim
Rollup merge of rust-lang#61761 - lzutao:target-tuple-solaris, r=varkor
psumbera commentedon Oct 4, 2019
I wonder how it's supposed to work? Only x86_64-sun-solaris continues work for me:
This change make it harder for Mozilla Firefox to decide which target to use...
varkor commentedon Oct 7, 2019
I think we may have to introduce some changes in
src/tools/build-manifest/src/main.rs
to make rustc try to use the alias. I.e.x86_64-pc-solaris
should try to use the targetx86_64-sun-solaris
. I haven't had time to look into what else needs to be changed.varkor commentedon Jan 14, 2020
Closing as a duplicate of #68214.