Add `LDFLAGS` when linking dynamic libraries?

When compiling the sources in libinterp/dldfcn, it looks like LDFLAGS (as displayed in the configure summary) isn’t added to the linker flags. I might be wrong here. But I’m seeing some oddities when compiling natively on Windows with MSYS2 (because the system libraries are distributed over two distinct directories by MSYS2).
Was not adding LDFLAGS for these functions a conscious decision? Would I need to add that -L/some/path flag to another variable?
Or would it be ok to use LDFLAGS for these files, too?

Edit: Forgot to mention the upstream bug report that is motivating this question:
pkg-config file for portaudio contains -luuid · Issue #8805 · msys2/MINGW-packages (github.com)

Never mind.
The issue is that MSYS2 only has a static library of for uuid. We’d need to link to a dynamic library.
This is not an issue with Octave.

Sorry for the noise.

1 Like