From nobody Sun Jan 7 23:08:03 2024 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 4T7Xsv61Qnz56Dqd; Sun, 7 Jan 2024 23:08:03 +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 4T7Xsv5PMkz4PDk; Sun, 7 Jan 2024 23:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668883; 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=nWPZs3GoS4Trnwp0FJ30p41Sd/b0zP4LuzmfJt5C2t0=; b=bFchWI3PhLoOA7EWEtjVzc0hXWd7kjCQH7Q19gfIgLXeVBZB+ishmMiFPwQ0FZvzbYYHAn N8EySaaBcJj6NC7rzukoLd6zOUNJQQS+6Ndcu5govc48aRP+gy5hQJwz55POU+p8FCsZdm QY57MoSSx+OPh+yBtBrs6mF8A8e0561qPRQ0VVA7DZhcwVUBjN1pKcHzWM/MPSR5ZDRty4 f5pwFVJT+olV8U35jiMNq73tkE5RdgGOF20VY3hzrEmTd4q/1eoWWYlktlwxkDYpkFOQda vMny48I4yaSQAuc9kEnLxR96PhrZ6wdozmQwoyIkNadeOeYHmI/nOUzSnC0WzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704668883; 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=nWPZs3GoS4Trnwp0FJ30p41Sd/b0zP4LuzmfJt5C2t0=; b=TDepk/6WW/RLBn++OpYv09FMii9NQK2uvc0wIyEPWdszX3JfvkkgdCUSA1U+31/g9gFY0p xVOcI6k6LCWGgbBnzTnGI2US3033vflzG8jvV38KZDtLdVsy1wIpCFECz6SQ9QgSX1l0a9 3XPy1s6d1tNYjTBZU8HjFJeiYP9Skizs9u0EUiUYTFPcr+mQrWOvtEQSX4lCNf57/59OMy IxqV0Im1YCO0LhVZ9XFe0E5AO3H/OJJlpQMeS8Be7GzM0pcZiqZJP6lV7OZtv1QKlX9YJQ ivP7EPyjZGs6Aym+5rvhhCtZbWfJWBDByxYKijGwW59hVH/RhbjlsZrqoPphMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704668883; a=rsa-sha256; cv=none; b=dCwiM9RJo6X04/NnOLvTkS5xpD7+ohChMR3K+yUoYgSST/4DHtcYNm2Ded5UFFr6DQeslo igmTGPr7ZyDH6judy1BCto/X+SF+xR3sSznQfcj0dtkB2LRcuB7H217eAjIdDWGS9s52hd uC5SvonUe/o5nONTYZN9fvQHaSyzGPDrj25Ji5zfVTJlLvguK7IaCwbS/8c+jTmnYW8OTC CKE5MH7hvGb9o726vjzVgV0VdyKRe7kk+9yeNGFH6Sgg28knbnFNVw3d5xsfwxonfj711a /MT8FB/E5zyKAtkNpMAOREDQYTV9h2O4rxfmq0TSuAAm8PwbDSoy6+USYPyZLQ== 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 4T7Xsv4M7wzk7Q; Sun, 7 Jan 2024 23:08:03 +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 407N83Lb052790; Sun, 7 Jan 2024 23:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407N83Hx052787; Sun, 7 Jan 2024 23:08:03 GMT (envelope-from git) Date: Sun, 7 Jan 2024 23:08:03 GMT Message-Id: <202401072308.407N83Hx052787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f252e69e93d1 - stable/13 - build target triple variable from sys/conf/newvers.sh 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f252e69e93d10e5b8c51ba7c99c88e98be2c1c56 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f252e69e93d10e5b8c51ba7c99c88e98be2c1c56 commit f252e69e93d10e5b8c51ba7c99c88e98be2c1c56 Author: Alfredo Dal'Ava Junior AuthorDate: 2022-05-03 11:09:38 +0000 Commit: Dimitry Andric CommitDate: 2024-01-07 23:04:32 +0000 build target triple variable from sys/conf/newvers.sh 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. Reviewed by: imp MFC after: 2 months Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D34429 (cherry picked from commit f9ee4156741a205c93ae947595b5c48717107d9e) --- Makefile.inc1 | 4 ++-- lib/clang/llvm.build.mk | 9 ++++++--- share/mk/bsd.compat.mk | 8 ++++---- share/mk/src.sys.env.mk | 5 +++++ 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 42707c3ccfbc..948332a80043 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -136,9 +136,9 @@ TARGET_ABI= gnueabi .endif .endif MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd13.2 +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd${OS_REVISION} TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd13.2 +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd${OS_REVISION} KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ armv6/arm \ diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index 4ee9e8d5d63b..45a779584e74 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -13,6 +13,10 @@ .error Please define SRCDIR before including this file .endif +.ifndef OS_REVISION +.error Please define OS_REVISION before including this file +.endif + .PATH: ${LLVM_BASE}/${SRCDIR} CFLAGS+= -I${SRCTOP}/lib/clang/include @@ -43,10 +47,9 @@ TARGET_ABI= -gnueabi TARGET_ABI= .endif VENDOR= unknown -OS_VERSION= freebsd13.2 -LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} -LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION} +LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION}${TARGET_ABI} +LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION} CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${LLVM_TARGET_TRIPLE}\" CFLAGS+= -DLLVM_HOST_TRIPLE=\"${LLVM_BUILD_TRIPLE}\" diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk index 1cb6ab9567c9..ef485b843f99 100644 --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -29,7 +29,7 @@ LIB32CPUFLAGS= -march=${COMPAT_CPUTYPE} .endif .if ${COMPAT_COMPILER_TYPE} == gcc .else -LIB32CPUFLAGS+= -target x86_64-unknown-freebsd13.2 +LIB32CPUFLAGS+= -target x86_64-unknown-freebsd${OS_REVISION} .endif LIB32CPUFLAGS+= -m32 LIB32_MACHINE= i386 @@ -50,7 +50,7 @@ LIB32CPUFLAGS= -mcpu=${COMPAT_CPUTYPE} .if ${COMPAT_COMPILER_TYPE} == "gcc" LIB32CPUFLAGS+= -m32 .else -LIB32CPUFLAGS+= -target powerpc-unknown-freebsd13.2 +LIB32CPUFLAGS+= -target powerpc-unknown-freebsd${OS_REVISION} .endif LIB32_MACHINE= powerpc @@ -68,9 +68,9 @@ LIB32CPUFLAGS= -march=${COMPAT_CPUTYPE} .endif .else .if ${COMPAT_ARCH:Mmips64el*} != "" -LIB32CPUFLAGS= -target mipsel-unknown-freebsd13.2 +LIB32CPUFLAGS= -target mipsel-unknown-freebsd${OS_REVISION} .else -LIB32CPUFLAGS= -target mips-unknown-freebsd13.2 +LIB32CPUFLAGS= -target mips-unknown-freebsd${OS_REVISION} .endif .endif LIB32CPUFLAGS+= -mabi=32 diff --git a/share/mk/src.sys.env.mk b/share/mk/src.sys.env.mk index 0a7f8ea800cc..c857972e47c4 100644 --- a/share/mk/src.sys.env.mk +++ b/share/mk/src.sys.env.mk @@ -22,6 +22,11 @@ RELTOP?= ${RELDIR:C,[^/]+,..,g} RELOBJTOP?= ${RELTOP} RELSRCTOP?= ${RELTOP} +.if !defined(OS_REVISION) +OS_REVISION!=eval `sh ${SRCTOP}/sys/conf/newvers.sh -V REVISION` && echo $$REVISION || echo +.export OS_REVISION +.endif + # site customizations that do not depend on anything! # Save MAKEOBJDIRPREFIX and don't let src-env.conf modify it.