aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libmalloc/files
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-02-05 14:12:30 +0800
committerobrien <obrien@FreeBSD.org>1999-02-05 14:12:30 +0800
commit4887d362cd7fa4cedb6dbfc1bc50312f616e323b (patch)
tree846fe89b131b15161cf89da4d6e79b6e337f52de /devel/libmalloc/files
parent9a86d52011fefbe5292aa20bdba7c7da47c0a72f (diff)
downloadfreebsd-ports-gnome-4887d362cd7fa4cedb6dbfc1bc50312f616e323b.tar.gz
freebsd-ports-gnome-4887d362cd7fa4cedb6dbfc1bc50312f616e323b.tar.zst
freebsd-ports-gnome-4887d362cd7fa4cedb6dbfc1bc50312f616e323b.zip
* there were two patches in the last patch-aa, so I ended up spamming one
of them on my last cleanup. * really fix for ELF
Diffstat (limited to 'devel/libmalloc/files')
-rw-r--r--devel/libmalloc/files/patch-ad92
1 files changed, 92 insertions, 0 deletions
diff --git a/devel/libmalloc/files/patch-ad b/devel/libmalloc/files/patch-ad
new file mode 100644
index 000000000000..8a92c2b30339
--- /dev/null
+++ b/devel/libmalloc/files/patch-ad
@@ -0,0 +1,92 @@
+--- Makefile.orig Mon Apr 3 10:55:32 1995
++++ Makefile Thu Feb 4 22:08:18 1999
+@@ -11,8 +11,8 @@
+ # puts malloc.h in $INCDIR.
+ #
+
+-LIBDIR=$(HOME)/lib/$(ARCH)
+-INCDIR=$(HOME)/include
++LIBDIR=${PREFIX}/lib
++INCDIR=${PREFIX}/include
+
+ # neutralize SystemV genius
+ SHELL=/bin/sh
+@@ -46,7 +46,7 @@
+ # -DHAVE_MMAP can be defined for SunOS4.x and other systems
+ # that have a general purpose mmap call that allows memory-mapped files.
+ #
+-NORMALDEFS=-DHAVE_MMAP # -DSTDHEADERS -DSHORTNAMES -DUSESTDIO
++NORMALDEFS=-DHAVE_MMAP -DSTDHEADERS # -DSHORTNAMES -DUSESTDIO
+
+ # CC = gcc -ansi -Wall -O # -pedantic # add -pedantic if you fixed your includes.
+ # SGI needs cc -xansi -D__STDC__ on Irix4.0.5.
+@@ -62,11 +62,20 @@
+ RANLIB = ranlib
+
+ LDFLAGS=#-Bstatic
++.if (${PORTOBJFORMAT} == "elf")
++CFLAGS_SHARED= -shared -Wl,-soname,${LIBSMALLOC}
++VERSION=1
++.else
++CFLAGS_SHARED= -shared
++VERSION=1.18
++.endif
+
+ # only developers should have to change stuff below this line
+
+ EXT=_d
+ LIBMALLOC=libmalloc$(EXT).a
++LIBSMALLOC=libmalloc${EXT}.so.${VERSION}
++
+ PROGS=testmalloc$(EXT) simumalloc$(EXT) teststomp$(EXT) maltrace$(EXT)
+
+ DEFINES= $(NORMALDEFS) $(DEBUGDEFS)
+@@ -108,9 +117,16 @@
+
+ CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
+
+-all: pass clean libmalloc
++.c.o:
++ ${CC} -c ${CFLAGS} $< -o $@
++ ${CC} -c -fpic ${CFLAGS} $< -o shared/$@
++
++all: mkdir pass clean libmalloc
+
+-pass: $(LIBMALLOC) $(PROGS) out$(EXT)
++mkdir:
++ @mkdir -p shared
++
++pass: $(LIBMALLOC) ${LIBSMALLOC} $(PROGS) out$(EXT)
+
+ libmalloc:
+ $(MAKE) -f Makefile $(MFLAGS) CC="$(CC)" DEBUGDEFS="$(FASTDEFS)" \
+@@ -135,6 +151,12 @@
+ -$(RANLIB) $(LIBMALLOC)
+ touch .lib$(EXT)
+
++${LIBSMALLOC}: ${OBJS}
++ rm -f ${LIBSMALLOC} ${SPLAYOBJ}
++ cd splay; ${MAKE} ${MFLAGS} DEFINES="${DEFINES}" \
++ LIBMALLOC=../${LIBMALLOC} CC="${CC} -fpic"
++ (cd shared; ${CC} ${CFLAGS_SHARED} -o ../${LIBSMALLOC} ${OBJS} ../${SPLAYOBJ})
++
+ $(SPLAYOBJ): .foo
+ cd splay; $(MAKE) $(MFLAGS) DEFINES="$(DEFINES)" \
+ LIBMALLOC=../$(LIBMALLOC) CC="$(CC)"
+@@ -164,6 +186,7 @@
+
+ clean:
+ -rm -f *.o \#* *~ core a.out gmon.out mon.out onefile.c *.sL prof.out
++ -(cd shared; rm -f *.o \#* *~)
+ cd splay; $(MAKE) clean
+
+ veryclean: clean cleanprogs
+@@ -175,6 +198,8 @@
+ -$(RANLIB) $(LIBDIR)/libmalloc.a
+ install -c -m 644 libmalloc_d.a $(LIBDIR)
+ -$(RANLIB) $(LIBDIR)/libmalloc_d.a
++ install -c -m 644 ${LIBSMALLOC} ${LIBDIR}
++ ln -sf ${LIBDIR}/${LIBSMALLOC} ${LIBDIR}/libmalloc${EXT}.so
+ install -c -m 644 malloc.h $(INCDIR)
+
+ .id: $(SRCS)