From 0aba7f910cfdb9bb62dd334ed2c70648ba980d4e Mon Sep 17 00:00:00 2001 From: "Peter P. Lupo" Date: Wed, 22 Jul 2026 17:58:14 -0400 Subject: [PATCH] build: make target microarchitecture configurable via vcpkg triplet Rebased cleanly onto current main: this branch was previously based on the stale master branch instead of main, and a later attempt to resync tangled the branch with unrelated master-only history (a license-text change, changelog/aspell-dictionary updates from real upstream commits, none of which belong on this feature). Rebuilt as a single clean commit containing just the arch-baseline wiring, on top of current main. Add ARCH_TRIPLET/ARCH_MARCH_FLAGS build args (default x64-linux-v2) to build/docker-bake.hcl, build/linux/docker-bake.hcl, and build/linux/build.sh, matching the overlay triplets and Dockerfile wiring in the core and desktop-apps submodules (also rebuilt cleanly onto their current main branches), so a baseline x86-64 build can be produced by anyone who needs it without maintaining a second official toolchain. Signed-off-by: Peter P. Lupo --- build/docker-bake.hcl | 10 ++++++++++ build/linux/build.sh | 8 +++++++- build/linux/docker-bake.hcl | 10 ++++++++++ core | 2 +- desktop-apps | 2 +- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/build/docker-bake.hcl b/build/docker-bake.hcl index 5046e9e..e8bfd08 100644 --- a/build/docker-bake.hcl +++ b/build/docker-bake.hcl @@ -57,6 +57,14 @@ variable "PRODUCT_NAME" { default = "Desktop Editors" } +variable "ARCH_TRIPLET" { + default = "x64-linux-v2" +} + +variable "ARCH_MARCH_FLAGS" { + default = "-march=x86-64-v2" +} + # ────────────────────────────────────────────── # BUILD GROUPS # ────────────────────────────────────────────── @@ -84,6 +92,8 @@ target "_common" { PRODUCT_NAME = "${PRODUCT_NAME}" COMPANY_NAME = "${COMPANY_NAME}" COMPANY_NAME_LOW = "${COMPANY_NAME_LOW}" + ARCH_TRIPLET = "${ARCH_TRIPLET}" + ARCH_MARCH_FLAGS = "${ARCH_MARCH_FLAGS}" } } diff --git a/build/linux/build.sh b/build/linux/build.sh index 9210624..82e8270 100755 --- a/build/linux/build.sh +++ b/build/linux/build.sh @@ -12,8 +12,14 @@ COMPANY_NAME="Euro-Office" PRODUCT_NAME="Desktop Editors" GIT_COMMIT=$(git rev-parse --short HEAD) +# Override to produce a baseline x86-64 build for legacy hardware, e.g.: +# ARCH_TRIPLET=x64-linux-baseline ARCH_MARCH_FLAGS=-march=x86-64 ./build.sh +ARCH_TRIPLET="${ARCH_TRIPLET:-x64-linux-v2}" +ARCH_MARCH_FLAGS="${ARCH_MARCH_FLAGS:--march=x86-64-v2}" + export NEXTCLOUD_USER NEXTCLOUD_PASS REGISTRY TAG PRODUCT_VERSION \ - BUILD_NUMBER BRANDING_DIR COMPANY_NAME PRODUCT_NAME GIT_COMMIT + BUILD_NUMBER BRANDING_DIR COMPANY_NAME PRODUCT_NAME GIT_COMMIT \ + ARCH_TRIPLET ARCH_MARCH_FLAGS docker buildx bake -f ../docker-bake.hcl -f docker-bake.hcl packages \ --set "desktop-linux.contexts.desktop-common=target:desktop-common" \ diff --git a/build/linux/docker-bake.hcl b/build/linux/docker-bake.hcl index 84326aa..07a8a6a 100644 --- a/build/linux/docker-bake.hcl +++ b/build/linux/docker-bake.hcl @@ -57,6 +57,14 @@ variable "PRODUCT_NAME" { default = "Desktop Editors" } +variable "ARCH_TRIPLET" { + default = "x64-linux-v2" +} + +variable "ARCH_MARCH_FLAGS" { + default = "-march=x86-64-v2" +} + # ────────────────────────────────────────────── # BUILD GROUPS # ────────────────────────────────────────────── @@ -81,6 +89,8 @@ target "_common" { PRODUCT_NAME = "${PRODUCT_NAME}" COMPANY_NAME = "${COMPANY_NAME}" COMPANY_NAME_LOW = "${COMPANY_NAME_LOW}" + ARCH_TRIPLET = "${ARCH_TRIPLET}" + ARCH_MARCH_FLAGS = "${ARCH_MARCH_FLAGS}" } } diff --git a/core b/core index fb7bb6a..acaf3a2 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit fb7bb6af7ab4241fe3f80dbc45f07da1ca21218c +Subproject commit acaf3a251d0e3726894c2c6dd94e40171d4bea79 diff --git a/desktop-apps b/desktop-apps index e5f89e2..7b1f0fc 160000 --- a/desktop-apps +++ b/desktop-apps @@ -1 +1 @@ -Subproject commit e5f89e272861a58b395d02f09c5f3df814ab56e4 +Subproject commit 7b1f0fc7a690ea2ef51b7aaafcbf70293a3f377b