public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: PR12265, Compiling ld/ fails on Solaris 8
Date: Fri, 26 Aug 2022 18:58:08 +0930	[thread overview]
Message-ID: <YwiSKG9ntu7VptVu@squeak.grove.modra.org> (raw)

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

                 reply	other threads:[~2022-08-26  9:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YwiSKG9ntu7VptVu@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).