electric-fence: fix cross-compilation
This commit is contained in:
parent
077c376a50
commit
6be8372071
@ -1,8 +1,14 @@
|
||||
diff --git a/../electric-fence/Makefile b/./Makefile
|
||||
index 4e0dd5b6c..c839255de 100644
|
||||
index 4e0dd5b6c..4c26431e1 100644
|
||||
--- a/../electric-fence/Makefile
|
||||
+++ b/./Makefile
|
||||
@@ -6,10 +6,9 @@ endif
|
||||
@@ -1,19 +1,12 @@
|
||||
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
- CFLAGS=-O0 -fno-builtin-malloc -g -Wall -DUSE_SEMAPHORE -fPIC
|
||||
-else
|
||||
- CFLAGS=-O2 -fno-builtin-malloc -g -Wall -DUSE_SEMAPHORE -fPIC
|
||||
-endif
|
||||
+CFLAGS+= -fno-builtin-malloc -g -Wall -D_GNU_SOURCE -DUSE_SEMAPHORE -fPIC
|
||||
|
||||
LIBS= -lpthread
|
||||
|
||||
@ -13,9 +19,25 @@ index 4e0dd5b6c..c839255de 100644
|
||||
+MAN_INSTALL_DIR= $(prefix)/share/man/man3
|
||||
|
||||
|
||||
CC= cc
|
||||
@@ -32,14 +31,14 @@ all: libefence.a libefence.so.0.0 tstheap eftest
|
||||
@ echo
|
||||
-CC= cc
|
||||
-AR= ar
|
||||
INSTALL= install
|
||||
|
||||
PACKAGE_SOURCE= README efence.3 Makefile efence.h \
|
||||
@@ -21,25 +14,17 @@ PACKAGE_SOURCE= README efence.3 Makefile efence.h \
|
||||
|
||||
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
|
||||
+all: libefence.a libefence.so.0.0
|
||||
|
||||
install: libefence.a libefence.3 libefence.so.0.0
|
||||
- $(INSTALL) -m 755 ef.sh $(BIN_INSTALL_DIR)/ef
|
||||
@ -31,3 +53,12 @@ index 4e0dd5b6c..c839255de 100644
|
||||
|
||||
clean:
|
||||
- rm -f $(OBJECTS) tstheap.o eftest.o tstheap eftest \
|
||||
@@ -61,7 +46,7 @@ libefence.a: $(OBJECTS)
|
||||
|
||||
libefence.so.0.0: $(OBJECTS)
|
||||
$(CC) -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \
|
||||
- $(CFLAGS) $(OBJECTS) -lpthread -lc
|
||||
+ $(CFLAGS) $(OBJECTS) $(LDFLAGS) -lc
|
||||
|
||||
tstheap: libefence.a tstheap.o
|
||||
- rm -f tstheap
|
||||
|
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://elinux.org/Electric_Fence
|
||||
TERMUX_PKG_DESCRIPTION="Electric Fence (eFence) malloc memory debugger"
|
||||
TERMUX_PKG_LICENSE=GPL-2.0
|
||||
TERMUX_PKG_VERSION=2.2.5
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://deb.debian.org/debian/pool/main/e/electric-fence/electric-fence_${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=8aa8d1e5772a169098f0aba6e647295c12561a6851ef9b378a54020e8086bcc6
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
Loading…
Reference in New Issue
Block a user