Skip to content

Conversation

@cho-m
Copy link
Contributor

@cho-m cho-m commented Feb 1, 2026

CMake build has a workaround but Makefile still fails building with LLVM Flang:

flang-21: error: unknown argument: '-all_load'
flang-21: error: unknown argument: '-headerpad_max_install_names'
flang-21: error: unknown argument: '-install_name'
flang-21: error: unknown argument: '-dynamiclib'

This PR passes the options not found in flang --help directly to linker via -Wl.

Only -dynamiclib is not valid. Based on man ld and ld64.lld --help, it seems -Wl,-dylib should work for shared library. May need to confirm if -dynamiclib does anything else.

OPTIONS
   Options that control the kind of output
     -execute
             The default.  Produce a mach-o main executable that has file type MH_EXECUTE.

     -dylib  Produce a mach-o shared library that has file type MH_DYLIB.
OUTPUT KIND:
  -arch <arch_name> The architecture (e.g. ppc, ppc64, i386, x86_64)
  -bundle           Produce a bundle
  -dylib            Produce a shared library

An alternative could be to use CC instead of FC during linking similar to CMake workaround.

@martin-frbg
Copy link
Collaborator

Thank you

@martin-frbg martin-frbg added this to the 0.3.32 milestone Feb 8, 2026
@martin-frbg martin-frbg merged commit 35e8eea into OpenMathLib:develop Feb 8, 2026
100 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants