On Tue, Jul 10 2018, Jeremie Courreges-Anglas <[email protected]> wrote:
> On Tue, Jul 10 2018, Mark Kettenis <[email protected]> wrote:
>>> From: Jeremie Courreges-Anglas <[email protected]>
>>> Date: Tue, 10 Jul 2018 12:23:30 +0200
>>>
>>> On Tue, Jul 10 2018, Mark Kettenis <[email protected]> wrote:
>>> > Here is a cleaned-up version of a diff that Dale made to support
>>> > OpenBSD/arm64 in gdb. Single-stepping doesn't work yet, which means
>>> > that stepping through the code doesn't really work. But setting
>>> > breakpoints and inspecting state or looking at core files should work.
>>> >
>>> > I'm not sure what to do with the lang/ocaml comment in the Makefile.
>>>
>>> Please give this diff a try.
>>
>> Builds. Dun't know how to tell if it actually works ;).
>
> You could try:
>
> ocamlobjinfo /usr/local/lib/ocaml/unix.cmxs
>
> If BFD was not detected/used properly,
> /usr/local/lib/ocaml/objinfo_helper would print something like this:
>
> "BFD library unavailable, cannot print info on .cmxs files"
No .cmxs files on arm64 so no easy way to test
/usr/local/lib/ocaml/objinfo_helper , but Mark's tests confirms that BFD
support is indeed compiled in.
I'm not sure there is much point in adding BFD support when OCaml itself
isn't built with .cmxs support on arm64, but this is already what is
done on other architectures that don't support .cmxs, with no known
issue that I know of. So I'd propose the diff below which properly
registers the bdep and WANTLIB entries.
Another alternative would be to force-disable the use of BFD on
non-native-dynlink architectures, if BFD is indeed only useful for .cmxs
files.
Index: lang/ocaml/Makefile
===================================================================
RCS file: /d/cvs/ports/lang/ocaml/Makefile,v
retrieving revision 1.79
diff -u -p -r1.79 Makefile
--- lang/ocaml/Makefile 15 Sep 2017 09:23:12 -0000 1.79
+++ lang/ocaml/Makefile 10 Jul 2018 13:33:45 -0000
@@ -9,7 +9,7 @@ COMMENT-graphics = OCaml Graphics librar
# Do check that the ports that depend on it still work, or repair them.
# Don't forget to bump version in ocaml.port.mk, too!
VERSION= 4.03.0
-REVISION= 2
+REVISION= 3
PKGNAME-main = ocaml-${VERSION}
PKGNAME-graphics = ocaml-graphics-${VERSION}
@@ -45,11 +45,9 @@ RUN_DEPENDS-graphics += lang/ocaml
WANTLIB-main = c curses m pthread
WANTLIB-graphics = X11
-.if ${MACHINE_ARCH} != aarch64
-# for libbfd; devel/gdb doesn't build on aarch64 yet.
+# for libbfd (used by ocamlobjinfo on .cmxs files)
BUILD_DEPENDS += devel/gdb
WANTLIB-main += iberty z
-.endif
.include <bsd.port.arch.mk>
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE