From ec96d08c68e986340f95b70ebe3aa359922abd9c Mon Sep 17 00:00:00 2001 From: Pierre-Marc Fournier Date: Mon, 14 Dec 2009 02:08:45 -0500 Subject: [PATCH] Force -fPIC build of libust-initializer.o This is needed for linking it to shared libraries. --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index be14587..9385116 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,5 +18,7 @@ CLEANFILES = $(ldscripts_DATA) ./tests/libust-initializer.Po libust.so: libust.ldscript.in $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" -e "s@\@PATH\@@${libdir}@g" < $< > $@ +# It is very important to compile the initializer with PIC otherwise we +# may get obscure errors when linking to shared libraries. libust-initializer.o: libust-initializer.c - $(CC) $(CFLAGS) -c -I$(top_srcdir)/include -o $@ $< + $(CC) $(CFLAGS) -fPIC -c -I$(top_srcdir)/include -o $@ $< -- 2.34.1