summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libf2c/files/libf2c-20021004-shared-object.patch')
-rw-r--r--dev-libs/libf2c/files/libf2c-20021004-shared-object.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/dev-libs/libf2c/files/libf2c-20021004-shared-object.patch b/dev-libs/libf2c/files/libf2c-20021004-shared-object.patch
new file mode 100644
index 000000000000..baab44a6bd5a
--- /dev/null
+++ b/dev-libs/libf2c/files/libf2c-20021004-shared-object.patch
@@ -0,0 +1,47 @@
+--- makefile.u.orig 2004-06-30 23:30:44.980603208 +0200
++++ makefile.u 2004-06-30 23:33:28.220786928 +0200
+@@ -17,6 +17,7 @@
+ # compile, then strip unnecessary symbols
+ .c.o:
+ $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
++ $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) -fPIC $*.c -o shared/$*.o
+ ld -r -x -o $*.xxx $*.o
+ mv $*.xxx $*.o
+ ## Under Solaris (and other systems that do not understand ld -x),
+@@ -63,7 +64,14 @@
+ # For INTEGER*8 support (which requires system-dependent adjustments to
+ # f2c.h), add $(QINT) to the libf2c.a dependency list below...
+
+-all: f2c.h signal1.h sysdep1.h libf2c.a
++dirs:
++ mkdir -p shared
++
++libf2c.so: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
++ $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
++ gcc -shared -o libf2c.so shared/*.o
++
++all: dirs f2c.h signal1.h sysdep1.h libf2c.a libf2c.so
+
+ libf2c.a: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
+ $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
+@@ -74,9 +82,11 @@
+
+ f77vers.o: f77vers.c
+ $(CC) -c f77vers.c
++ $(CC) -fPIC -c f77vers.c -o shared/f77vers.o
+
+ i77vers.o: i77vers.c
+ $(CC) -c i77vers.c
++ $(CC) -fPIC -c i77vers.c -o shared/i77vers.o
+
+ # To get an "f2c.h" for use with "f2c -C++", first "make hadd"
+ hadd: f2c.h0 f2ch.add
+@@ -108,7 +118,7 @@
+ -ranlib $(LIBDIR)/libf2c.a
+
+ clean:
+- rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
++ rm -f libf2c.a *.o shared/*.o arith.h signal1.h sysdep1.h
+
+ backspac.o: fio.h
+ close.o: fio.h