Steven Newbury
2013-Aug-22 07:23 UTC
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
On Wed, 2013-08-21 at 23:59 -0700, Dmitri Gribenko wrote:> On Wed, Aug 21, 2013 at 11:04 PM, Steven Newbury <steve at snewbury.org.uk> wrote: > > 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??) > > If you are just trying to get basic things working, you don't need to > port compiler-rt immediately. It is still pretty important (for > example, to support features like Address Sanitizer), but not critical > -- you will still get a useable Clang without building compiler-rt. > > Dmitri >Having Clang working would of course be my primary goal, that said, being able to compile compiler-rt is a pretty good test all is working as it should be! :) It's also built/installed as part of the Gentoo llvm ebuild when the clang useflag is enabled, so from that point of view, I need to get it working.
Alexey Samsonov
2013-Aug-22 07:31 UTC
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
On Thu, Aug 22, 2013 at 11:23 AM, Steven Newbury <steve at snewbury.org.uk>wrote:> On Wed, 2013-08-21 at 23:59 -0700, Dmitri Gribenko wrote: > > On Wed, Aug 21, 2013 at 11:04 PM, Steven Newbury <steve at snewbury.org.uk> > wrote: > > > 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??) > > > > If you are just trying to get basic things working, you don't need to > > port compiler-rt immediately. It is still pretty important (for > > example, to support features like Address Sanitizer), but not critical > > -- you will still get a useable Clang without building compiler-rt. > > > > Dmitri > > > > Having Clang working would of course be my primary goal, that said, > being able to compile compiler-rt is a pretty good test all is working > as it should be! :) It's also built/installed as part of the Gentoo > llvm ebuild when the clang useflag is enabled, so from that point of > view, I need to get it working. >I see, but it's not really good to build the libraries that are not expected to work...I think you should instead detect x32 host in the makefiles and avoid buidling compiler-rt libraries in that case.> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Alexey Samsonov, MSK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130822/6eca734b/attachment.html>
Dmitri Gribenko
2013-Aug-22 07:34 UTC
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
On Thu, Aug 22, 2013 at 12:23 AM, Steven Newbury <steve at snewbury.org.uk> wrote:> Having Clang working would of course be my primary goal, that said, > being able to compile compiler-rt is a pretty good test all is working > as it should be! :) It's also built/installed as part of the Gentoo > llvm ebuild when the clang useflag is enabled, so from that point of > view, I need to get it working.Note that compiler-rt contains arch/type-size dependent code, so it might need porting in addition to build system changes. Dmitri -- main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
Steven Newbury
2013-Aug-22 07:44 UTC
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
On Thu, 2013-08-22 at 00:34 -0700, Dmitri Gribenko wrote:> On Thu, Aug 22, 2013 at 12:23 AM, Steven Newbury <steve at snewbury.org.uk> wrote: > > Having Clang working would of course be my primary goal, that said, > > being able to compile compiler-rt is a pretty good test all is working > > as it should be! :) It's also built/installed as part of the Gentoo > > llvm ebuild when the clang useflag is enabled, so from that point of > > view, I need to get it working. > > Note that compiler-rt contains arch/type-size dependent code, so it > might need porting in addition to build system changes. >I figured this would be the case, but decided to post my build system changes as is. My plan was/is to look into making the compiler-rt code work after failing to build it! :-) Generally type-size errors get detected with at least a warning, although that's admittedly pretty lazy porting on my part, there was just no way I could read through that much code in the last few days without trying to get something working first! ;-)
Steven Newbury
2013-Aug-22 07:48 UTC
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
On Thu, 2013-08-22 at 11:31 +0400, Alexey Samsonov wrote:> On Thu, Aug 22, 2013 at 11:23 AM, Steven Newbury <steve at snewbury.org.uk>wrote: > > > On Wed, 2013-08-21 at 23:59 -0700, Dmitri Gribenko wrote: > > > On Wed, Aug 21, 2013 at 11:04 PM, Steven Newbury <steve at snewbury.org.uk> > > wrote: > > > > 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??) > > > > > > If you are just trying to get basic things working, you don't need to > > > port compiler-rt immediately. It is still pretty important (for > > > example, to support features like Address Sanitizer), but not critical > > > -- you will still get a useable Clang without building compiler-rt. > > > > > > Dmitri > > > > > > > Having Clang working would of course be my primary goal, that said, > > being able to compile compiler-rt is a pretty good test all is working > > as it should be! :) It's also built/installed as part of the Gentoo > > llvm ebuild when the clang useflag is enabled, so from that point of > > view, I need to get it working. > > > > I see, but it's not really good to build the libraries that are not > expected to work...I think you > should instead detect x32 host in the makefiles and avoid buidling > compiler-rt libraries in that case. >Certainly, if I can get to the point of a working Clang, but I find the libraries are beyond my current ability to port, it might well be worth making available what does work. But right now this is only building on my local chroot, with the intention of then pushing it to my experimental x32 portage overlay once I have something worth testing.
Apparently Analagous Threads
- [LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
- [LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
- [LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
- [LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (compiler-rt patch)
- [LLVMdev] [NEW PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)