21e4aa0d45
This addresses a temp file symlink race vulnerability. The f2c patch is adapted from the debian one. The f2c-f77 (wrapper script which emulates a fortran compiler) patch was done a bit differently.
65 lines
2 KiB
Text
65 lines
2 KiB
Text
$NetBSD: patch-ag,v 1.10 2005/01/28 23:37:42 dmcmahill Exp $
|
|
|
|
--- libI77/makefile.orig Tue Sep 14 17:11:44 2004
|
|
+++ libI77/makefile
|
|
@@ -1,13 +1,11 @@
|
|
-.SUFFIXES: .c .o
|
|
-CC = cc
|
|
-CFLAGS = -O
|
|
-SHELL = /bin/sh
|
|
-
|
|
-# compile, then strip unnecessary symbols
|
|
-.c.o:
|
|
- $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
|
|
- ld -r -x -o $*.xxx $*.o
|
|
- mv $*.xxx $*.o
|
|
+all: libI77.la
|
|
+
|
|
+.SUFFIXES: .c .lo
|
|
+
|
|
+# compile
|
|
+.c.lo:
|
|
+ ${LIBTOOL} --mode=compile $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
|
|
+
|
|
## Under Solaris (and other systems that do not understand ld -x),
|
|
## omit -x in the ld line above.
|
|
## If your system does not have the ld command, comment out
|
|
@@ -17,18 +15,18 @@ OBJ = Version.o backspace.o close.o dfe.
|
|
fmt.o fmtlib.o ftell_.o iio.o ilnw.o inquire.o lread.o lwrite.o \
|
|
open.o rdfmt.o rewind.o rsfe.o rsli.o rsne.o sfe.o sue.o typesize.o \
|
|
uio.o util.o wref.o wrtfmt.o wsfe.o wsle.o wsne.o xwsne.o
|
|
-libI77.a: $(OBJ)
|
|
- ar r libI77.a $?
|
|
- ranlib libI77.a || true
|
|
+LTOBJ= ${OBJ:.o=.lo}
|
|
+
|
|
+libI77.la: $(LTOBJ)
|
|
+ ${LIBTOOL} --mode=link ${CC} ${CFLAGS} -o $@ ${LTOBJ} ${LDFLAGS} -rpath ${LIBDIR} -version-info ${F2CMAJOR}:${F2CMINOR}
|
|
|
|
### If your system lacks ranlib, you don't need it; see README.
|
|
|
|
-install: libI77.a
|
|
- cp libI77.a $(LIBDIR)/libI77.a
|
|
- ranlib $(LIBDIR)/libI77.a || true
|
|
+install: libI77.la
|
|
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libI77.la ${LIBDIR}
|
|
|
|
-Version.o: Version.c
|
|
- $(CC) -c Version.c
|
|
+Version.lo: Version.c
|
|
+ ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -c Version.c
|
|
|
|
# To compile with C++, first "make f2c.h"
|
|
f2c.h: f2ch.add
|
|
@@ -94,11 +92,3 @@ xwsne.o: fio.h
|
|
xwsne.o: lio.h
|
|
xwsne.o: fmt.h
|
|
|
|
-check:
|
|
- xsum Notice README Version.c backspace.c close.c dfe.c dolio.c \
|
|
- due.c endfile.c err.c f2ch.add fio.h fmt.c fmt.h fmtlib.c fp.h \
|
|
- ftell_.c iio.c ilnw.c inquire.c lio.h lread.c lwrite.c makefile \
|
|
- open.c rawio.h rdfmt.c rewind.c rsfe.c rsli.c rsne.c sfe.c sue.c \
|
|
- typesize.c uio.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c \
|
|
- xwsne.c >zap
|
|
- cmp zap libI77.xsum && rm zap || diff libI77.xsum zap
|