git: 8b99d6dd08ab - main - devel/ocaml-lacaml: unbreak build on powerpc* by removing -march=native
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Dec 2024 14:00:39 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8b99d6dd08ab98f13ff4643786516bbfcedc0c04
commit 8b99d6dd08ab98f13ff4643786516bbfcedc0c04
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-12-26 19:44:39 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-12-31 13:59:45 +0000
devel/ocaml-lacaml: unbreak build on powerpc* by removing -march=native
(cd _build/default/src/config && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -O2 -pipe -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -O2 -pipe -fno-strict-aliasing -DEXTERNAL_EXP10 -std=c99 -march=native -O3 -ffast-math -fPIC -DPIC -g -I /usr/local/lib/ocaml -o zdot_is_function_stubs.o -c zdot_is_function_stubs.c)
cc: error: unsupported option '-march=' for target 'powerpc64-unknown-freebsd14.2'
File "src/config/dune", line 24, characters 11-34:
24 | (names zdot_is_procedure_stubs zdot_is_function_stubs)
^^^^^^^^^^^^^^^^^^^^^^^
cc src/config/zdot_is_procedure_stubs.o (exit 1)
---
devel/ocaml-lacaml/Makefile | 1 +
devel/ocaml-lacaml/files/patch-src_config_discover.ml | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/devel/ocaml-lacaml/Makefile b/devel/ocaml-lacaml/Makefile
index 0d510ebf80af..4766d5191116 100644
--- a/devel/ocaml-lacaml/Makefile
+++ b/devel/ocaml-lacaml/Makefile
@@ -1,5 +1,6 @@
PORTNAME= lacaml
DISTVERSION= 11.0.10
+PORTREVISION= 1
CATEGORIES= devel
PKGNAMEPREFIX= ocaml-
diff --git a/devel/ocaml-lacaml/files/patch-src_config_discover.ml b/devel/ocaml-lacaml/files/patch-src_config_discover.ml
new file mode 100644
index 000000000000..bbdbac121671
--- /dev/null
+++ b/devel/ocaml-lacaml/files/patch-src_config_discover.ml
@@ -0,0 +1,11 @@
+--- src/config/discover.ml.orig 2024-12-26 19:34:31 UTC
++++ src/config/discover.ml
+@@ -46,7 +46,7 @@ let () =
+ (* -march=native is not supported on Apple ARM64 yet.
+ Its support was introduced in clang >= 15.0.0 *)
+ match maybe_system, maybe_arch with
+- | Some "macosx", Some "arm64"
++ | Some "bsd_elf", _
+ | _, (None | Some ("ppc64" | "ppc64le" | "unknown")) -> shared
+ | _ -> "-march=native" :: shared
+ in