[Bug libstdc++/28811] --with-pic vs static libraries and libstdc++
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Fri Nov 14 00:33:00 GMT 2008
------- Comment #13 from pluto at agmk dot net 2008-11-14 00:32 -------
(In reply to comment #10)
> If no and --with-pic builds everything twice and it is possible to compile
> the *.o's intended for libstdc++.so with -DSHARED,
i thought about something like this:
$ cat makefile
SRCS := test.cpp
all: libtest.so libtest.a
libtest.so: $(SRCS:.cpp=.os)
g++ -shared -o $@ $<
libtest.a: $(SRCS:.cpp=.o)
ar cr $@ $<
%.os: %.cpp
g++ -c -fpic -DSHARED -o $@ $<
%.o: %.cpp
g++ -c -fpic -o $@ $<
but i can't transform it into autotools templates :/
i saw that elfutils does such trick within src/makefile.am.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28811
More information about the Gcc-bugs
mailing list