[PATCH] Build libmcheck.a and librpcsvc.a with -fPIC
Jakub Jelinek
jakub@redhat.com
Tue Feb 22 09:41:00 GMT 2005
Hi!
These libraries have no .so counterpart. By building them with -fPIC,
one can link them into PIEs and DSOs as well.
2005-02-22 Jakub Jelinek <jakub@redhat.com>
* malloc/Makefile (CFLAGS-mcheck-init.c): Add.
* sunrpc/Makefile: Add $(PIC-ccflag) to CFLAGS-x* for
librpcsvc.a objects.
--- libc/malloc/Makefile.jj 2004-12-21 14:33:27.000000000 +0100
+++ libc/malloc/Makefile 2005-02-22 10:31:53.542037756 +0100
@@ -101,6 +101,8 @@ $(objpfx)memusagestat: $(memusagestat-mo
include ../Rules
+CFLAGS-mcheck-init.c = $(PIC-ccflag)
+
$(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
-rm -f $@
$(patsubst %/,cd % &&,$(objpfx)) \
--- libc/sunrpc/Makefile.jj 2004-09-29 10:25:39.000000000 +0200
+++ libc/sunrpc/Makefile 2005-02-22 10:33:48.531584027 +0100
@@ -107,19 +107,19 @@ librpcsvc-inhibit-o = .os # Build no sha
omit-deps = $(librpcsvc-routines)
endif
-CFLAGS-xbootparam_prot.c = -Wno-unused
-CFLAGS-xnlm_prot.c = -Wno-unused
-CFLAGS-xrstat.c = -Wno-unused
-CFLAGS-xyppasswd.c = -Wno-unused
-CFLAGS-xklm_prot.c = -Wno-unused
-CFLAGS-xrex.c = -Wno-unused
-CFLAGS-xsm_inter.c = -Wno-unused
-CFLAGS-xmount.c = -Wno-unused
-CFLAGS-xrusers.c = -Wno-unused
-CFLAGS-xspray.c = -Wno-unused
-CFLAGS-xnfs_prot.c = -Wno-unused
-CFLAGS-xrquota.c = -Wno-unused
-CFLAGS-xkey_prot.c = -Wno-unused
+CFLAGS-xbootparam_prot.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xnlm_prot.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xrstat.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xyppasswd.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xklm_prot.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xrex.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xsm_inter.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xmount.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xrusers.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xspray.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xnfs_prot.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xrquota.c = -Wno-unused $(PIC-ccflag)
+CFLAGS-xkey_prot.c = -Wno-unused $(PIC-ccflag)
CFLAGS-auth_unix.c = -fexceptions
CFLAGS-key_call.c = -fexceptions
CFLAGS-pmap_rmt.c = -fexceptions
Jakub
More information about the Libc-hacker
mailing list