From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 575C53858D39 for ; Fri, 26 Aug 2022 09:28:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 575C53858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102d.google.com with SMTP id c16-20020a17090aa61000b001fb3286d9f7so7207834pjq.1 for ; Fri, 26 Aug 2022 02:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc; bh=NXS7u+HuNXBR06sEIQjzhwy7RkdMsVv7MJd7wrNGehQ=; b=oBVqjhnRQ2p7vj3sE1B9Uqc8v6L8i1cWZwDrzI0HaMLKpDZGz2zFI46yy7eC3MMo89 f4VG0Igx/4iDHl+2VrL1I/w3ci/CG5b0xtMUlvB09MkFZjZxhhDJboCoVKCWvr6w1MeB bzsOJoBguEXbmKEZcDFD0L01Bjvy92YtAZXg1BaefCxEXBwRAjQpA64FMiofJFOIuk8U h+2GF+DZ257ZhJvEULfsmHTFhR7cKabfN+laBOQlhlDxCAKcgUMLdtmCPfmL77sNC+A9 U/RUPHB3W7OzjjPwezv9dFFoYvQRqQI1a+g3V7zzxwfuBqAocQ8UvDIv5/ZB0+EH/Olm abWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc; bh=NXS7u+HuNXBR06sEIQjzhwy7RkdMsVv7MJd7wrNGehQ=; b=fLR+N9103rpTuyAu3DKysqslW9yJJ2K63Mja7h1sS6UtaULXZYF11mF5XhXZNPKQuh W71KZLa4ypxBWayD86ZbZimNgDlyrfSWFq5ltLJYv9YX0TtyfWAEfVenK8u2JVy+lXIP XJFxvVOv/mwUtR+a3fKtQ+2NCOMQeQ0nZi1shlu3VBTy3tkAJKQ1AZLrK2EvIr0QnNJO MnOnux2/oYLMjLPpTFvlMTgquMhabibKiY4JUPBqKTMXSxC09THj93CyqAW9AVRJdQ8R 1YXysjDGuZbkE+zwqNWkgEh/fpllvERbAXxP35jxD4WvrgS39BSaC4NQHMEBbnbXwmOf L7qA== X-Gm-Message-State: ACgBeo236tBA5Whx1mLCU5TxBZeNhqmY4JRvdlZIZFxtRqsWQAIUhWtv JFsr6gdOzTnT7F743HnG5GjrCySLWX0= X-Google-Smtp-Source: AA6agR7/pebHw4sx7lC/3iWOizt3DEhoqp8u/8mJlRxsqDQXXch3ICKu0Z75m+oUICnOQIfiY6F4HA== X-Received: by 2002:a17:90b:3889:b0:1f5:88cd:350d with SMTP id mu9-20020a17090b388900b001f588cd350dmr3506231pjb.9.1661506092189; Fri, 26 Aug 2022 02:28:12 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id 68-20020a620647000000b00537d7cc774bsm147054pfg.139.2022.08.26.02.28.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 02:28:11 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id BE2D81140515; Fri, 26 Aug 2022 18:58:08 +0930 (ACST) Date: Fri, 26 Aug 2022 18:58:08 +0930 From: Alan Modra To: binutils@sourceware.org Subject: PR12265, Compiling ld/ fails on Solaris 8 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3036.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 +#elif defined (HAVE_WINDOWS_H) #include #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 -#endif - #ifndef O_RDONLY #define O_RDONLY 0 #endif -- Alan Modra Australia Development Lab, IBM