From nobody Wed Oct 25 20:06:26 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SG0LV2wWYz4xyS8; Wed, 25 Oct 2023 20:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SG0LV2LJpz3Syx; Wed, 25 Oct 2023 20:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698264386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IqRRgtx6O6XYXhXGp1/cNV6rbhKStfMtLAGKIjqgK+4=; b=shV6zEs8mlEmIaHhwkPGeO8y2iTwtFVGxf9p/4dn9gFVBa5v9QbvvemtBzE0Cdsr1G4J75 TCz6MTPd7LMcQn4ygvRlYRu1XafyxG48HbeVFoJc2zxWpvbTxVcK+osPLUxejHnzZRj40M qqrsYDFbl/cWRHGaBds0i+Uqrq/oGmDIqE5EU+uQK4pvyNOPBbdJDARd3Tvm8Eetl3JOkL zeRnYF7l9glOWqDpJjPWNwpfd5uI9uCM7uVvqvfHS8tqwR1bgNTP3YAkV953yYZ/Ag6oji ob1ntyk0gGtaGMlMuOe318+Uu0kmlxkmAJeoOAJo+hHfOBZJI86/zItnAMuwwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698264386; a=rsa-sha256; cv=none; b=FuoGPqAJUmCDVY5oaa8xG0C/FJRPjwN6xpdmpj0L29bhxG3mNBFr7Nqd/chy/OHTZGuUPu khLUHH0hFqj0MOCaP2/o9Nl5cUA/ePLL6y5omX0qAA+6YsPx2P5jEy+zsmWI5vTDmyI1v3 wZfppQP0nULeSFR7FYIPAh7qMZxjB6t7ZKpuMP/yj/5QSy4KoCYgIPOPSlNJ2FVt4W67Dt UAqDFYElPUgNv34L3tgxlgdW2F+0QHmcO5uVO9eRojZtyHtlf5yXAOV4mS2CiOwFt+T1Bi o9Of4HYor4WHfzJSkjlef/ZvMkJWzBqbC42pvUR66l0wNF2WjjEsIVjTwODsPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698264386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IqRRgtx6O6XYXhXGp1/cNV6rbhKStfMtLAGKIjqgK+4=; b=Qege0VI4eOJAw3vd/6dUgciMEsIiQBz765Ql83KHTSTMFwxu2pPlnUT/pT5woLzs+D0ZSm x8XsCblxwKI4FR1mHdHyAz5wd9/eykb3Hk3WiYNHFAQoZ8MhzeUqWubffDST3bBS+EnxGc +MAgDWxboxyiapL7plluq63Y3XjQhgtBeZ/N3VTgHeGRKNimNPlc+GATHo7F1rMPVi80V3 JbjG7nih0y1UaOoKK/Hvn0jGv7bqXOHWD3ecyVgVUTJQKbtUjFmd8kbjl4i2HDiUJTScTL c6BRgEXsQtO6s6vUNH+KNq71rAqxHC0gEcv41QrnnX9QILqI+ZZPqfnqRb1oYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SG0LV1Q1tz1HFM; Wed, 25 Oct 2023 20:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39PK6Qik039872; Wed, 25 Oct 2023 20:06:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39PK6QF1039869; Wed, 25 Oct 2023 20:06:26 GMT (envelope-from git) Date: Wed, 25 Oct 2023 20:06:26 GMT Message-Id: <202310252006.39PK6QF1039869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c66ae0b4e658 - releng/14.0 - libcrypto: Refactor Makefile.asm so it can be run outside of buildenv List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c66ae0b4e65809941ce2d2a1ad5c1c896a03ac93 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c66ae0b4e65809941ce2d2a1ad5c1c896a03ac93 commit c66ae0b4e65809941ce2d2a1ad5c1c896a03ac93 Author: John Baldwin AuthorDate: 2023-08-29 21:39:36 +0000 Commit: Ed Maste CommitDate: 2023-10-25 19:55:55 +0000 libcrypto: Refactor Makefile.asm so it can be run outside of buildenv Currently Makefile.asm relies on the current buildenv to set CFLAGS for i386. The current approach also leaves various temporary *.s files around in the current directory. To make this a bit better: - Instead of using CFLAGS from buildenv for i386, define the actual flags the perl scripts need: -DOPENSSL_IA32_SSE2 to enable SSE2. - Change i386 to have the perl scripts write to /dev/stdout to avoid creating temporaries. Previously i386 was generating the temporary files in the OpenSSL contrib src. - Cleanup temporary *.s files in the all target after generating the real *.S files for architectures which need them. - Remove a duplicate rule for aes-armv4.S. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41589 (cherry picked from commit c0fe6b9d7506d6ce6f9ec3688ee0cc5656a8707e) (cherry picked from commit 14dc723496c1b2244a2b2ce29f9fd754494f4eea) Approved by: re (gjb) --- secure/lib/libcrypto/Makefile.asm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.asm b/secure/lib/libcrypto/Makefile.asm index 0ee8c17369e9..d3243e5b20b8 100644 --- a/secure/lib/libcrypto/Makefile.asm +++ b/secure/lib/libcrypto/Makefile.asm @@ -45,8 +45,9 @@ SRCS+= keccak1600-armv8.pl sha1-armv8.pl sha512-armv8.pl ASM= ${SRCS:R:S/$/.S/} sha256-armv8.S all: ${ASM} + rm -f ${ASM:R:S/$/.s/} -CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} sha256-armv8.s +CLEANFILES= ${ASM} .SUFFIXES: .pl sha256-armv8.S: sha512-armv8.pl @@ -125,8 +126,9 @@ SHA_TMP= ${SHA_ASM:S/$/.s/} ASM= ${SRCS:R:S/$/.S/} ${SHA_ASM:S/$/.S/} all: ${ASM} + rm -f ${SHA_TMP} -CLEANFILES= ${ASM} ${SHA_ASM:S/$/.s/} +CLEANFILES= ${ASM} .SUFFIXES: .pl .pl.S: @@ -179,17 +181,14 @@ SRCS+= poly1305-armv4.pl # sha SRCS+= keccak1600-armv4.pl sha1-armv4-large.pl sha256-armv4.pl sha512-armv4.pl -ASM= aes-armv4.S ${SRCS:R:S/$/.S/} +ASM= ${SRCS:R:S/$/.S/} all: ${ASM} + rm -f ${ASM:R:S/$/.s/} -CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} +CLEANFILES= ${ASM} .SUFFIXES: .pl -aes-armv4.S: aes-armv4.pl - ( echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T}. */' ;\ - env CC=cc perl ${.ALLSRC} linux32 ) > ${.TARGET} - .pl.S: env CC=cc perl ${.IMPSRC} linux32 ${.TARGET:R:S/$/.s/} ( echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T}. */' ;\ @@ -217,6 +216,7 @@ aes-armv4.S: aes-armv4.pl ${LCRYPTO_SRC}/engines/asm #PERLPATH= -I${LCRYPTO_SRC}/crypto/des/asm -I${LCRYPTO_SRC}/crypto/perlasm +CFLAGS= -DOPENSSL_IA32_SSE2 # cpuid SRCS= x86cpuid.pl @@ -276,17 +276,15 @@ ASM= ${SRCS:R:S/$/.S/} all: ${ASM} -CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} +CLEANFILES= ${ASM} .SUFFIXES: .pl .pl.S: ( echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T}. */' ;\ echo '#ifdef PIC' ;\ - env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} -fpic -DPIC ${.IMPSRC:R:S/$/.s/} ;\ - cat ${.IMPSRC:R:S/$/.s/} ;\ + env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} -fpic /dev/stdout ;\ echo '#else' ;\ - env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} ${.IMPSRC:R:S/$/.s/} ;\ - cat ${.IMPSRC:R:S/$/.s/} ;\ + env CC=cc perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} /dev/stdout ;\ echo '#endif' ) > ${.TARGET} .elif defined(ASM_powerpc) @@ -325,6 +323,7 @@ SRCS+= poly1305-ppc.pl poly1305-ppcfp.pl ASM= ${SRCS:R:S/$/.S/} bn-ppc.S sha256-ppc.S sha256p8-ppc.S all: ${ASM} + rm -f ${ASM:R:S/$/.s/} CLEANFILES= ${ASM} .SUFFIXES: .pl @@ -392,6 +391,7 @@ SRCS+= keccak1600-ppc64.pl ASM= ${SRCS:R:S/$/.S/} bn-ppc.S sha256-ppc.S sha256p8-ppc.S all: ${ASM} + rm -f ${ASM:R:S/$/.s/} CLEANFILES= ${ASM} .SUFFIXES: .pl @@ -459,6 +459,7 @@ SRCS+= keccak1600-ppc64.pl ASM= ${SRCS:R:S/$/.S/} bn-ppc.S sha256-ppc.S sha256p8-ppc.S all: ${ASM} + rm -f ${ASM:R:S/$/.s/} CLEANFILES= ${ASM} .SUFFIXES: .pl