Tested on x86_64-darwin21, x86_64-linux, pushed to trunk,
thanks
Iain
--- 8< ---
Darwin provides this support as part of libSystem which is always
linked with user-space DSOs (including exes).
gcc/ChangeLog:
* config/darwin.h (DL_LIBRARY): New.
Signed-off-by: Iain Sandoe <[email protected]>
---
gcc/config/darwin.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 3d2ced5fca3..8c164fd4b75 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -45,9 +45,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If
not, see
#define OBJECT_FORMAT_MACHO 1
-/* Suppress g++ attempt to link in the math library automatically. */
+/* Suppress language-specific specs attempt to link in libm automatically. */
#define MATH_LIBRARY ""
+/* Likewise libdl. */
+#define DL_LIBRARY ""
+
/* We have atexit. */
#define HAVE_ATEXIT
--
2.39.2 (Apple Git-143)