From 892c9e01dacb453dc332b5d2a96744f7bd375294 Mon Sep 17 00:00:00 2001 From: brad Date: Wed, 18 Oct 2000 14:50:55 +0000 Subject: [PATCH] pass the pic flag along to the compiler when linking the shared library. --- graphics/gd/patches/patch-Makefile | 11 ++++++----- textproc/expat/patches/patch-Makefile | 14 +++++++------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/graphics/gd/patches/patch-Makefile b/graphics/gd/patches/patch-Makefile index b67de06c62e..3c7a4f308c0 100644 --- a/graphics/gd/patches/patch-Makefile +++ b/graphics/gd/patches/patch-Makefile @@ -1,5 +1,5 @@ --- Makefile.orig Sat Jun 3 15:26:12 2000 -+++ Makefile Sat Sep 16 06:47:35 2000 ++++ Makefile Wed Oct 18 09:30:03 2000 @@ -51,13 +51,13 @@ LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib @@ -17,11 +17,12 @@ # # -@@ -75,26 +75,35 @@ +@@ -75,26 +75,36 @@ BIN_PROGRAMS=pngtogd pngtogd2 gdtopng gd2topng gd2copypal gdparttopng webpng TEST_PROGRAMS=gdtest gddemo gd2time gdtestttf -all: libgd.a $(PROGRAMS) ++PICFLAG= -fpic +SHLIB= libgd.so.18.3 +.if defined(NO_SHARED_LIB) && ${NO_SHARED_LIB:L} == "yes" @@ -71,7 +72,7 @@ gddemo: gddemo.o libgd.a $(CC) gddemo.o -o gddemo $(LIBDIRS) $(LIBS) -@@ -129,17 +138,21 @@ +@@ -129,17 +139,21 @@ gdtestttf: gdtestttf.o libgd.a $(CC) gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS) @@ -95,11 +96,11 @@ + $(AR) rc libgd.a $(OBJS) +$(SHLIB): $(SHOBJS) -+ $(CC) -shared -o $(SHLIB) $(SHOBJS) ++ $(CC) -shared $(PICFLAG) -o $(SHLIB) $(SHOBJS) + clean: - rm -f *.o *.a ${PROGRAMS} test/gdtest.jpg test/gdtest.wbmp + rm -f *.o *.so ${PROGRAMS} libgd.a $(SHLIB) test/gdtest.jpg test/gdtest.wbmp +.c.so: -+ $(CC) $(CFLAGS) -fpic -DPIC -c $? -o $@ ++ $(CC) $(CFLAGS) $(PICFLAG) -DPIC -c $? -o $@ diff --git a/textproc/expat/patches/patch-Makefile b/textproc/expat/patches/patch-Makefile index 12aaf4a622e..74438d48457 100644 --- a/textproc/expat/patches/patch-Makefile +++ b/textproc/expat/patches/patch-Makefile @@ -1,6 +1,6 @@ --- Makefile.orig Mon Mar 8 08:20:38 1999 -+++ Makefile Wed Sep 27 10:23:50 2000 -@@ -10,21 +10,26 @@ ++++ Makefile Wed Oct 18 09:47:00 2000 +@@ -10,21 +10,28 @@ #FILEMAP_OBJ=xmlwf/readfilemap.o OBJS=xmltok/xmltok.o \ xmltok/xmlrole.o \ @@ -17,7 +17,8 @@ EXE= -all: xmlwf/xmlwf$(EXE) -- ++PICFLAG= -fpic + -xmlwf/xmlwf$(EXE): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(OBJS) +.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes" @@ -35,7 +36,7 @@ xmltok/nametab.h: gennmtab/gennmtab$(EXE) rm -f $@ -@@ -35,5 +40,18 @@ +@@ -35,5 +42,17 @@ xmltok/xmltok.o: xmltok/nametab.h @@ -44,7 +45,7 @@ + ranlib $@ + +$(SHLIB): $(SHOBJS) -+ $(CC) -shared -o $(SHLIB) $(SHOBJS) ++ $(CC) -shared $(PICFLAG) -o $(SHLIB) $(SHOBJS) + +.SUFFIXES: .o .so + @@ -52,5 +53,4 @@ $(CC) $(CFLAGS) -c -o $@ $< + +.c.so: -+ $(CC) $(CFLAGS) -fpic -DPIC -c -o $@ $< -+ ++ $(CC) $(CFLAGS) $(PICFLAG) -DPIC -c -o $@ $<