[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Steven Newbury
steve at snewbury.org.uk
Wed Aug 21 23:04:55 PDT 2013
Hi,
I'm working on bringing up complete coverage for a Gentoo x32 "desktop"
system. I've been cooking up quite a few patches for various packages
to push upstream, but right now, the biggest blocker is the lack of
support for building with/codegen targeting x32 in llvm/clang. Since
the x32 patches were sent last year, I see support code has landed in
LLVM, and basic handling of 32-bit pointers in Clang, but no
elf32_x86_64 codegen or support for the -mx32 switch. I've been trying
to get x32 ABI support working in Clang and compiler-rt, I based off the
previous clang patch, bringing it up to date with the changes in trunk,
and hacked together handling of x32 "ARCH" support for compiler-rt.
(there must be a better way??)
Unfortunately, although the build succeeds as far as beginning to build
compiler-rt the resulting clang doesn't seem to respect the fact that
the target is x86_64-pc-linux-gnux32, nor that the "-mx32" opt has been
supplied. Something is clearly missing.
Can somebody please take a look at the patches, and look to see what I'm
missing/where I've gone wrong, or otherwise point me to a working
patchset/repo if I'm duplicating effort.
Patches to follow...
More information about the llvm-dev
mailing list