[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-04-01 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2663247 , @hvdijk wrote: > In D52050#2663205 , @glaubitz wrote: > >> I think, however, we should bump the rest of the paths to 10.2.0 if possible. > > I updated all the Linux tree

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-04-01 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D52050#2663205 , @glaubitz wrote: > I think, however, we should bump the rest of the paths to 10.2.0 if possible. I updated all the Linux trees that were on 4.6.0. The only remaining 4.6.0 trees are for Hurd, which seems to me

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-04-01 Thread Harald van Dijk via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1d463c2a3860: [Driver] Fix architecture triplets and search paths for Linux x32 (authored by hvdijk). Changed prior to commit: https://reviews.llv

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-04-01 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2662656 , @hvdijk wrote: > I have also updated the summary to provide a more complete explanation of the > changes, and hope the revised summary will answer @MaskRay's questions. In D52050#2662648

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-31 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk updated this revision to Diff 334557. hvdijk edited the summary of this revision. hvdijk added a comment. I have also updated the summary to provide a more complete explanation of the changes, and hope the revised summary will answer @MaskRay's questions. Repository: rG LLVM Github Mon

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-31 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D52050#2662570 , @glaubitz wrote: > Since I am a big fan of consistency, I would rather leave it as is (4.6) and > then bump to 10.2.0 in a follow-up commit. You are right that including the bump in this commit would either for

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-31 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2110 + static const char *const X32Triples[] = {"x86_64-linux-gnux32", + "x86_64-unknown-linux-gnux32", + "x86_64-p

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-31 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2662440 , @hvdijk wrote: > In D52050#2662372 , @MaskRay wrote: > >> Mostly looks good. >> >>> `clang/test/Driver/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-31 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D52050#2662372 , @MaskRay wrote: > Mostly looks good. > >> `clang/test/Driver/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/x32/crtbegin.o` > > Worth bumping the version. 4.6 is quite old and as a host

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-31 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Mostly looks good. > `clang/test/Driver/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/x32/crtbegin.o` Worth bumping the version. 4.6 is quite old and as a host compiler llvm-project has stopped supporting it. The distributions having 4.6 are a

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-31 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk updated this revision to Diff 334505. hvdijk retitled this revision from "WIP: [Driver] Fix architecture triplets and search paths for Linux x32" to "[Driver] Fix architecture triplets and search paths for Linux x32". hvdijk added a comment. Tests now updated differently, avoiding the nee

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-30 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added inline comments. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:90 return "x86_64-linux-android"; -// We don't want this for x32, otherwise it will match x86_64 libs -if (TargetEnvironment != llvm::Triple::GNUX32 && -D.getVFS().exists(SysR

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2091 + static const char *const X32Triples[] = { + "x86_64-linux-gnux32","x86_64-unknown-linux-gnux32", + "x86_64-pc-linux-gnux32"}; Just add `x86_64-linux-gnux32`. It i

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-03-23 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. Hmm, there recently were quite some changes in the MultiArch and GCC search path functionality in the Driver and I can unfortunately no longer get it to work on x32. I had a relatively simple approach but I cannot get it to add the path for the crt.o objects and so on

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-02-20 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2576679 , @alsoijw wrote: > In D52050#2369838 , @dschuff wrote: > >> One other question then: do you know if Debian and/or Ubuntu still have the >> same support for running x32 p

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-02-20 Thread alsoijw via Phabricator via cfe-commits
alsoijw added a comment. In D52050#2369838 , @dschuff wrote: > One other question then: do you know if Debian and/or Ubuntu still have the > same support for running x32 programs on the regular x86-64 distribution? I am not sure that I right understand r

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2021-01-04 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2468424 , @jrtc27 wrote: >> However, that's not the same as whether we're on an x86_64 system or on an >> x32 system determines which GNU triplet to use and which include and library >> search paths are our primary one

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-22 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D52050#2466874 , @glaubitz wrote: > In D52050#2441164 , @glaubitz wrote: > >> In D52050#2441141 , @jrtc27 wrote: >> >>> What gets done currently fo

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-22 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D52050#2466874 , @glaubitz wrote: > However, that's not the same as whether we're on an x86_64 system or on an > x32 system determines which GNU triplet to use and which include and library > search paths are our primary ones.

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-21 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2441164 , @glaubitz wrote: > In D52050#2441141 , @jrtc27 wrote: > >> What gets done currently for i386? That suffers potentially the same problem >> given both /usr/lib/gcc/x86_6

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-08 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2441141 , @jrtc27 wrote: > What gets done currently for i386? That suffers potentially the same problem > given both /usr/lib/gcc/x86_64-linux-gnu/$V/32 and > /usr/lib/gcc/i386-linux-gnu/$V are possible locations for a

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-08 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. i.e. can we not just support both approaches and prefer x86_64-linux-gnux32 if it exists? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52050/new/ https://reviews.llvm.org/D52050 ___

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-08 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D52050#2441133 , @glaubitz wrote: > In D52050#2441094 , @hvdijk wrote: > >> I've been able to check what Ubuntu 20.10 offers in terms of x32 support. >> Its kernel supports x32 binaries,

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-08 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2441094 , @hvdijk wrote: > I've been able to check what Ubuntu 20.10 offers in terms of x32 support. Its > kernel supports x32 binaries, it provides x32 versions of core system > libraries in separate packages (e.g. li

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-08 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. I've been able to check what Ubuntu 20.10 offers in terms of x32 support. Its kernel supports x32 binaries, it provides x32 versions of core system libraries in separate packages (e.g. libc6-x32, libx32stdc++6, libx32z1), and it provides a compiler that targets x32 by de

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D52050#2428743 , @hvdijk wrote: > In D52050#2428735 , @glaubitz wrote: > >> Hmm, I was pretty sure that autoconf can deal with x32 inside an x32 chroot. > > Most autoconf-using software wo

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2428743 , @hvdijk wrote: > In D52050#2428735 , @glaubitz wrote: > >> Hmm, I was pretty sure that autoconf can deal with x32 inside an x32 chroot. > > Most autoconf-using software

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D52050#2428735 , @glaubitz wrote: > Hmm, I was pretty sure that autoconf can deal with x32 inside an x32 chroot. Most autoconf-using software won't be dealing with a copy of `config.guess` that was last updated in 2011. Updatin

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2428709 , @hvdijk wrote: > `sys::getDefaultTargetTriple()` defaults to `LLVM_DEFAULT_TARGET_TRIPLE`, > which in turn defaults to `LLVM_HOST_TRIPLE`, which in turn defaults to > `LLVM_INFERRED_HOST_TRIPLE`, which calls

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. The problem seems to be that `LLVM_HOST_TRIPLE:STRING` is set to `x86_64-unknown-linux-gnu` instead of ``x86_64-unknown-linux-gnux32`. I haven't found the place to fix that yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D52050#2428693 , @glaubitz wrote: > Maybe `sys::getDefaultTargetTriple()` needs to be adjusted. I'll have a look. `sys::getDefaultTargetTriple()` defaults to `LLVM_DEFAULT_TARGET_TRIPLE`, which in turn defaults to `LLVM_HOST_TR

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2428685 , @glaubitz wrote: > I have not found the place yet in clang where to adjust that. Maybe `sys::getDefaultTargetTriple()` needs to be adjusted. I'll have a look. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2428590 , @hvdijk wrote: > That sounds like it's one thing in > https://lists.llvm.org/pipermail/llvm-dev/2020-October/146049.html I haven't > extracted into a separate patch for submission yet: LLVM does not call > `

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D52050#2428560 , @glaubitz wrote: > Any idea how it could make clang default to `-mx32` if this condition is met: > `getToolChain().getTriple().getEnvironment() == llvm::Triple::GNUX32`? That sounds like it's one thing in http

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. I stumbled over one problem with my patch which is that when I run an x32 version of clang in a x32 environment, it will still default to "-m64" instead of "-mx32". Thus: glaubitz@epyc:..llvm-project/build> ./bin/clang hello.c -o hello /usr/bin/ld: cannot find crt

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-12-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. Just as a heads-up, I haven't forgotten about this. Freeing up the server just takes a little longer as I need to backup files through a DSL line. Should be ready by tomorrow. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-30 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2423144 , @RKSimon wrote: > Were you able to compare against GCC and also determine debian/ubuntu's > x86_64 current support for x32 executables? Not yet. Currently freeing up space on my VM host so I can perform a fre

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-30 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. In D52050#2369856 , @glaubitz wrote: > In D52050#2369838 , @dschuff wrote: > >> One other question then: do you know if Debian and/or Ubuntu still have the >> same support for running x32 p

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-26 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D52050#2415723 , @glaubitz wrote: > Yeah, @hvdijk has made multiple other improvements which should finally allow > the backend to be usable. > > We still disagree on the search paths for libraries and headers though if I > rem

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-26 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Do we have any buildbot coverage for gnux32? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52050/new/ https://reviews.llvm.org/D52050 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-25 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. Yeah, @hvdijk has made multiple other improvements which should finally allow the backend to be usable. We still disagree on the search paths for libraries and headers though if I remember correctly. My goal is to make LLVM and Rust work on an full Debian x32 system w

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-25 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added subscribers: hvdijk, RKSimon. RKSimon added a reviewer: hvdijk. RKSimon added a comment. Adding @hvdijk as IIRC has been looking at gnux32 as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52050/new/ https://reviews.llvm.org/D5205

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2369838 , @dschuff wrote: > One other question then: do you know if Debian and/or Ubuntu still have the > same support for running x32 programs on the regular x86-64 distribution? > (presumably yes, since you aren't ch

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-02 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. One other question then: do you know if Debian and/or Ubuntu still have the same support for running x32 programs on the regular x86-64 distribution? (presumably yes, since you aren't changing the existing behavior). AFAIK clang's current support was developed against Ub

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz updated this revision to Diff 302404. glaubitz added a comment. Regenerated with more context (using git format-patch -W). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52050/new/ https://reviews.llvm.org/D52050 Files: clang/lib/Driver/

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-02 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D52050#2369581 , @dschuff wrote: > Can you upload the diff with full context (e.g. use `diff -U ` or use > arcanist to upload)? > > I'm a bit confused; the commit message talks about X32 being a separate > architecture, b

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-02 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added a comment. Can you upload the diff with full context (e.g. use `diff -U ` or use arcanist to upload)? I'm a bit confused; the commit message talks about X32 being a separate architecture, but you're not adding any new architecture triples here (it still uses x86_64 as the arc

[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

2020-11-01 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz updated this revision to Diff 302142. glaubitz retitled this revision from "[Driver] Fix search paths on x32" to "[Driver] Fix architecture triplets and search paths for Linux x32". glaubitz edited the summary of this revision. glaubitz added reviewers: chandlerc, rengolin. glaubitz added