* PR12265, Compiling ld/ fails on Solaris 8
@ 2022-08-26 9:28 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-08-26 9:28 UTC (permalink / raw)
To: binutils
The fail was due to -Werror and headers included by dlfcn.h and
elf-bfd.h disagreeing about AT_DCACHEBSIZE and other AT_*. Not a
serious problem obviously, since release versions of binutils don't
enable -Werror and the defines are not used. Anyway, reduce the
number of files that might hit this problem by only including dlfcn.h
where it is needed.
PR 12265
* sysdep.h: Don't include dlfcn.h here.
* plugin.c: Include it here.
diff --git a/ld/plugin.c b/ld/plugin.c
index fe203104677..51554932e91 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -51,7 +51,9 @@
#if !(defined(errno) || defined(_MSC_VER) && defined(_INC_ERRNO))
extern int errno;
#endif
-#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
+#if defined (HAVE_DLFCN_H)
+#include <dlfcn.h>
+#elif defined (HAVE_WINDOWS_H)
#include <windows.h>
#endif
diff --git a/ld/sysdep.h b/ld/sysdep.h
index b55a1c29518..91f98572eea 100644
--- a/ld/sysdep.h
+++ b/ld/sysdep.h
@@ -61,10 +61,6 @@
#endif
#endif
-#ifdef HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
#ifndef O_RDONLY
#define O_RDONLY 0
#endif
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-26 9:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 9:28 PR12265, Compiling ld/ fails on Solaris 8 Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).