From nobody Fri Sep 09 07:05:09 2022 X-Original-To: dev-commits-src-main@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 4MP6Sm21VRz4bxQm for ; Fri, 9 Sep 2022 07:05:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MP6Sl1hrSz3Dgl for ; Fri, 9 Sep 2022 07:05:11 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f46.google.com with SMTP id e20so1132900wri.13 for ; Fri, 09 Sep 2022 00:05:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=rq4gPoYPBc2/B9+Z94WPlRfTsnz+lvMwYB6YjcWxk5s=; b=qomOs6y28CPWq95YibOVvXbi84CKoHNrCkpKgBzfJsKtEMqcqiYvZv1BnUr4G5iMAB DZMD38OjVCLuhJTDZpNZEMTQlVUxSa199e7F5DNNXKsE6fwmPdmUeXHxbMpUxbQEOAsu lWj3ay2kr1lOKC1TrTJQoicJO3wWWjOEn3j4GQC+rbTxnlrIPzkRDnmZiMPS0EsCtPI0 U4bzXBTcoD1Ny8MYzjKREP6BHioZlYs0QNSV5go7xGlypOsN/r7F50egF8+5VHkywh/E FYBtafsabUripNuti/uzFIhnZsFOTUdQTNJ/FO1uuBN3gjSkQovbD3L0F7V3VeTUHQ4e B4/A== X-Gm-Message-State: ACgBeo3z6yqlZP8rmzJ0L55qtLzG8LEPhUkbVVN/hVZsLJdv/0ifwszl FGKmPGexb1xTTAOPrEjr5/ypzA== X-Google-Smtp-Source: AA6agR6IcVwV1uEjv+ysWOBqg+AyOwUNkCqVK0CkUAhqTtaUxhMePm7vSA4b1sytlTHEwTYfKgvwQQ== X-Received: by 2002:a5d:618a:0:b0:228:a5a6:fb4a with SMTP id j10-20020a5d618a000000b00228a5a6fb4amr6943467wru.234.1662707110203; Fri, 09 Sep 2022 00:05:10 -0700 (PDT) Received: from smtpclient.apple (global-5-141.n-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id f13-20020a05600c154d00b003a60ff7c082sm5922986wmg.15.2022.09.09.00.05.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2022 00:05:09 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: git: 20adba8bc1be - main - src.conf: Introduce WITHOUT_MACHDEP knob. From: Jessica Clarke In-Reply-To: <9643117A-FF55-4805-AF90-9AB217159447@freebsd.org> Date: Fri, 9 Sep 2022 08:05:09 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <2E1A4499-6DCF-474F-B535-06D00B47F2FD@freebsd.org> References: <202209090654.2896sZ0S067358@gitrepo.freebsd.org> <9643117A-FF55-4805-AF90-9AB217159447@freebsd.org> To: Gleb Popov X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Rspamd-Queue-Id: 4MP6Sl1hrSz3Dgl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.46 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.46:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.46:from] X-ThisMailContainsUnwantedMimeParts: N On 9 Sept 2022, at 07:58, Jessica Clarke wrote: >=20 > On 9 Sept 2022, at 07:54, Gleb Popov wrote: >>=20 >> The branch main has been updated by arrowd (ports committer): >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D20adba8bc1beb125d5e5ed8f12e747ae= 79ca6a10 >>=20 >> commit 20adba8bc1beb125d5e5ed8f12e747ae79ca6a10 >> Author: Gleb Popov >> AuthorDate: 2022-08-08 15:16:00 +0000 >> Commit: Gleb Popov >> CommitDate: 2022-09-09 06:54:28 +0000 >>=20 >> src.conf: Introduce WITHOUT_MACHDEP knob. >=20 > This differs from what you actually did. >=20 >> Summary: >> This knob can be used to make buildsystem prefer generic C = implentations of >> various functions, instead of machine-specific assembler ones. >>=20 >> Test Plan: `make buildworld` on amd64 >>=20 >> Reviewed by: imp, emaste >>=20 >> Differential Revision: https://reviews.freebsd.org/D36076 >>=20 >> MFC after: 3 days >=20 > This is not the right format for commit messages. >=20 >> --- >> lib/libc/Makefile | 2 +- >> lib/libmd/Makefile | 2 +- >> lib/msun/Makefile | 2 +- >> share/man/man5/src.conf.5 | 2 ++ >> share/mk/src.opts.mk | 1 + >> tools/build/options/WITHOUT_MACHDEP_OPTIMIZATIONS | 1 + >> 6 files changed, 7 insertions(+), 3 deletions(-) >>=20 >> diff --git a/lib/libc/Makefile b/lib/libc/Makefile >> index 3667eea15307..a221a5a66c19 100644 >> --- a/lib/libc/Makefile >> +++ b/lib/libc/Makefile >> @@ -162,7 +162,7 @@ CFLAGS+=3D -DSYMBOL_VERSIONING >>=20 >> # If there are no machine dependent sources, append all the >> # machine-independent sources: >> -.if empty(MDSRCS) >> +.if empty(MDSRCS) || ${MK_MACHDEP_OPTIMIZATIONS} =3D=3D no >=20 > These all have _OPTIMIZATIONS. >=20 >> SRCS+=3D ${MISRCS} >> .else >> # Append machine-dependent sources, then append machine-independent = sources >> diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile >> index c98c33bae3f5..8d3a05279004 100644 >> --- a/lib/libmd/Makefile >> +++ b/lib/libmd/Makefile >> @@ -103,7 +103,7 @@ CFLAGS.skein_block.c+=3D -DSKEIN_LOOP=3D995 >> .PATH: ${SRCTOP}/sys/crypto/skein = ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} >>=20 >> USE_ASM_SOURCES?=3D1 >> -.if defined(BOOTSTRAPPING) >> +.if defined(BOOTSTRAPPING) || ${MK_MACHDEP_OPTIMIZATIONS} =3D=3D no >> # Don't build ASM sources when bootstrapping to avoid toolchain = dependencies >> USE_ASM_SOURCES:=3D0 >> .endif >> diff --git a/lib/msun/Makefile b/lib/msun/Makefile >> index 2382a9ae3fdb..e65e9401cdbf 100644 >> --- a/lib/msun/Makefile >> +++ b/lib/msun/Makefile >> @@ -151,7 +151,7 @@ COMMON_SRCS+=3D catrig.c catrigf.c \ >> #COMMON_SRCS+=3D s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c >>=20 >> # Exclude the generic versions of what we provide in the MD area. >> -.if defined(ARCH_SRCS) >> +.if defined(ARCH_SRCS) && ${MK_MACHDEP_OPTIMIZATIONS} !=3D no >> .for i in ${ARCH_SRCS} >> COMMON_SRCS:=3D ${COMMON_SRCS:N${i:R}.c} >> .endfor Also is this correct for 32-bit Arm? It has fenv-softfp.c and fenv-vfp.c in ARCH_SRCS which makes me nervous. Jess >> diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 >> index 36fb474b6597..0ccdfa6cd49c 100644 >> --- a/share/man/man5/src.conf.5 >> +++ b/share/man/man5/src.conf.5 >> @@ -1094,6 +1094,8 @@ and related programs. >> Build >> .Xr ls 1 >> without support for colors to distinguish file types. >> +.It Va WITHOUT_MACHDEP >> +Prefer machine-independent non-assembler code across the code base. >=20 > Except this lacks the suffix, and is clearly not generated from = what=E2=80=99s > in-tree given that=E2=80=99s a WITHOUT_MACHDEP_OPTIMIZATIONS file. >=20 > Also the description is different. >=20 > Jess >=20 >> .It Va WITHOUT_MAIL >> Do not build any mail support (MUA or MTA). >> When set, it enforces these options: >> diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk >> index 4ac61f13cee2..a03b8147ecbb 100644 >> --- a/share/mk/src.opts.mk >> +++ b/share/mk/src.opts.mk >> @@ -142,6 +142,7 @@ __DEFAULT_YES_OPTIONS =3D \ >> LOCATE \ >> LPR \ >> LS_COLORS \ >> + MACHDEP_OPTIMIZATIONS \ >> MAIL \ >> MAILWRAPPER \ >> MAKE \ >> diff --git a/tools/build/options/WITHOUT_MACHDEP_OPTIMIZATIONS = b/tools/build/options/WITHOUT_MACHDEP_OPTIMIZATIONS >> new file mode 100644 >> index 000000000000..1c596c998504 >> --- /dev/null >> +++ b/tools/build/options/WITHOUT_MACHDEP_OPTIMIZATIONS >> @@ -0,0 +1 @@ >> +Prefer machine-independent non-assembler code in libc and libm.