ports/devel/ocaml-lacaml/files/patch-src_config_discover.ml
Piotr Kubaj 8b99d6dd08 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)
2024-12-31 14:59:45 +01:00

11 lines
455 B
OCaml

--- 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