NetBSD Problem Report #2570
From gnats Wed Jun 26 01:00:45 1996
Received: from Reno.DSG.Stanford.EDU by pain.lcs.mit.edu (8.7.5/8.7.3) with ESMTP id AAA14774 for <gnats-bugs@gnats.netbsd.org>; Wed, 26 Jun 1996 00:55:43 -0400 (EDT)
Message-Id: <199606260455.VAA00860@Reno.DSG.Stanford.EDU>
Date: Tue, 25 Jun 1996 21:55:08 -0700 (PDT)
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Reply-To: jonathan@DSG.Stanford.EDU
To: gnats-bugs@NetBSD.ORG
Subject: gcc config for mips needs support for linker-warning attributes
X-Send-Pr-Version: 3.95
>Number: 2570
>Category: bin
>Synopsis: gcc config for mips needs support for linker-warning attributes
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 26 01:05:02 +0000 1996
>Closed-Date: Wed May 14 22:25:07 +0000 1997
>Last-Modified: Wed May 14 22:25:57 +0000 1997
>Originator: Jonathan Stone
>Release: 1.2_BETA
>Organization:
>Environment:
System: NetBSD Reno.DSG.Stanford.EDU 1.2_BETA NetBSD 1.2_BETA (DSG) #0: Tue Jun 25 08:06:47 PDT 1996 jonathan@Reno.DSG.Stanford.EDU:/usr/src/sys/arch/pmax/compile/DSG pmax
>Description:
The mips gcc config is missing a patch to support attributes.
The NetBSD/mips toolchain supports attributes, and has done since
NetBSD/1.1, and the mips header files expect that support.
``make build'' and other attempts to build a distribution
fail due to compilation errors / warnings.
>How-To-Repeat:
build gcc afresh from NetBSD sources, install it,
try a "make build", note how the compiler barfs on
warn and other attributes.>Fix:
Apply the following diff to /usr/src/gnu/usr.bin/gcc/arch/mips/mips.h,
or better yet, add it to the script that makes NetBSD's gcc. It's
been in use by the port maintainer since before the NetBSD 1.1
release. Yet somehow it's never made it into the tree...
*** mips.h.DIST Mon Dec 11 12:14:19 1995
--- mips.h.dsg.SAVE Thu Dec 14 14:39:21 1995
***************
*** 3811,3813 ****
--- 3811,3829 ----
#define NO_BUILTIN_PTRDIFF_TYPE
#define PTRDIFF_TYPE (TARGET_LONG64 ? "long int" : "int")
#endif
+
+ /* A C statement to output something to the assembler file to switch to section
+ NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
+ NULL_TREE. Some target formats do not support arbitrary sections. Do not
+ define this macro in such cases. */
+
+ #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME) \
+ do { \
+ extern FILE *asm_out_text_file; \
+ if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
+ fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \
+ else if ((DECL) && TREE_READONLY (DECL)) \
+ fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \
+ else \
+ fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \
+ } while (0)
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: phil
State-Changed-When: Wed May 14 15:25:07 PDT 1997
State-Changed-Why:
Verfied that it was included and is in local patches in gcc2netbsd.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.