NetBSD Problem Report #6287

Received: (qmail 5701 invoked from network); 13 Oct 1998 21:36:04 -0000
Message-Id: <>
Date: Tue, 13 Oct 1998 17:35:59 -0400 (EDT)
From: Chas Williams <>
Subject: egcs for m68k needs to use different default alignment
X-Send-Pr-Version: 3.95

>Number:         6287
>Category:       port-m68k
>Synopsis:       egcs for m68k needs to use different default alignment
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 13 14:50:00 +0000 1998
>Closed-Date:    Wed Oct 14 04:11:42 +0000 1998
>Last-Modified:  Sun Feb 28 12:26:19 +0000 1999
>Release:        11 OCT 1998
	Naval Research Laboratory, Washington, DC

thirdoffive, NetBSD 1.3H

	egcs fails to compile some source files on the mac68k/m68k platform.
	for example when building ifconfig.c, it aborts will the following

	% make
	cc -O  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Werror   -c ifconfig.c
	cc1: warnings being treated as errors
	ifconfig.c:118: warning: alignment of `addreq' is greater than maximum object file alignment. Using 2.
	*** Error code 1

	apparently egcs can align on 16 bit and 32 bit boundaries while
	old gcc could only align on 32 bit boundaries.  the default appears
	to be 16 bit for egcs.

	from m68k.h in dist/gcc/config/m68k:

	/* No data type wants to be aligned rounder than this.
	   Most published ABIs say that ints should be aligned on 16 bit        
	   boundaries, but cpus with 32 bit busses get better performance       
	   aligned on 32 bit boundaries.  Coldfires without a misalignment      
	   module require 32 bit alignment. */                                  

	apparently the abi for netbsd is 32 bit.

	try building ifconfig.c on a m68k using egcs.

	change the default to be -malign-int by modifying
	/usr/src/gnu/dist/gcc/config/m68k/netbsd.h as follows:

--- netbsd.h.000        Tue Oct 13 14:20:01 1998
+++ netbsd.h    Tue Oct 13 14:20:03 1998
@@ -4,7 +4,7 @@

 #include <netbsd.h>


 /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
    This will control the use of inline 68881 insns in certain macros.  */

State-Changed-From-To: open->closed 
State-Changed-By: scottr 
State-Changed-When: Tue Oct 13 21:11:42 PDT 1998 
In PR 6288, originator notes that the patch is incorrect. 

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.