>From 0c4697f340655d49c4359261aa460b1b595c633f Mon Sep 17 00:00:00 2001 From: Frank Dittrich Date: Fri, 29 Jun 2012 17:48:09 +0200 Subject: [PATCH] Adjust LDFLAGS for clang targets For non-debug targets reuse the default LDFLAGS, to make sure -s is added and libraries under /usr/local/lib and /usr/local/ssl/lib are preferred (like with other Linux targets) This adds -lz to linux-x86-64-clang (only the 3 other clang targets included -lz) and makes sure all the libraries are specified in the same sequence as for all other Linux targets. For debug targets, don't reuse $(LDFLAGS), because of -s, but use all the -L and -l options from the LDFLAGS in the sequence they are used for the other Linux targets. --- src/Makefile | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index 5595d5d..35e428a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -401,7 +401,7 @@ linux-x86-64-clang: $(MAKE) $(PROJ) \ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o sse-intrinsics.o" \ CFLAGS="-Wall -c -O2 -I/usr/include -msse2 -DHAVE_CRYPT -DHAVE_DL $(HAVE_NSS)" \ - LDFLAGS="-lm -lssl -lcrypto -lcrypt -ldl" \ + LDFLAGS="$(LDFLAGS) -lcrypt -ldl" \ CPP="clang" CC="clang" AS="clang" LD="clang" linux-x86-64-clang-debug: @@ -410,7 +410,7 @@ linux-x86-64-clang-debug: $(MAKE) $(PROJ) \ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o sse-intrinsics.o" \ CFLAGS="-Wall -Wdeclaration-after-statement -c -g -O1 -faddress-sanitizer -I/usr/include -msse2 -DHAVE_CRYPT -DHAVE_DL $(HAVE_NSS)" \ - LDFLAGS="-lm -lssl -lcrypto -lcrypt -ldl -lz -faddress-sanitizer" \ + LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib -lssl -lcrypto -lm -lz -lcrypt -ldl -faddress-sanitizer" \ CPP="clang" CC="clang" AS="clang" LD="clang" linux-x86-64-icc: @@ -573,7 +573,7 @@ linux-x86-clang: $(MAKE) $(PROJ) \ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-sse.o sha1-mmx.o md4-mmx.o md5-mmx.o sse-intrinsics.o" \ CFLAGS="-Wall -c -O2 -I/usr/include -msse2 -DHAVE_CRYPT -DHAVE_DL $(HAVE_NSS)" \ - LDFLAGS="-lm -lssl -lcrypto -lcrypt -ldl -lz" \ + LDFLAGS="$(LDFLAGS) -lcrypt -ldl" \ CPP="clang" CC="clang" AS="clang" LD="clang" linux-x86-clang-debug: @@ -582,7 +582,7 @@ linux-x86-clang-debug: $(MAKE) $(PROJ) \ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-sse.o sha1-mmx.o md4-mmx.o md5-mmx.o sse-intrinsics.o" \ CFLAGS="-Wall -Wdeclaration-after-statement -c -g -O1 -faddress-sanitizer -I/usr/include -msse2 -DHAVE_CRYPT -DHAVE_DL $(HAVE_NSS)" \ - LDFLAGS="-lm -lssl -lcrypto -lcrypt -ldl -lz -faddress-sanitizer" \ + LDFLAGS="-L/usr/local/lib -L/usr/local/ssl/lib -lssl -lcrypto -lm -lz -lcrypt -ldl -faddress-sanitizer" \ CPP="clang" CC="clang" AS="clang" LD="clang" linux-alpha: -- 1.7.7.6