bc64d08174
expected signal delivery between 7.x host and 6.x jail. See patch comment for more info. Approved by: portmgr (kris)
68 lines
2.3 KiB
Text
68 lines
2.3 KiB
Text
--- Makefile.orig Wed Apr 14 03:22:49 1999
|
|
+++ Makefile Sun Oct 22 14:27:23 2006
|
|
@@ -1,8 +1,14 @@
|
|
PIC= -fPIC
|
|
-CFLAGS= -g -DUSE_SEMAPHORE $(PIC)
|
|
-LIBS= -lpthread
|
|
+#CFLAGS= -g -DUSE_SEMAPHORE $(PIC)
|
|
+CFLAGS+= -g $(PIC)
|
|
+.if ${MACHINE_ARCH} == "i386" && ${OSVERSION} < 700003 || (${MACHINE_ARCH} == "amd64" && ${OSVERSION} < 700003) || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64"
|
|
+CFLAGS+= -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS
|
|
+.endif
|
|
+#CFLAGS+= -pthread
|
|
+# for FreeBSD comment out the below as this is not how we do pthreads.
|
|
+#LIB_PTHREADS= -lpthread -lc
|
|
|
|
-prefix=/usr
|
|
+prefix=$(PREFIX)
|
|
BIN_INSTALL_DIR= $(prefix)/bin
|
|
LIB_INSTALL_DIR= $(prefix)/lib
|
|
MAN_INSTALL_DIR= $(prefix)/man/man3
|
|
@@ -17,14 +23,18 @@
|
|
OBJECTS= efence.o page.o print.o
|
|
|
|
all: libefence.a libefence.so.0.0 tstheap eftest
|
|
- @ echo
|
|
- @ echo "Testing Electric Fence."
|
|
- @ echo "After the last test, it should print that the test has PASSED."
|
|
- ./eftest
|
|
- ./tstheap 3072
|
|
- @ echo
|
|
- @ echo "Electric Fence confidence test PASSED."
|
|
- @ echo
|
|
+# This test is not run. Breaks on pointyhat because the host
|
|
+# delivers a different "page-protection-violated" signal to what
|
|
+# is expected by the port running inside a lower-version jail.
|
|
+# (ie. in 6.x jail it expects SIGBUS, 7.x host delivers SIGSEGV).
|
|
+# @ echo
|
|
+# @ echo "Testing Electric Fence."
|
|
+# @ echo "After the last test, it should print that the test has PASSED."
|
|
+# EF_PROTECT_BELOW= && EF_PROTECT_FREE= && EF_ALIGNMENT= && ./eftest
|
|
+# ./tstheap 3072
|
|
+# @ echo
|
|
+# @ echo "Electric Fence confidence test PASSED."
|
|
+# @ echo
|
|
|
|
install: libefence.a efence.3 libefence.so.0.0
|
|
$(INSTALL) -m 755 ef.sh $(BIN_INSTALL_DIR)/ef
|
|
@@ -54,16 +64,16 @@
|
|
$(AR) crv libefence.a $(OBJECTS)
|
|
|
|
libefence.so.0.0: $(OBJECTS)
|
|
- gcc -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \
|
|
- $(OBJECTS) -lpthread -lc
|
|
+ $(CC) $(CFLAGS) -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \
|
|
+ $(OBJECTS) $(LIB_PTHREADS)
|
|
|
|
tstheap: libefence.a tstheap.o
|
|
- rm -f tstheap
|
|
- $(CC) $(CFLAGS) tstheap.o libefence.a -o tstheap $(LIBS)
|
|
+ $(CC) $(CFLAGS) tstheap.o libefence.a -o tstheap $(LIB_PTHREADS)
|
|
|
|
eftest: libefence.a eftest.o
|
|
- rm -f eftest
|
|
- $(CC) $(CFLAGS) eftest.o libefence.a -o eftest $(LIBS)
|
|
+ $(CC) $(CFLAGS) eftest.o libefence.a -o eftest $(LIB_PTHREADS)
|
|
|
|
$(OBJECTS) tstheap.o eftest.o: efence.h
|
|
|