...
 
Commits (4)
libtommath (1.1.0-2) unstable; urgency=medium
* Build a libtool to drop the libtool-bin dependency.
Thanks to Helmut Grohne for the patch (Closes: 912838)
* test with 'make test' and './test'
Thanks to Steffen Jaeckel for the head-ups
-- Dominique Dumont <dod@debian.org> Tue, 05 Feb 2019 10:53:16 +0100
libtommath (1.1.0-1) unstable; urgency=medium
* New upstream version 1.1.0
......
Description: Fix compilation and linkage
Date: Thu Jan 31 14:12:03 2019 +0100
.
makefile.shared: fix compilation and linkage
.
diff --git a/makefile.shared b/makefile.shared
index 3955f83..870b18d 100644
Author: Steffen Jaeckel <s@jaeckel.eu>
Origin: upstream repo
--- a/makefile.shared
+++ b/makefile.shared
@@ -18,6 +18,7 @@ ifndef LIBTOOL
endif
endif
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC)
+LTLINK = $(LIBTOOL) --mode=link --tag=CC $(CC)
LCOV_ARGS=--directory .libs --directory .
@@ -59,7 +60,7 @@ objs: $(OBJECTS)
LOBJECTS = $(OBJECTS:.o=.lo)
$(LIBNAME): $(OBJECTS)
- $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) $(LIBTOOLFLAGS)
+ $(LTLINK) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) $(LIBTOOLFLAGS)
install: $(LIBNAME)
install -d $(DESTDIR)$(LIBPATH)
@@ -76,16 +77,16 @@ uninstall:
rm $(DESTDIR)$(LIBPATH)/pkgconfig/libtommath.pc
test: $(LIBNAME) demo/demo.o
- $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o
- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)
+ $(LTCOMPILE) $(CFLAGS) -c demo/demo.c -o demo/demo.o
+ $(LTLINK) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)
test_standalone: $(LIBNAME) demo/demo.o
- $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o
- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)
+ $(LTCOMPILE) $(CFLAGS) -c demo/demo.c -o demo/demo.o
+ $(LTLINK) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)
.PHONY: mtest
mtest:
- cd mtest ; $(CC) $(CFLAGS) $(LDFLAGS) mtest.c -o mtest
+ cd mtest ; $(CC) $(CFLAGS) -O0 mtest.c $(LDFLAGS) -o mtest
timing: $(LIBNAME) demo/timing.c
- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o timing
+ $(LTLINK) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o timing
increase-test-timeout
remove-undefined-macro
fix-shift-count-overflow-on-x32
x32-relocation
fix-compilation-and-linkage
This diff is collapsed.
......@@ -21,22 +21,25 @@ export LIBPATH = $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
dh $@
override_dh_auto_build:
# create a libtool
echo "Creating libtool executable"
mkdir debian/libtool
cp debian/configure.ac debian/libtool/
cd debian/libtool && LIBTOOLIZE='libtoolize -i' autoreconf -f -i
dh_auto_configure --sourcedirectory=debian/libtool
echo "running auto_test"
# this script runs "make clean" so it cannot be run after build
/bin/bash testme.sh
echo "cleanup after tests"
make clean
$(MAKE) -f makefile.shared LT=$(CURDIR)/debian/libtool/libtool
echo "Building libtommath"
$(MAKE) -f makefile.shared LIBTOOL=$(CURDIR)/debian/libtool/libtool
echo "Building docs"
$(MAKE) manual docs
override_dh_auto_test:
echo "compiling test programs"
$(MAKE) -f makefile.shared LIBTOOL=$(CURDIR)/debian/libtool/libtool test_standalone
echo "running test"
./test
override_dh_auto_install:
$(MAKE) -f makefile.shared LT=$(CURDIR)/debian/libtool/libtool install
$(MAKE) -f makefile.shared LIBTOOL=$(CURDIR)/debian/libtool/libtool install
# Override if not processing -docs
ifeq (,$(findstring libtommath-docs, $(shell dh_listpackages)))
......