[PATCH] Use libtool -export-dynamic flag for portability

Dan Nicholson dbn.lists at gmail.com
Wed Feb 24 08:31:42 PST 2010

On Wed, Feb 24, 2010 at 7:14 AM, Alan Coopersmith
<Alan.Coopersmith at sun.com> wrote:
> Yaakov (Cygwin/X) wrote:
>> From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
>> The linker flag required for exporting symbols in executables varies
>> by platform.  libtool handles this with a single -export-dynamic
>> flag (not to be confused with the similarly-named ELF linker flag)
>> which tells it to use the correct platform-specific flag at link time.
> Is libtool used to build the Xorg binary itself?   I thought it was
> just invoked for the libraries & modules.

Pretty sure libtool builds everything if it's in included.

$ rm hw/xfree86/Xorg
rm: remove regular file `hw/xfree86/Xorg'? y
$ make -C hw/xfree86 Xorg V=1
make: Entering directory `/home/dan/scm/xorg/xserver/hw/xfree86'
../../doltlibtool  --tag=CC   --mode=link gcc -DHAVE_DIX_CONFIG_H
-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing
-Wbad-function-cast -Wformat=2 -Wold-style-definition
-Wdeclaration-after-statement  -D_BSD_SOURCE -DHAS_FCHOWN
-DHAS_STICKY_DIR_BIT -I/opt/gfx/include -I/opt/gfx/include/pixman-1
-I/usr/include/freetype2   -I../../include -I../../include
-I../../Xext -I../../composite -I../../damageext -I../../xfixes
-I../../Xi -I../../mi -I../../miext/shadow  -I../../miext/damage
-I../../render -I../../randr -I../../fb -fvisibility=hidden
-DHAVE_XORG_CONFIG_H -fvisibility=hidden -I/opt/gfx/include   -DXF86PM
  -g -O2 -rdynamic  -o Xorg xorg.o ../../dix/libmain.la libxorg.la
-L/opt/gfx/lib -lpciaccess       -L/opt/gfx/lib -lXfont -lXau
-lpixman-1 -lXdmcp    -lm  -lrt  -lm  -lrt
libtool: link: gcc -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -fno-strict-aliasing -Wbad-function-cast -Wformat=2
-Wold-style-definition -Wdeclaration-after-statement -D_BSD_SOURCE
-I/opt/gfx/include/pixman-1 -I/usr/include/freetype2 -I../../include
-I../../include -I../../Xext -I../../composite -I../../damageext
-I../../xfixes -I../../Xi -I../../mi -I../../miext/shadow
-I../../miext/damage -I../../render -I../../randr -I../../fb
-fvisibility=hidden -DHAVE_XORG_CONFIG_H -fvisibility=hidden
-I/opt/gfx/include -DXF86PM -g -O2 -rdynamic -o Xorg xorg.o
../../dix/.libs/libmain.a ./.libs/libxorg.a -L/lib64 -lhal -ldbus-1
-lpthread -lgcrypt -ldl -L/opt/gfx/lib /opt/gfx/lib/libpciaccess.so
-lXfont -lXau /opt/gfx/lib/libpixman-1.so -lXdmcp -lm -lrt -Wl,-rpath
-Wl,/opt/gfx/lib -Wl,-rpath -Wl,/opt/gfx/lib
make: Leaving directory `/home/dan/scm/xorg/xserver/hw/xfree86'


More information about the xorg-devel mailing list