[Top][All Lists]

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

RE: extra exports with libtool (pr-msvc-support)

From: David Byron
Subject: RE: extra exports with libtool (pr-msvc-support)
Date: Thu, 3 Sep 2009 11:47:18 -0700

> > I just tried this by adding
> > 
> > libfoo_la_LDFLAGS += -export-symbols symfile
> > 
> > and manually creating an empty file named symfile in the
> > example I posted earlier.  Now the only symbol that gets
> > exported is the one decorated with dllexport.  Thanks
> > for the workaround.

One more snag here.  It works well with msvc, but not so well on linux/gcc:

/bin/sh ./libtool --tag=CC   --mode=link gcc  -fvisibility=hidden -g -O2
-export-symbols symfile  -o -rpath /usr/local/lib
libfoo_la-public.lo libfoo_la-private.lo
libtool: link: echo "{ global:" > .libs/libfoo.ver
libtool: link:  cat symfile | sed -e "s/\(.*\)/\1;/" >> .libs/libfoo.ver
libtool: link:  echo "local: *; };" >> .libs/libfoo.ver
libtool: link:  gcc -shared  .libs/libfoo_la-public.o
.libs/libfoo_la-private.o      -Wl,-soname -Wl,
-Wl,-version-script -Wl,.libs/libfoo.ver -o .libs/
.libs/libfoo.ver:2: syntax error in VERSION script
collect2: ld returned 1 exit status
make[1]: *** [] Error 1

$ cat .libs/libfoo.ver
{ global:
local: *; };

I can use the -export-symbols symfile option when using msvc only, but it
seemed like it would work with gcc as well, though it's unnecessary there.

> That said, what you can do is compare testsuite results from the
> branch on non-msvc-setups with results from the master branch.
> In particular I think Linux (and other "big" platforms) would
> be interresting as well as a Linux->mingw cross. Since it's been
> a while it would perhaps also be interesting to check for
> regressions with mingw and cygwin. And the upcoming cygwin 1.7
> would also be interesting.

I'm inches away from switching to the pr-msvc-support branch on linux but at
the moment I've got:

$ libtool --version
libtool (GNU libtool 1.3105 2009-06-19) 2.2.7a


reply via email to

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