Closed simonjwright closed 11 months ago
This can be fixed by linking with
-largs -L$HOMEBREW_PREFIX/opt/llvm/lib/c++ -lc++
(note, writing just
-largs -lc++
so as to use Apple’s libc++
fails)
Using my release 0.1.0, and ignoring gnatbind’s output of -static
with the appropriate binder package, this issue doesn’t occur, in spite of the fact that
$ nm -A *.o | grep muloti4
hac_sys-multi_precision_integers.o: U ___muloti4
The link was done using clang, and the relevant link libraries (gnat-llvm was installed in /Users/simon/gnat-llvm) were
/Users/simon/gnat-llvm//lib/rts-native/adalib/libgnarl.a
/Users/simon/gnat-llvm//lib/rts-native/adalib/libgnat.a
-lm
and with some investigation it turns out that ___muloti4
is provided in several of the system libraries, specifically in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
’s libm.tbd
, libSystem.B.tbd
-- the latter is the one that hac
depends on at runtime.
It's most likely an issue on how LLVM itself is setup/configured, since this symbol is supposed to be provided either by libgcc, or llvm's equivalent compiler-rt, so not something directly in the scope of GNAT LLVM itself.
Having build gnat-llvm as in #35, i tried building zertovitch’s HAC. Aside from the linking problem with
clang: error: unsupported option '-static-libgcc'
, I encountered this:I think GCC PR103034 may relate.