Bill Wendling
2009-Apr-07 18:17 UTC
[LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
On Tue, Apr 7, 2009 at 12:38 AM, Duncan Sands <baldrick at free.fr> wrote:> Hi Bill, > >> We use GNUmakefile to trigger using the build_gcc script. > > thanks for the explanation, but I still don't understand why > it is done this way. Why not just get Apple people to run some > script, rather than trying to have "make" automagically do an > Apple build? >It's more complicated than that. Suffice it to say that we wouldn't be able to get the people who need to use GNUmakefile/build_gcc to change just for our team (it's more than just our team that is required to do this). In truth, they do have this. It's called "xcodebuild". But llvm-gcc is very incompatible with this method of building.>> It's not >> ideal, but it's all we have at the moment. For LLVM, we placed those >> files in a subdirectory. This isn't ideal because of our build >> processes, but was better than the alternative. We would *really* >> prefer not doing the same thing to LLVM-GCC. Because we've been >> building LLVM-GCC with srcdir != objdir for years now, it shouldn't be >> too much of a burden. . . >> >> From what I understand, FSF GCC doesn't recommend building with >> srcdir == objdir. Not that this necessarily means much to us, but >> should indicate that it's not entirely out of the ordinary that we >> require srcdir != objdir for LLVM-GCC. :-) > > Newcomers to llvm-gcc regularly try to build with srcdir == objdir. > Some of them come on irc and ask about why it fails, but probably > most of them just give up on llvm-gcc. >I understand. Believe me, I'm not a big fan of this method of building llvm-gcc either. But I'm not a Makefile guru, so I don't know how to make the two systems of building llvm-gcc compatible. Is there a FAQ entry on this? If not, I'll add one. -bw
Bob Wilson
2009-Apr-07 18:39 UTC
[LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
On Apr 7, 2009, at 11:17 AM, Bill Wendling wrote:> I understand. Believe me, I'm not a big fan of this method of building > llvm-gcc either. But I'm not a Makefile guru, so I don't know how to > make the two systems of building llvm-gcc compatible. Is there a FAQ > entry on this? If not, I'll add one.If we don't know how to fix the problem, maybe we could at least make the failures easier to understand. If someone is trying to build llvm- gcc, they will typically not run "make install" as the first step. The normal GCC makefile has a default target of "all", so a typical GCC build will invoke make with no explicit target or with a target such as "all", "bootstrap", "all-gcc", etc. We could add those targets to the GNUmakefile in a rule that prints a message about building with objdir != srcdir. It looks to me like Apple's build system will always invoke make with an explicit target, so it would be OK to make this new rule be the default target.
Tanya M. Lattner
2009-Apr-07 18:47 UTC
[LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
>>> From what I understand, FSF GCC doesn't recommend building with >>> srcdir == objdir. Not that this necessarily means much to us, but >>> should indicate that it's not entirely out of the ordinary that we >>> require srcdir != objdir for LLVM-GCC. :-) >> >> Newcomers to llvm-gcc regularly try to build with srcdir == objdir. >> Some of them come on irc and ask about why it fails, but probably >> most of them just give up on llvm-gcc. >> > I understand. Believe me, I'm not a big fan of this method of building > llvm-gcc either. But I'm not a Makefile guru, so I don't know how to > make the two systems of building llvm-gcc compatible. Is there a FAQ > entry on this? If not, I'll add one.This is stated in the README.LLVM and people rarely follow the directions in there too. You can't force people to read documentation. Its worth a FAQ entry and also a FAQ entry about following the instructions in README.LLVM exactly. -Tanya
Bill Wendling
2009-Apr-07 19:01 UTC
[LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
On Tue, Apr 7, 2009 at 11:39 AM, Bob Wilson <bob.wilson at apple.com> wrote:> > On Apr 7, 2009, at 11:17 AM, Bill Wendling wrote: >> I understand. Believe me, I'm not a big fan of this method of building >> llvm-gcc either. But I'm not a Makefile guru, so I don't know how to >> make the two systems of building llvm-gcc compatible. Is there a FAQ >> entry on this? If not, I'll add one. > > > If we don't know how to fix the problem, maybe we could at least make > the failures easier to understand. If someone is trying to build llvm- > gcc, they will typically not run "make install" as the first step. > The normal GCC makefile has a default target of "all", so a typical > GCC build will invoke make with no explicit target or with a target > such as "all", "bootstrap", "all-gcc", etc. We could add those > targets to the GNUmakefile in a rule that prints a message about > building with objdir != srcdir. > > It looks to me like Apple's build system will always invoke make with > an explicit target, so it would be OK to make this new rule be the > default target. >Good point. I'll investigate to see if that works. Thanks! -bw
Dale Johannesen
2009-Apr-07 19:07 UTC
[LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
On Apr 7, 2009, at 11:47 AMPDT, Tanya M. Lattner wrote:> >>>> From what I understand, FSF GCC doesn't recommend building with >>>> srcdir == objdir. Not that this necessarily means much to us, but >>>> should indicate that it's not entirely out of the ordinary that we >>>> require srcdir != objdir for LLVM-GCC. :-) >>> >>> Newcomers to llvm-gcc regularly try to build with srcdir == objdir. >>> Some of them come on irc and ask about why it fails, but probably >>> most of them just give up on llvm-gcc.If they can't figure out how to find and read a README file, do we really want them?>> I understand. Believe me, I'm not a big fan of this method of >> building >> llvm-gcc either. But I'm not a Makefile guru, so I don't know how to >> make the two systems of building llvm-gcc compatible. Is there a FAQ >> entry on this? If not, I'll add one. > > This is stated in the README.LLVM and people rarely follow the > directions in there too. You can't force people to read documentation.No you can't, but you need not be sympathetic when they don't. You can't really build gcc without reading at least some of the documentation either. The problem we have is that some people come in expecting the build procedure to be identical to that of gcc, and it isn't. (Calling it llvm-gcc doesn't help, but it's too late now.) Perhaps: % make A make target is required. If you think you know how to build llvm- gcc just because you know how to build gcc, you're wrong. Please read README.LLVM. Did I mention there's a reason I don't do user interfaces? :)
Possibly Parallel Threads
- [LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
- [LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
- [LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
- [LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux
- [LLVMdev] advice on default options for building LLVM-GCC on Ubuntu Linux