Some low-priority fixes to the build system.... These can probably wait after 2.2 1) The current configure script checks for gcc 3.x or later by parsing "gcc --version" output and trying to tokenize it to find the major compiler version. This is pretty fragile and interacts poorly with compilers produced by vendors (like Apple) that modify this string to output target triple (including potentially i686 and darwin9), FSF GCC version, Apple local version. There's lots of numbers there, and the sed expression doesn't find any of the right ones. This patch turns the check into a compile-time check for __GNUC__ version. Since autoconf already does this to determine if you're using GCC or not, it should be pretty safe. Believe it or not, I dusted off a copy of gcc 2.95.2 for Mac OS X for PowerPC and ran it under Rosetta to verify this fix: [ssen at virgon]$ gcc-2.95.2 -v Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs Apple Computer, Inc. version gcc-926, based on gcc version 2.95.2 19991024 (release) [ssen at virgon]$ ./configure CC=gcc-2.95.2 CXX=g++-2.95.2 ... checking for llvm-gcc... no checking for llvm-g++... no checking tool compatibility... configure: error: gcc 3.x required, but you have a lower version 2) Makefile.rules is missing some dependencies for shared library targets, which means if you change core libraries and do a rebuild, things like tools/lto don't get relinked against the new libraries. Test case is to have a pre-built tree and do "touch lib/System/Unix/ Program.inc && make" and make sure you see "Linking Debug Loadable Module LLVMlto.dylib". 3) There appears to be a typo for for llvm_cv_no_link_all_option for Darwin, but this never seems to be used anyway. Probably worth fixing in case a new standalone project uses the LLVM makefiles. I regenerated the configure script with the required versions of autotools on Mac OS X on Intel. Shantonu Sen ssen at apple.com Sent from my Mac Pro -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080205/f60f23b5/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-makefile-and-configure.patch Type: application/octet-stream Size: 3937 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080205/f60f23b5/attachment.obj> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080205/f60f23b5/attachment-0001.html>
Tanya Lattner
2008-Feb-05 18:34 UTC
[LLVMdev] Makefile dependencies and configure test fix
Shantonu, I just wanted to verify that you used the llvm/autoconf/AutoRegen.sh script to regenerate configure. Is that correct? Thanks, Tanya On Feb 5, 2008, at 10:10 AM, Shantonu Sen wrote:> Some low-priority fixes to the build system.... These can probably > wait after 2.2 > > 1) The current configure script checks for gcc 3.x or later by > parsing "gcc --version" output and trying to tokenize it to find > the major compiler version. This is pretty fragile and interacts > poorly with compilers produced by vendors (like Apple) that modify > this string to output target triple (including potentially i686 and > darwin9), FSF GCC version, Apple local version. There's lots of > numbers there, and the sed expression doesn't find any of the right > ones. This patch turns the check into a compile-time check for > __GNUC__ version. Since autoconf already does this to determine if > you're using GCC or not, it should be pretty safe. > > Believe it or not, I dusted off a copy of gcc 2.95.2 for Mac OS X > for PowerPC and ran it under Rosetta to verify this fix: > > [ssen at virgon]$ gcc-2.95.2 -v > Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs > Apple Computer, Inc. version gcc-926, based on gcc version 2.95.2 > 19991024 (release) > [ssen at virgon]$ ./configure CC=gcc-2.95.2 CXX=g++-2.95.2 > ... > checking for llvm-gcc... no > checking for llvm-g++... no > checking tool compatibility... configure: error: gcc 3.x required, > but you have a lower version > > 2) Makefile.rules is missing some dependencies for shared library > targets, which means if you change core libraries and do a rebuild, > things like tools/lto don't get relinked against the new libraries. > Test case is to have a pre-built tree and do "touch lib/System/Unix/ > Program.inc && make" and make sure you see "Linking Debug Loadable > Module LLVMlto.dylib". > > 3) There appears to be a typo for for llvm_cv_no_link_all_option > for Darwin, but this never seems to be used anyway. Probably worth > fixing in case a new standalone project uses the LLVM makefiles. > > I regenerated the configure script with the required versions of > autotools on Mac OS X on Intel. > > <llvm-makefile-and-configure.patch> > > Shantonu Sen > ssen at apple.com > > Sent from my Mac Pro > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080205/33601a49/attachment.html>
Yes, I did, the the required versions of autoconf, automake, and libtool in a directory at the front of my PATH. Shantonu Sen ssen at apple.com Sent from my Mac Pro On Feb 5, 2008, at 10:34 AM, Tanya Lattner wrote:> Shantonu, > > I just wanted to verify that you used the llvm/autoconf/AutoRegen.sh > script to regenerate configure. Is that correct? > > Thanks, > Tanya > > On Feb 5, 2008, at 10:10 AM, Shantonu Sen wrote: > >> Some low-priority fixes to the build system.... These can probably >> wait after 2.2 >> >> 1) The current configure script checks for gcc 3.x or later by >> parsing "gcc --version" output and trying to tokenize it to find >> the major compiler version. This is pretty fragile and interacts >> poorly with compilers produced by vendors (like Apple) that modify >> this string to output target triple (including potentially i686 and >> darwin9), FSF GCC version, Apple local version. There's lots of >> numbers there, and the sed expression doesn't find any of the right >> ones. This patch turns the check into a compile-time check for >> __GNUC__ version. Since autoconf already does this to determine if >> you're using GCC or not, it should be pretty safe. >> >> Believe it or not, I dusted off a copy of gcc 2.95.2 for Mac OS X >> for PowerPC and ran it under Rosetta to verify this fix: >> >> [ssen at virgon]$ gcc-2.95.2 -v >> Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs >> Apple Computer, Inc. version gcc-926, based on gcc version 2.95.2 >> 19991024 (release) >> [ssen at virgon]$ ./configure CC=gcc-2.95.2 CXX=g++-2.95.2 >> ... >> checking for llvm-gcc... no >> checking for llvm-g++... no >> checking tool compatibility... configure: error: gcc 3.x required, >> but you have a lower version >> >> 2) Makefile.rules is missing some dependencies for shared library >> targets, which means if you change core libraries and do a rebuild, >> things like tools/lto don't get relinked against the new libraries. >> Test case is to have a pre-built tree and do "touch lib/System/Unix/ >> Program.inc && make" and make sure you see "Linking Debug Loadable >> Module LLVMlto.dylib". >> >> 3) There appears to be a typo for for llvm_cv_no_link_all_option >> for Darwin, but this never seems to be used anyway. Probably worth >> fixing in case a new standalone project uses the LLVM makefiles. >> >> I regenerated the configure script with the required versions of >> autotools on Mac OS X on Intel. >> >> <llvm-makefile-and-configure.patch> >> >> Shantonu Sen >> ssen at apple.com >> >> Sent from my Mac Pro >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080205/e578d485/attachment.html>
Chris Lattner
2008-Feb-05 19:47 UTC
[LLVMdev] Makefile dependencies and configure test fix
On Tue, 5 Feb 2008, Shantonu Sen wrote:> Some low-priority fixes to the build system.... These can probably wait after > 2.2Very nice Shantonu, applied: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080204/057939.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080204/057940.html Thanks! -Chris> 1) The current configure script checks for gcc 3.x or later by parsing "gcc > --version" output and trying to tokenize it to find the major compiler > version. This is pretty fragile and interacts poorly with compilers produced > by vendors (like Apple) that modify this string to output target triple > (including potentially i686 and darwin9), FSF GCC version, Apple local > version. There's lots of numbers there, and the sed expression doesn't find > any of the right ones. This patch turns the check into a compile-time check > for __GNUC__ version. Since autoconf already does this to determine if you're > using GCC or not, it should be pretty safe. > > Believe it or not, I dusted off a copy of gcc 2.95.2 for Mac OS X for PowerPC > and ran it under Rosetta to verify this fix: > > [ssen at virgon]$ gcc-2.95.2 -v > Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs > Apple Computer, Inc. version gcc-926, based on gcc version 2.95.2 19991024 > (release) > [ssen at virgon]$ ./configure CC=gcc-2.95.2 CXX=g++-2.95.2 > ... > checking for llvm-gcc... no > checking for llvm-g++... no > checking tool compatibility... configure: error: gcc 3.x required, but you > have a lower version > > 2) Makefile.rules is missing some dependencies for shared library targets, > which means if you change core libraries and do a rebuild, things like > tools/lto don't get relinked against the new libraries. Test case is to have > a pre-built tree and do "touch lib/System/Unix/Program.inc && make" and make > sure you see "Linking Debug Loadable Module LLVMlto.dylib". > > 3) There appears to be a typo for for llvm_cv_no_link_all_option for Darwin, > but this never seems to be used anyway. Probably worth fixing in case a new > standalone project uses the LLVM makefiles. > > I regenerated the configure script with the required versions of autotools on > Mac OS X on Intel. > > > Shantonu Sen > ssen at apple.com > > Sent from my Mac Pro > > >-Chris -- http://nondot.org/sabre/ http://llvm.org/
Reasonably Related Threads
- [LLVMdev] Makefile dependencies and configure test fix
- [LLVMdev] [llvm-commits] [PATCH] BlocksRuntime updates for Linux
- [LLVMdev] [llvm-commits] [PATCH] BlocksRuntime updates for Linux
- [LLVMdev] [llvm-commits] [PATCH] BlocksRuntime updates for Linux
- [LLVMdev] [llvm-commits] [PATCH] BlocksRuntime updates for Linux