about summary refs log tree commit diff
path: root/crypt/Makefile
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-11-12 15:17:31 -0800
committerDavid S. Miller <davem@davemloft.net>2012-11-13 17:12:45 -0800
commit3a0d900a997f8ade1332b56cd952e44158770491 (patch)
treed9b0b8c117b3f7019476682ac065f8eaf883bba1 /crypt/Makefile
parente27d476a652874ad8556fcdb06d877ebabb3e9c7 (diff)
downloadglibc-3a0d900a997f8ade1332b56cd952e44158770491.tar.gz
glibc-3a0d900a997f8ade1332b56cd952e44158770491.tar.xz
glibc-3a0d900a997f8ade1332b56cd952e44158770491.zip
Add support for sparc cryptographic hash opcodes.
	* crypt/Makefile: Move test targets after toplevel Rules
	inclusion.  Grab any necessary sysdep routines when linking.
	* crypt/md5.c (md5_process_block): Remove define, we will always
	name it __md5_process_block.
	(md5_finish_ctx): Update md5_process_block call.
	(md5_stream): Likewise.
	(md5_process_bytes): Likewise.
	(md5_process_block): Rename to __md5_process_block and move to ...
	* crypt/md5-block.c: ... here.
	* crypt/sha256.c (sha256_process_block): Move to ...
	* crypt/sha256-block.c: ... here.
	* crypt/sha512.c (sha512_process_block): Move to ...
	* crypt/sha512-block.c: ... here.
	* locale/Makefile (CFLAGS-md5.c): Define to add crypt/ to include
	path.
	* sysdeps/sparc/sparc-ifunc.c (sparc_libc_ifunc): Define.
	* sysdeps/sparc/sparc64/multiarch/Makefile
	(libcrypt-sysdep_routines): Add crypto assembler sysdeps when in
	crypt subdir.
	(localedef-aux): Add md5 crypto assembler when in locale subdir.
	* sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Mirror sparc64
	multiarch changes.
	* sysdeps/sparc/sparc64/multiarch/md5-block.c: New file.
	* sysdeps/sparc/sparc64/multiarch/md5-crop.S: New file.
	* sysdeps/sparc/sparc64/multiarch/sha256-block.c: New file.
	* sysdeps/sparc/sparc64/multiarch/sha256-crop.S: New file.
	* sysdeps/sparc/sparc64/multiarch/sha512-block.c: New file.
	* sysdeps/sparc/sparc64/multiarch/sha512-crop.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/multiarch/md5-block.c: New file.
	* sysdeps/sparc/sparc32/sparcv9/multiarch/md5-crop.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-block.c: New
	file.
	* sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-crop.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-block.c: New
	file.
	* sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-crop.S: New file.
Diffstat (limited to 'crypt/Makefile')
-rw-r--r--crypt/Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/crypt/Makefile b/crypt/Makefile
index 3d4f243ed5..54f0021a23 100644
--- a/crypt/Makefile
+++ b/crypt/Makefile
@@ -49,15 +49,21 @@ tests += md5test sha256test sha512test
 # The test md5test-giant uses up to 400 MB of RSS and runs on a fast
 # machine over a minute.
 xtests = md5test-giant
-
-$(objpfx)md5test: $(objpfx)md5.o
-$(objpfx)md5test-giant: $(objpfx)md5.o
-$(objpfx)sha256test: $(objpfx)sha256.o
-$(objpfx)sha512test: $(objpfx)sha512.o
 endif
 
 include ../Rules
 
+ifneq ($(nss-crypt),yes)
+md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
+sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
+sha512-routines := sha512 $(filter sha512%,$(libcrypt-sysdep_routines))
+
+$(objpfx)md5test: $(patsubst %, $(objpfx)%.o,$(md5-routines))
+$(objpfx)md5test-giant: $(patsubst %, $(objpfx)%.o,$(md5-routines))
+$(objpfx)sha256test: $(patsubst %, $(objpfx)%.o,$(sha256-routines))
+$(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines))
+endif
+
 ifeq (yes,$(build-shared))
 $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
 else