From nobody Tue May 03 15:15:05 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 5EB491ACCFEA for ; Tue, 3 May 2022 15:15:15 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 4Kt3Rj70jnz4TtX for ; Tue, 3 May 2022 15:15:13 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f53.google.com with SMTP id x18so23866561wrc.0 for ; Tue, 03 May 2022 08:15:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b/V/VKHMvvai2R5uVDA3vGph9QPgP2iD43wG1bmpHuM=; b=uNpaxTIDHFPx9TTYd2325BD71YUlzTWx1LsBCvATL2B3wBYxRgd+eUzCCoL0QS3eY/ 9wgc6AR/9dLit+frsLeDdfqh/9NvzuN4uDrRWXrU25Zf7nehhyoKmNbe+H9ka2V72/Lh w6CBCqfijIEa3mrU+ro+YSbUhXRGWTV0Z3L0yaxNGYO2CYa/8axFTxv/FmfJOS0vPG5j ghd6k8rVKtCe2ec8Pqf3Im3nqTpLQSVYcPvGgUahIv0kspgcr/qARbvscvtG9CEyO+xy COOdqYC7Ek+wHu1oeyM/wSF24Oebi4s17LAmP4KcAwFkNkpWVoxaeflXdUEKEflVCMAf NXQA== X-Gm-Message-State: AOAM532jjtAPDsLv+ZVjArnvi5rlef8sROUO9DZODRW4fwamyszPDZ0x 7vSMR8EtBG192b32lm8C2BH5lA== X-Google-Smtp-Source: ABdhPJy92VR+YO4ZCn1GkaR5E4jt6VFaVwNYdMAFj0u25EwbB21R1IdPnVgCRGwptZ1JcZ3oNqT9JQ== X-Received: by 2002:a5d:51ce:0:b0:20c:55a8:69e with SMTP id n14-20020a5d51ce000000b0020c55a8069emr12240836wrv.380.1651590906657; Tue, 03 May 2022 08:15:06 -0700 (PDT) Received: from smtpclient.apple (global-5-141.nat-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id q10-20020a1cf30a000000b003942a244ee9sm1765847wmq.46.2022.05.03.08.15.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2022 08:15:06 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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: f9ee4156741a - main - build target triple variable from sys/conf/newvers.sh From: Jessica Clarke In-Reply-To: <202205031116.243BGSpf047743@gitrepo.freebsd.org> Date: Tue, 3 May 2022 16:15:05 +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: <6BD23371-3545-4E21-B110-9FF218132596@freebsd.org> References: <202205031116.243BGSpf047743@gitrepo.freebsd.org> To: Alfredo Dal'Ava Junior X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Rspamd-Queue-Id: 4Kt3Rj70jnz4TtX 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.53 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.27 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.77)[-0.772]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.53:from]; MLMMJ_DEST(0.00)[dev-commits-src-main]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.53:from]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 3 May 2022, at 12:16, Alfredo Dal'Ava Junior = wrote: >=20 > The branch main has been updated by alfredo: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df9ee4156741a205c93ae947595b5c487= 17107d9e >=20 > commit f9ee4156741a205c93ae947595b5c48717107d9e > Author: Alfredo Dal'Ava Junior > AuthorDate: 2022-05-03 11:09:38 +0000 > Commit: Alfredo Dal'Ava Junior > CommitDate: 2022-05-03 11:09:38 +0000 >=20 > build target triple variable from sys/conf/newvers.sh >=20 > Retrieve FreeBSD revision number directly from sys/conf/newvers.sh > when building the compiler target triple value, avoiding manual > intervention on other files every new release. >=20 > Reviewed by: imp > MFC after: 2 months > Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) > Differential Revision: https://reviews.freebsd.org/D34429 > --- > Makefile.inc1 | 4 ++-- > lib/clang/llvm.build.mk | 9 ++++++--- > share/mk/bsd.compat.mk | 4 ++-- > share/mk/src.sys.env.mk | 5 +++++ > 4 files changed, 15 insertions(+), 7 deletions(-) >=20 > diff --git a/Makefile.inc1 b/Makefile.inc1 > index 2b913e4e51f8..e3081594ec77 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -138,9 +138,9 @@ TARGET_ABI=3D gnueabi > .endif > .endif > MACHINE_ABI?=3D unknown > = -MACHINE_TRIPLE?=3D${MACHINE_ARCH:S/amd64/x86_64/:C/sf$//}-${MACHINE_ABI}-= freebsd14.0 > = +MACHINE_TRIPLE?=3D${MACHINE_ARCH:S/amd64/x86_64/:C/sf$//}-${MACHINE_ABI}-= freebsd${OS_REVISION} > TARGET_ABI?=3D unknown > -TARGET_TRIPLE?=3D = ${TARGET_ARCH:S/amd64/x86_64/:C/sf$//}-${TARGET_ABI}-freebsd14.0 > +TARGET_TRIPLE?=3D = ${TARGET_ARCH:S/amd64/x86_64/:C/sf$//}-${TARGET_ABI}-freebsd${OS_REVISION}= > KNOWN_ARCHES?=3D aarch64/arm64 \ > amd64 \ > armv6/arm \ > diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk > index 5aff7081fb76..dd54bf7312d9 100644 > --- a/lib/clang/llvm.build.mk > +++ b/lib/clang/llvm.build.mk > @@ -14,6 +14,10 @@ > .error Please define SRCDIR before including this file > .endif >=20 > +.ifndef OS_REVISION > +.error Please define OS_REVISION before including this file > +.endif > + > .PATH: ${LLVM_BASE}/${SRCDIR} >=20 > CFLAGS+=3D -I${SRCTOP}/lib/clang/include > @@ -40,10 +44,9 @@ TARGET_ABI=3D -gnueabi > TARGET_ABI=3D > .endif > VENDOR=3D unknown > -OS_VERSION=3D freebsd14.0 >=20 > -LLVM_TARGET_TRIPLE?=3D = ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS= _VERSION}${TARGET_ABI} > -LLVM_BUILD_TRIPLE?=3D = ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_= VERSION} > +LLVM_TARGET_TRIPLE?=3D = ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-free= bsd${OS_REVISION}${TARGET_ABI} > +LLVM_BUILD_TRIPLE?=3D = ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freeb= sd${OS_REVISION} >=20 > CFLAGS+=3D -DLLVM_DEFAULT_TARGET_TRIPLE=3D\"${LLVM_TARGET_TRIPLE}\" > CFLAGS+=3D -DLLVM_HOST_TRIPLE=3D\"${LLVM_BUILD_TRIPLE}\" > diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk > index 6a7d3d3c7e80..e99281775b84 100644 > --- a/share/mk/bsd.compat.mk > +++ b/share/mk/bsd.compat.mk > @@ -30,7 +30,7 @@ LIB32CPUFLAGS=3D -march=3D${COMPAT_CPUTYPE} > .endif > .if ${COMPAT_COMPILER_TYPE} =3D=3D gcc > .else > -LIB32CPUFLAGS+=3D -target x86_64-unknown-freebsd14.0 > +LIB32CPUFLAGS+=3D -target x86_64-unknown-freebsd${OS_REVISION} > .endif > LIB32CPUFLAGS+=3D -m32 > LIB32_MACHINE=3D i386 > @@ -51,7 +51,7 @@ LIB32CPUFLAGS=3D -mcpu=3D${COMPAT_CPUTYPE} > .if ${COMPAT_COMPILER_TYPE} =3D=3D "gcc" > LIB32CPUFLAGS+=3D -m32 > .else > -LIB32CPUFLAGS+=3D -target powerpc-unknown-freebsd14.0 > +LIB32CPUFLAGS+=3D -target powerpc-unknown-freebsd${OS_REVISION} > .endif >=20 > LIB32_MACHINE=3D powerpc > diff --git a/share/mk/src.sys.env.mk b/share/mk/src.sys.env.mk > index 6f11489bfd2f..86f739414230 100644 > --- a/share/mk/src.sys.env.mk > +++ b/share/mk/src.sys.env.mk > @@ -23,6 +23,11 @@ RELTOP?=3D ${RELDIR:C,[^/]+,..,g} > RELOBJTOP?=3D ${RELTOP} > RELSRCTOP?=3D ${RELTOP} >=20 > +.if !defined(OS_REVISION) > +OS_REVISION!=3Deval `sh ${SRCTOP}/sys/conf/newvers.sh -V REVISION` && = echo $$REVISION || echo In what situation would you ever want the version to silently be omitted on error, rather than stopping the build? Jess > +.export OS_REVISION > +.endif > + > # site customizations that do not depend on anything! >=20 > # Save MAKEOBJDIRPREFIX and don't let src-env.conf modify it.