bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libtool 2.2.2: -prefer-pic implementation


From: Bruno Haible
Subject: libtool 2.2.2: -prefer-pic implementation
Date: Sun, 6 Apr 2008 15:08:22 +0200
User-agent: KMail/1.5.4

In a package that uses libtool 2.2.2 and is configured with
  ./configure --enable-shared --enable-static
then -prefer-pic in compile mode has a stupid effect. It is documented:

  `-prefer-pic'
     Libtool will try to build only PIC objects.

Here is what it does:

  /bin/sh ../libtool --mode=compile gcc -I. -I. -I../include -I./../include \
  -I.. -I./.. -I/packages/gnu/include -g -O2  -DLIBDIR=\"/packages/gnu/lib\" \
  -DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY \
  -DINSTALLDIR=\"/packages/gnu/lib\" -DNO_XMALLOC \
  -Dset_relocation_prefix=libiconv_set_relocation_prefix \
  -Drelocate=libiconv_relocate -DHAVE_CONFIG_H -DLIBICONV_PLUG \
  -prefer-pic -c ./iconv.c -o objects/iconv.o

libtool: compile:  gcc -I. -I. -I../include -I./../include -I.. -I./.. 
-I/packages/gnu/include -g -O2 -DLIBDIR=\"/packages/gnu/lib\" 
-DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY 
-DINSTALLDIR=\"/packages/gnu/lib\" -DNO_XMALLOC 
-Dset_relocation_prefix=libiconv_set_relocation_prefix 
-Drelocate=libiconv_relocate -DHAVE_CONFIG_H -DLIBICONV_PLUG -c ./iconv.c  
-fPIC -DPIC -o objects/.libs/iconv.o
libtool: compile:  gcc -I. -I. -I../include -I./../include -I.. -I./.. 
-I/packages/gnu/include -g -O2 -DLIBDIR=\"/packages/gnu/lib\" 
-DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY 
-DINSTALLDIR=\"/packages/gnu/lib\" -DNO_XMALLOC 
-Dset_relocation_prefix=libiconv_set_relocation_prefix 
-Drelocate=libiconv_relocate -DHAVE_CONFIG_H -DLIBICONV_PLUG -c ./iconv.c  
-fPIC -DPIC -o objects/iconv.o >/dev/null 2>&1

It is pointless to compile the same source file with the same compiler options 
twice,
no? It just eats up CPU time. The second command could simply make a copy of the
first compilation result.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]