[LLVMdev] [llvm-commits] remove libtool from build system

Jeffrey Yasskin jyasskin at google.com
Tue Feb 24 09:57:41 PST 2009


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


On Mon, Feb 23, 2009 at 8:40 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> 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! :)
>
> Nick
>
> Nick Lewycky wrote:
>>
>> Now attaching an updated patch.
>>
>> Duncan found a bug where configure --disable-pic would fail to build
>> Transforms/Hello. Inside the makefile, we need to look at SHARED_LIBRARY
>> very early, and code doing if LOADABLE_MODULE then SHARED_LIBRARY = 1 hadn't
>> happened yet.
>>
>> Nick
>>
>> Nick Lewycky wrote:
>>>
>>> This patch removes libtool from the build system. It works for me.
>>>
>>> Please do test it and report back whether it works or not. It's almost
>>> certain that this patch is going to break something on some platform, and
>>> I'd like to know about it before committing/reverting. Please make sure to
>>> check 'make install' and 'cd unittests; make' as well as doing a plain
>>> build.
>>>
>>> Thanks!
>>>
>>> Nick Lewycky
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>




More information about the llvm-dev mailing list