[llvm-commits] remove libtool from build system

For those of you who haven't noticed, I'm planning to commit a major change to the Makefile rules tomorrow evening (Tuesday) if there are no complaints about it between now and then.

This needs testing on Darwin. I've heard back from Linux on many platforms and even FreeBSD, which is fantastic, but I'm told that lots of LLVMers are running Darwin and I haven't heard a peep from them.

Or from you, if you're running Darwin. Hint hint! :slight_smile:

Nick

Nick Lewycky wrote:

nolibtool2.patch (13.1 KB)

Please hold off until someone who's running Darwin checks this. :slight_smile:

-bw

I think that his (reasonable) message is that someone on darwin should check before he commits it tomorrow :slight_smile:

-Chris

I didn't mean to imply that it wasn't unreasonable. But that we should wait to make sure that someone tests it before then. :slight_smile:

-bw

This needs testing on Darwin. I've heard back from Linux on many
platforms and even FreeBSD, which is fantastic, but I'm told that lots
of LLVMers are running Darwin and I haven't heard a peep from them.

It seems to work fine on a variety of linux systems (mostly debian
variants on x86-32, x86-64, alpha, arm and ppc).

Ciao,

Duncan.

On OS X 10.5.5 I get an error that ld doesn't support -export-dynamic:

dhcp-172-19-103-185:~/src/llvm/trunk_nolibtool/obj jyasskin$
../src/configure --prefix=`pwd`/../install && make VERBOSE=1
...
dhcp-172-19-103-185:~/src/llvm/trunk_nolibtool/obj jyasskin$ make VERBOSE=1
for dir in lib/System lib/Support utils lib/VMCore lib
tools/llvm-config tools docs; do \
    if [ ! -f $dir/Makefile ]; then \
      /Users/jyasskin/src/llvm/trunk_nolibtool/src/autoconf/mkinstalldirs $dir; \
      /opt/local/bin/cp
/Users/jyasskin/src/llvm/trunk_nolibtool/src/$dir/Makefile
$dir/Makefile; \
    fi; \
    (make -C $dir all ) || exit 1; \
  done
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
if [ ! -f TableGen/Makefile ]; then \
    /Users/jyasskin/src/llvm/trunk_nolibtool/src/autoconf/mkinstalldirs
TableGen; \
    /opt/local/bin/cp
/Users/jyasskin/src/llvm/trunk_nolibtool/src/utils/TableGen/Makefile
TableGen/Makefile; \
  fi; \
  make -C TableGen all
llvm[2]: Linking Debug executable tblgen
g++ -I/Users/jyasskin/src/llvm/trunk_nolibtool/obj/include
-I/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen
-I/Users/jyasskin/src/llvm/trunk_nolibtool/src/include
-I/Users/jyasskin/src/llvm/trunk_nolibtool/src/utils/TableGen
-D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
-g -fno-common -Woverloaded-virtual -pedantic -Wall -W
-Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -g
-Wl,--rpath -Wl,/Users/jyasskin/src/llvm/trunk_nolibtool/obj/Debug/bin
-export-dynamic
-L/Users/jyasskin/src/llvm/trunk_nolibtool/obj/Debug/lib
-L/Users/jyasskin/src/llvm/trunk_nolibtool/obj/Debug/lib -o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/Debug/bin/tblgen
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/AsmWriterEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/CallingConvEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/CodeEmitterGen.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/CodeGenDAGPatterns.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/CodeGenInstruction.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/CodeGenTarget.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/DAGISelEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/FastISelEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/InstrEnumEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/InstrInfoEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/IntrinsicEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/LLVMCConfigurationEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/Record.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/RegisterInfoEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/SubtargetEmitter.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/TGLexer.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/TGParser.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/TGValueTypes.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/TableGen.o
/Users/jyasskin/src/llvm/trunk_nolibtool/obj/utils/TableGen/Debug/TableGenBackend.o
-lLLVMSupport -lLLVMSystem \
     -lpthread -lm
ld: unknown option: -export-dynamic
collect2: ld returned 1 exit status
make[2]: *** [/Users/jyasskin/src/llvm/trunk_nolibtool/obj/Debug/bin/tblgen]
Error 1
make[1]: *** [TableGen/.makeall] Error 2
make: *** [all] Error 1
dhcp-172-19-103-185:~/src/llvm/trunk_nolibtool/obj jyasskin$

The successful link for tblgen without your patch uses the command line:

g++ -I/Users/jyasskin/src/llvm/trunk/obj/include
-I/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen
-I/Users/jyasskin/src/llvm/trunk/src/include
-I/Users/jyasskin/src/llvm/trunk/src/utils/TableGen -D_DEBUG
-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g
-fno-common -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings
-Wno-long-long -Wunused -Wno-unused-parameter -g -o
/Users/jyasskin/src/llvm/trunk/obj/Debug/bin/tblgen
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/AsmWriterEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/CallingConvEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/CodeEmitterGen.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/CodeGenDAGPatterns.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/CodeGenInstruction.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/CodeGenTarget.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/DAGISelEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/FastISelEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/InstrEnumEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/InstrInfoEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/IntrinsicEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/LLVMCConfigurationEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/Record.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/RegisterInfoEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/SubtargetEmitter.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/TGLexer.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/TGParser.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/TGValueTypes.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/TableGen.o
/Users/jyasskin/src/llvm/trunk/obj/utils/TableGen/Debug/TableGenBackend.o
-L/Users/jyasskin/src/llvm/trunk/obj/Debug/lib -lLLVMSupport
-lLLVMSystem -lpthread -lm

gcc and ld versions, in case they matter:
dhcp-172-19-103-185:~/src/llvm/trunk_nolibtool/obj jyasskin$ g++ -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5488~2/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5488)
dhcp-172-19-103-185:~/src/llvm/trunk_nolibtool/obj jyasskin$ ld -v
@(#)PROGRAM:ld PROJECT:ld64-85.2.1

Hi,

similar (same?) problem here:

----------------------- make output -----------------------
for dir in lib/System lib/Support utils lib/VMCore lib tools/llvm-config tools docs; do \
    if [ ! -f $dir/Makefile ]; then \
      /Users/astifter/Documents/not_backuped/llvm-git/autoconf/mkinstalldirs $dir; \
      /bin/cp /Users/astifter/Documents/not_backuped/llvm-git/$dir/Makefile $dir/Makefile; \
    fi; \
    (make -C $dir all ) || exit 1; \
  done
make[1]: Nothing to be done for `all'.
if [ ! -f TableGen/Makefile ]; then \
    /Users/astifter/Documents/not_backuped/llvm-git/autoconf/mkinstalldirs TableGen; \
    /bin/cp /Users/astifter/Documents/not_backuped/llvm-git/utils/TableGen/Makefile TableGen/Makefile; \
  fi; \
  make -C TableGen all
llvm[2]: Linking Release executable tblgen (without symbols)
g++ -I/Users/astifter/Documents/not_backuped/llvm-git/include -I/Users/astifter/Documents/not_backuped/llvm-git/utils/TableGen -I/Users/astifter/Documents/not_backuped/llvm-obj/include -I/Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-common -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -O3 -Wl,--rpath -Wl,/Users/astifter/Documents/not_backuped/llvm-obj/Release/bin -export-dynamic -L/Users/astifter/Documents/not_backuped/llvm-obj/Release/lib -L/Users/astifter/Documents/not_backuped/llvm-obj/Release/lib -o /Users/astifter/Documents/not_backuped/llvm-obj/Release/bin/tblgen /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/AsmWriterEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/CallingConvEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/CodeEmitterGen.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/CodeGenDAGPatterns.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/CodeGenInstruction.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/CodeGenTarget.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/DAGISelEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/FastISelEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/InstrEnumEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/InstrInfoEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/IntrinsicEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/LLVMCConfigurationEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/Record.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/RegisterInfoEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/SubtargetEmitter.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/TGLexer.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/TGParser.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/TGValueTypes.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/TableGen.o /Users/astifter/Documents/not_backuped/llvm-obj/utils/TableGen/Release/TableGenBackend.o -lLLVMSupport -lLLVMSystem \
     -lpthread -lm
ld: unknown option: -export-dynamic
collect2: ld returned 1 exit status
make[2]: *** [/Users/astifter/Documents/not_backuped/llvm-obj/Release/bin/tblgen] Error 1
make[1]: *** [TableGen/.makeall] Error 2
make: *** [all] Error 1
----------------------- end -----------------------

----- Mac OS X 10.5.6, all patches
----- Darwin ... 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:39:01 PST 2008; root:xnu-1228.9.59~1/RELEASE_PPC Power Macintosh
----- gcc version:
Using built-in specs.
Target: powerpc-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5490~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --program-prefix= --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5490)

Grettings, astifter