Skip to content

Commit

Permalink
remove ARM and Mozilla SHA1 implementations
Browse files Browse the repository at this point in the history
They are both slower than the new BLK_SHA1 implementation, so it is
pointless to keep them around.

Signed-off-by: Nicolas Pitre <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
Nicolas Pitre authored and gitster committed Aug 18, 2009
1 parent e9c5dcd commit 30ae47b
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 526 deletions.
26 changes: 2 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ all::
# when attempting to read from an fopen'ed directory.
#
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
# This also implies MOZILLA_SHA1.
# This also implies BLK_SHA1.
#
# Define NO_CURL if you do not have libcurl installed. git-http-pull and
# git-http-push are not built, and you cannot use http:// and https://
Expand Down Expand Up @@ -91,14 +91,6 @@ all::
# Define PPC_SHA1 environment variable when running make to make use of
# a bundled SHA1 routine optimized for PowerPC.
#
# Define ARM_SHA1 environment variable when running make to make use of
# a bundled SHA1 routine optimized for ARM.
#
# Define MOZILLA_SHA1 environment variable when running make to make use of
# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast
# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default
# choice) has very fast version optimized for i586.
#
# Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
#
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
Expand Down Expand Up @@ -926,10 +918,6 @@ else
NO_PTHREADS = YesPlease
endif
endif
ifneq (,$(findstring arm,$(uname_M)))
ARM_SHA1 = YesPlease
NO_MKSTEMPS = YesPlease
endif

-include config.mak.autogen
-include config.mak
Expand Down Expand Up @@ -1022,7 +1010,7 @@ ifndef NO_OPENSSL
endif
else
BASIC_CFLAGS += -DNO_OPENSSL
MOZILLA_SHA1 = 1
BLK_SHA1 = 1
OPENSSL_LIBSSL =
endif
ifdef NEEDS_SSL_WITH_CRYPTO
Expand Down Expand Up @@ -1178,21 +1166,11 @@ else
ifdef PPC_SHA1
SHA1_HEADER = "ppc/sha1.h"
LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
else
ifdef ARM_SHA1
SHA1_HEADER = "arm/sha1.h"
LIB_OBJS += arm/sha1.o arm/sha1_arm.o
else
ifdef MOZILLA_SHA1
SHA1_HEADER = "mozilla-sha1/sha1.h"
LIB_OBJS += mozilla-sha1/sha1.o
else
SHA1_HEADER = <openssl/sha.h>
EXTLIBS += $(LIB_4_CRYPTO)
endif
endif
endif
endif
ifdef NO_PERL_MAKEMAKER
export NO_PERL_MAKEMAKER
endif
Expand Down
82 changes: 0 additions & 82 deletions arm/sha1.c

This file was deleted.

23 changes: 0 additions & 23 deletions arm/sha1.h

This file was deleted.

183 changes: 0 additions & 183 deletions arm/sha1_arm.S

This file was deleted.

6 changes: 4 additions & 2 deletions block-sha1/sha1.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
* Based on the Mozilla SHA1 (see mozilla-sha1/sha1.c),
* optimized to do word accesses rather than byte accesses,
* SHA1 routine optimized to do word accesses rather than byte accesses,
* and to avoid unnecessary copies into the context array.
*
* This was initially based on the Mozilla SHA1 implementation, although
* none of the original Mozilla code remains.
*/

/* this is only to get definitions for memcpy(), ntohl() and htonl() */
Expand Down
6 changes: 4 additions & 2 deletions block-sha1/sha1.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/*
* Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h),
* optimized to do word accesses rather than byte accesses,
* SHA1 routine optimized to do word accesses rather than byte accesses,
* and to avoid unnecessary copies into the context array.
*
* This was initially based on the Mozilla SHA1 implementation, although
* none of the original Mozilla code remains.
*/

typedef struct {
Expand Down
Loading

0 comments on commit 30ae47b

Please sign in to comment.