Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2026 05:05:22 +0000
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c5c88ac379d0 - main - www/deno: add powerpc64le support
Message-ID:  <6a055812.4442e.2834bb91@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c5c88ac379d0208aee2518ff39ede2d056a1c5b7

commit c5c88ac379d0208aee2518ff39ede2d056a1c5b7
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-05-13 11:48:58 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-05-14 05:05:18 +0000

    www/deno: add powerpc64le support
    
    1. Merge upstream cranelift-codegen patch for unsupported architectures.
    2. Modify BUILD.gn to add freebsd/powerpc64le support.
---
 www/deno/files/patch-build_config_compiler_BUILD.gn      |  9 +++++++++
 www/deno/files/patch-build_toolchain_freebsd_BUILD.gn    |  9 ++++++++-
 ...patch-cargo-crates_cranelift-codegen-0.116.1_build.rs | 16 ++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/www/deno/files/patch-build_config_compiler_BUILD.gn b/www/deno/files/patch-build_config_compiler_BUILD.gn
index 7cf4fb5922ea..70c74495b7e4 100644
--- a/www/deno/files/patch-build_config_compiler_BUILD.gn
+++ b/www/deno/files/patch-build_config_compiler_BUILD.gn
@@ -92,6 +92,15 @@
          cflags += [ "--target=aarch64-linux-gnu" ]
          ldflags += [ "--target=aarch64-linux-gnu" ]
        }
+@@ -1610,7 +1617,7 @@ config("compiler_cpu_abi") {
+           cflags += [ "-maix64" ]
+           ldflags += [ "-maix64" ]
+         }
+-      } else if (is_clang) {
++      } else if (is_clang && !is_bsd) {
+         cflags += [ "--target=powerpc64le-unknown-linux-gnu" ]
+         ldflags += [ "--target=powerpc64le-unknown-linux-gnu" ]
+       } else {
 @@ -1720,7 +1727,7 @@ config("compiler_deterministic") {
        "-file-prefix-map",
        rebase_path("//.", "") + "=" + rebase_path("//.", root_build_dir),
diff --git a/www/deno/files/patch-build_toolchain_freebsd_BUILD.gn b/www/deno/files/patch-build_toolchain_freebsd_BUILD.gn
index fc6714785751..9ee5487c8527 100644
--- a/www/deno/files/patch-build_toolchain_freebsd_BUILD.gn
+++ b/www/deno/files/patch-build_toolchain_freebsd_BUILD.gn
@@ -1,6 +1,6 @@
 --- cargo-crates/v8-147.0.0/build/toolchain/freebsd/BUILD.gn.orig	2022-02-07 13:39:41 UTC
 +++ cargo-crates/v8-147.0.0/build/toolchain/freebsd/BUILD.gn
-@@ -0,0 +1,66 @@
+@@ -0,0 +1,73 @@
 +# Copyright 2013 The Chromium Authors. All rights reserved.
 +# Use of this source code is governed by a BSD-style license that can be
 +# found in the LICENSE file.
@@ -67,3 +67,10 @@
 +    current_os = "freebsd"
 +  }
 +}
++
++clang_toolchain("clang_ppc64") {
++  toolchain_args = {
++    current_cpu = "ppc64"
++    current_os = "freebsd"
++  }
++}
diff --git a/www/deno/files/patch-cargo-crates_cranelift-codegen-0.116.1_build.rs b/www/deno/files/patch-cargo-crates_cranelift-codegen-0.116.1_build.rs
new file mode 100644
index 000000000000..2a65d439355f
--- /dev/null
+++ b/www/deno/files/patch-cargo-crates_cranelift-codegen-0.116.1_build.rs
@@ -0,0 +1,16 @@
+--- cargo-crates/cranelift-codegen-0.116.1/build.rs.orig	2006-07-24 01:21:28 UTC
++++ cargo-crates/cranelift-codegen-0.116.1/build.rs
+@@ -53,9 +53,10 @@ fn main() {
+     if isas.is_empty() || host_isa {
+         // Try to match native target.
+         let target_name = target_triple.split('-').next().unwrap();
+-        let isa = meta::isa_from_arch(&target_name).expect("error when identifying target");
+-        println!("cargo:rustc-cfg=feature=\"{isa}\"");
+-        isas.push(isa);
++        if let Ok(isa) = meta::isa_from_arch(&target_name) {
++            println!("cargo:rustc-cfg=feature=\"{isa}\"");
++            isas.push(isa);
++        }
+     }
+ 
+     let cur_dir = env::current_dir().expect("Can't access current working directory");


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a055812.4442e.2834bb91>