------- 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