NetBSD Problem Report #56493

From www@netbsd.org  Thu Nov 11 13:35:57 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2035D1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 11 Nov 2021 13:35:57 +0000 (UTC)
Message-Id: <20211111133555.BE5D91A923A@mollari.NetBSD.org>
Date: Thu, 11 Nov 2021 13:35:55 +0000 (UTC)
From: pekdon@gmail.com
Reply-To: pekdon@gmail.com
To: gnats-bugs@NetBSD.org
Subject: binutils 2.37 on Solaris 10 sparc64 build issue (fails to detect endianess)
X-Send-Pr-Version: www-1.0

>Number:         56493
>Category:       pkg
>Synopsis:       binutils 2.37 on Solaris 10 sparc64 build issue (fails to detect endianess)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 11 13:40:00 +0000 2021
>Last-Modified:  Mon Nov 22 07:05:01 +0000 2021
>Originator:     Claes Nstn
>Release:        trunk 2021-11-02
>Organization:
>Environment:
SunOS 5.10 sun4u sparc SUNW,Sun-Blade-1500
>Description:
Building binutils-2.37 on Solaris 10 sparc64 gives me an error when trying to include and use include/plugin-api.h where it fails to detect the endian

With this patch it compiles, and is able to compile GCC8 using gas from binutils instead of the /usr/sfw/bin/gas version.
>How-To-Repeat:
Try to build binutils on Solaris 10 sparc
>Fix:
$NetBSD$

--- include/plugin-api.h.orig   2021-11-09 06:55:27.762048000 +0000
+++ include/plugin-api.h
@@ -62,6 +62,12 @@
 /* Include all necessary header files based on target.  */
 #if defined(__SVR4) && defined(__sun)
 #include <sys/byteorder.h>
+#ifdef _LITTLE_ENDIAN
+#define PLUGIN_LITTLE_ENDIAN 1
+#endif
+#ifdef _BIG_ENDIAN
+#define PLUGIN_BIG_ENDIAN 1
+#endif
 #endif
 #if defined(__FreeBSD__) || defined(__NetBSD__) || \
     defined(__DragonFly__) || defined(__minix)

>Audit-Trail:
From: =?utf-8?q?Claes_N=C3=A4st=C3=A9n?= <pekdon@gmail.com>
To: gnats-bugs <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/56493: binutils 2.37 on Solaris 10 sparc64 build issue (fails to detect endianess)
Date: Mon, 22 Nov 2021 08:03:53 +0100

 The same issue applies to amd64 as well, using the system provided GCC.

 This being a bootstrap issue, new GCC seems to require an up to date
 Binutils to build and run properly.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.