Skip to content

Commit 30ae47b

Browse files
Nicolas Pitregitster
authored andcommitted
remove ARM and Mozilla SHA1 implementations
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]>
1 parent e9c5dcd commit 30ae47b

File tree

9 files changed

+11
-526
lines changed

9 files changed

+11
-526
lines changed

Makefile

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ all::
1616
# when attempting to read from an fopen'ed directory.
1717
#
1818
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
19-
# This also implies MOZILLA_SHA1.
19+
# This also implies BLK_SHA1.
2020
#
2121
# Define NO_CURL if you do not have libcurl installed. git-http-pull and
2222
# git-http-push are not built, and you cannot use http:// and https://
@@ -91,14 +91,6 @@ all::
9191
# Define PPC_SHA1 environment variable when running make to make use of
9292
# a bundled SHA1 routine optimized for PowerPC.
9393
#
94-
# Define ARM_SHA1 environment variable when running make to make use of
95-
# a bundled SHA1 routine optimized for ARM.
96-
#
97-
# Define MOZILLA_SHA1 environment variable when running make to make use of
98-
# a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast
99-
# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default
100-
# choice) has very fast version optimized for i586.
101-
#
10294
# Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
10395
#
10496
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
@@ -926,10 +918,6 @@ else
926918
NO_PTHREADS = YesPlease
927919
endif
928920
endif
929-
ifneq (,$(findstring arm,$(uname_M)))
930-
ARM_SHA1 = YesPlease
931-
NO_MKSTEMPS = YesPlease
932-
endif
933921

934922
-include config.mak.autogen
935923
-include config.mak
@@ -1022,7 +1010,7 @@ ifndef NO_OPENSSL
10221010
endif
10231011
else
10241012
BASIC_CFLAGS += -DNO_OPENSSL
1025-
MOZILLA_SHA1 = 1
1013+
BLK_SHA1 = 1
10261014
OPENSSL_LIBSSL =
10271015
endif
10281016
ifdef NEEDS_SSL_WITH_CRYPTO
@@ -1178,21 +1166,11 @@ else
11781166
ifdef PPC_SHA1
11791167
SHA1_HEADER = "ppc/sha1.h"
11801168
LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
1181-
else
1182-
ifdef ARM_SHA1
1183-
SHA1_HEADER = "arm/sha1.h"
1184-
LIB_OBJS += arm/sha1.o arm/sha1_arm.o
1185-
else
1186-
ifdef MOZILLA_SHA1
1187-
SHA1_HEADER = "mozilla-sha1/sha1.h"
1188-
LIB_OBJS += mozilla-sha1/sha1.o
11891169
else
11901170
SHA1_HEADER = <openssl/sha.h>
11911171
EXTLIBS += $(LIB_4_CRYPTO)
11921172
endif
11931173
endif
1194-
endif
1195-
endif
11961174
ifdef NO_PERL_MAKEMAKER
11971175
export NO_PERL_MAKEMAKER
11981176
endif

arm/sha1.c

Lines changed: 0 additions & 82 deletions
This file was deleted.

arm/sha1.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

arm/sha1_arm.S

Lines changed: 0 additions & 183 deletions
This file was deleted.

block-sha1/sha1.c

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

79
/* this is only to get definitions for memcpy(), ntohl() and htonl() */

block-sha1/sha1.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/*
2-
* Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h),
3-
* optimized to do word accesses rather than byte accesses,
2+
* SHA1 routine optimized to do word accesses rather than byte accesses,
43
* and to avoid unnecessary copies into the context array.
4+
*
5+
* This was initially based on the Mozilla SHA1 implementation, although
6+
* none of the original Mozilla code remains.
57
*/
68

79
typedef struct {

0 commit comments

Comments
 (0)