Home | History | Annotate | Line # | Download | only in x86_64
      1  1.1  christos #	$NetBSD: Makefile,v 1.1 2025/07/17 14:25:37 christos Exp $
      2  1.1  christos 
      3  1.1  christos .include "bsd.own.mk"
      4  1.1  christos 
      5  1.1  christos CRYPTODIST=${NETBSDSRCDIR}/crypto
      6  1.1  christos .include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
      7  1.1  christos 
      8  1.1  christos .if make(regen) && ${HAVE_LLVM:U} == "yes"
      9  1.1  christos CC+= -fno-integrated-as
     10  1.1  christos .endif
     11  1.1  christos 
     12  1.1  christos regen:
     13  1.1  christos 	for i in $$(find ${OPENSSLSRC} -name \*${MACHINE_ARCH}.pl) \
     14  1.1  christos 		$$(find ${OPENSSLSRC} -name \*avx2\*.pl) \
     15  1.1  christos 		$$(find ${OPENSSLSRC} -name \*avx512\*.pl) \
     16  1.1  christos 		$$(find ${OPENSSLSRC} -name \*avxifma\*.pl) \
     17  1.1  christos 		${OPENSSLSRC}/crypto/${MACHINE_ARCH}cpuid.pl ; do \
     18  1.1  christos 		j=$$(basename $$i .pl).S; \
     19  1.1  christos 		case $$j in \
     20  1.1  christos 		(keccak*) \
     21  1.1  christos 		    perl $$i $$j;; \
     22  1.1  christos 		(sha512-x86_64.S) \
     23  1.1  christos 		    perl $$i sha256-x86_64.S; perl $$i sha512-x86_64.S;; \
     24  1.1  christos 		(*) \
     25  1.1  christos 		    (echo "#include <machine/asm.h>"; CC=${CC:Q} perl $$i elf | sed \
     26  1.1  christos 			-e 's/.hidden	OPENSSL_cpuid_setup/.globl	OPENSSL_cpuid_setup/' \
     27  1.1  christos 			-e 's/call	OPENSSL_cpuid_setup/call	PIC_PLT(OPENSSL_cpuid_setup)/' \
     28  1.1  christos 			-e 's/rdseedq/rdseed/') > $$j; \
     29  1.1  christos 		    if [ -f elf ]; then echo $$i; fi;; \
     30  1.1  christos 		esac; \
     31  1.1  christos 	done
     32