[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] aespipe - fix build issues
On Saturday 01 November 2008, Jari Ruusu wrote:
> Jari Ruusu wrote:
> > Alon Bar-Lev wrote:
> > > So if you don't like to add automake, will you consider accepting
> > > another patch that adds install-strip target?
> >
> > Yes, send a patch.
>
> I added that already. I had to drop that aespipe dependency from install and
> install-strip targets. Because this didn't work OK:
>
> make x86
> make install
>
> Your version insisted on rebuilding C language versions of aes.c and md5.c
>
For the install-strip, I think it is incorrect as it won't work using a cross compile and if other make is used.
Please consider the following patch.
I also added some more quotes and use the AC_GNU_SOURCE AC_SYS_LARGEFILE autoconf macros.
I did not know that you should make x86 for optimize x86, will you consider a patch to autoconf
so that it will detect this automatically?
Alon.
---
diff -urNp aespipe-v2.3d/configure.ac aespipe-v2.3d.new/configure.ac
--- aespipe-v2.3d/configure.ac 2008-10-30 16:24:41.000000000 +0200
+++ aespipe-v2.3d.new/configure.ac 2008-11-01 21:02:16.000000000 +0200
@@ -9,7 +9,10 @@ dnl
AC_INIT(aespipe, 2)
AC_CONFIG_SRCDIR([aespipe.c])
+AC_GNU_SOURCE
+AC_SYS_LARGEFILE
AC_PROG_CC
+AC_CHECK_TOOL([STRIP],[strip])
AC_PROG_MAKE_SET
AC_CHECK_FUNCS(mlockall)
AC_HEADER_STDC
diff -urNp aespipe-v2.3d/Makefile.in aespipe-v2.3d.new/Makefile.in
--- aespipe-v2.3d/Makefile.in 2008-10-30 16:41:15.000000000 +0200
+++ aespipe-v2.3d.new/Makefile.in 2008-11-01 21:09:47.000000000 +0200
@@ -7,8 +7,9 @@
# Redistribution of this file is permitted under the GNU Public License.
#
-CC = @CC@ @CFLAGS@ @DEFS@ -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
+CC = @CC@ @CPPFLAGS@ @CFLAGS@ @DEFS@
LINK = @CC@ @LDFLAGS@
+STRIP = @STRIP@
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
@@ -16,6 +17,8 @@ builddir = @builddir@
datarootdir = @datarootdir@
@SET_MAKE@
+INSTALL_STRIP=true
+
aespipe: aespipe.o aes.o md5.o sha512.o rmd160.o
$(LINK) -o aespipe aespipe.o aes.o md5.o sha512.o rmd160.o @LIBS@
x86 i586: aespipe.o aes-x86.o md5-x86.o sha512.o rmd160.o
@@ -23,27 +26,27 @@ x86 i586: aespipe.o aes-x86.o md5-x86.o
amd64: aespipe.o aes-amd64.o md5-amd64.o sha512.o rmd160.o
$(LINK) -o aespipe aespipe.o aes-amd64.o md5-amd64.o sha512.o rmd160.o @LIBS@
aespipe.o: $(srcdir)/aespipe.c $(srcdir)/aes.h $(srcdir)/md5.h $(srcdir)/sha512.h $(srcdir)/rmd160.h
- $(CC) -o aespipe.o -c $(srcdir)/aespipe.c
+ $(CC) -o aespipe.o -c "$(srcdir)/aespipe.c"
aes.o: $(srcdir)/aes.c $(srcdir)/aes.h
- $(CC) -DCONFIGURE_DETECTS_BYTE_ORDER=1 -DDATA_ALWAYS_ALIGNED=1 -o aes.o -c $(srcdir)/aes.c
+ $(CC) -DCONFIGURE_DETECTS_BYTE_ORDER=1 -DDATA_ALWAYS_ALIGNED=1 -o aes.o -c "$(srcdir)/aes.c"
aes-x86.o: $(srcdir)/aes-x86.S $(srcdir)/aes.h
- $(CC) -o aes-x86.o -c $(srcdir)/aes-x86.S
+ $(CC) -o aes-x86.o -c "$(srcdir)/aes-x86.S"
aes-amd64.o: $(srcdir)/aes-amd64.S $(srcdir)/aes.h
- $(CC) -o aes-amd64.o -c $(srcdir)/aes-amd64.S
+ $(CC) -o aes-amd64.o -c "$(srcdir)/aes-amd64.S
md5.o: $(srcdir)/md5.c $(srcdir)/md5.h
- $(CC) -o md5.o -c $(srcdir)/md5.c
-md5-x86.o: $(srcdir)/md5-x86.S $(srcdir)/md5.h
- $(CC) -o md5-x86.o -c $(srcdir)/md5-x86.S
-md5-amd64.o: $(srcdir)/md5-amd64.S $(srcdir)/md5.h
- $(CC) -o md5-amd64.o -c $(srcdir)/md5-amd64.S
+ $(CC) -o md5.o -c "$(srcdir)/md5.c"
+md5-x86.o: $(srcdir)/md5-x86.S "$(srcdir)/md5.h"
+ $(CC) -o md5-x86.o -c "$(srcdir)/md5-x86.S"
+md5-amd64.o: $(srcdir)/md5-amd64.S "$(srcdir)/md5.h"
+ $(CC) -o md5-amd64.o -c "$(srcdir)/md5-amd64.S"
sha512.o: $(srcdir)/sha512.c $(srcdir)/sha512.h
- $(CC) -o sha512.o -c $(srcdir)/sha512.c
+ $(CC) -o sha512.o -c "$(srcdir)/sha512.c"
rmd160.o: $(srcdir)/rmd160.c $(srcdir)/rmd160.h
- $(CC) -o rmd160.o -c $(srcdir)/rmd160.c
+ $(CC) -o rmd160.o -c "$(srcdir)/rmd160.c"
clean:
rm -f *.o aespipe test-file[12345] config.log config.status configure.lineno
- rm -f -r test-dir1 autom4te.cache
+ rm -f -r test-dir1 "$(srcdir)/autom4te.cache"
distclean: clean
rm -f Makefile
@@ -51,12 +54,16 @@ install: aespipe
mkdir -p "$(DESTDIR)@bindir@"
rm -f "$(DESTDIR)@bindir@/aespipe"
cp aespipe "$(DESTDIR)@bindir@/aespipe"
+ $(INSTALL_STRIP) "$(DESTDIR)@bindir@/aespipe"
chmod 0755 "$(DESTDIR)@bindir@/aespipe"
mkdir -p "$(DESTDIR)@mandir@/man1"
rm -f "$(DESTDIR)@mandir@/man1/aespipe.1"
- cp $(srcdir)/aespipe.1 "$(DESTDIR)@mandir@/man1/aespipe.1"
+ cp "$(srcdir)/aespipe.1" "$(DESTDIR)@mandir@/man1/aespipe.1"
chmod 0644 "$(DESTDIR)@mandir@/man1/aespipe.1"
+install-strip:
+ $(MAKE) INSTALL_STRIP=$(STRIP) install
+
tests:
dd if=/dev/zero of=test-file1 bs=1024 count=33
echo 09876543210987654321 >test-file4
@@ -104,4 +111,4 @@ test-part5:
echo "NO MD5 TEST" >test-file2
echo "NO MD5 TEST" >test-file5
-.PHONY: aespipe x86 i586 amd64 clean distclean install tests test-part2 test-part3 test-part4 test-part5
+.PHONY: aespipe x86 i586 amd64 clean distclean install install-strip tests test-part2 test-part3 test-part4 test-part5
-
Linux-crypto: cryptography in and on the Linux system
Archive: http://mail.nl.linux.org/linux-crypto/