NetBSD Problem Report #50286

From www@NetBSD.org  Sun Sep 27 18:14:03 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1EC04A5864
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 27 Sep 2015 18:14:03 +0000 (UTC)
Message-Id: <20150927181401.D98F7A6553@mollari.NetBSD.org>
Date: Sun, 27 Sep 2015 18:14:01 +0000 (UTC)
From: n54@gmx.com
Reply-To: n54@gmx.com
To: gnats-bugs@NetBSD.org
Subject: MKPCC=yes broken for crossbuilding from amd64 to i386
X-Send-Pr-Version: www-1.0

>Number:         50286
>Category:       toolchain
>Synopsis:       MKPCC=yes broken for crossbuilding from amd64 to i386
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 27 18:15:00 +0000 2015
>Originator:     Kamil Rytarowski
>Release:        7.99.21
>Organization:
>Environment:
NetBSD chieftec 7.99.21 NetBSD 7.99.21 (GENERIC) #0: Sat Sep 26 16:38:12 CEST 2015  root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64
>Description:
MKPCC=yes broken for crossbuilding from amd64 to i386



/usr/src/external/bsd/pcc/libexec/ccom/../../dist/pcc/mip/regs.c: In function 'addalledges':
/usr/src/external/bsd/pcc/libexec/ccom/../../dist/pcc/mip/regs.c:793:3: error: right shift count >= width of type [-Werror]
   k = (live[i/NUMBITS] >> 32);
   ^
cc1: all warnings being treated as errors


It seems that mkext dynamically generates data for amd64, not i386:
$ cat /tmp/netbsd-i386/external/bsd/pcc/libexec/mkext/external.h
#ifndef _EXTERNAL_H_
#define _EXTERNAL_H_
#define MAXOPLEN 46
#define NUMBITS 64
#define BIT2BYTE(bits) ((((bits)+NUMBITS-1)/NUMBITS)*(NUMBITS/8))
#define BITSET(arr, bit) (arr[bit/NUMBITS] |= ((long)1 << (bit & (NUMBITS-1))))
#define BITCLEAR(arr, bit) (arr[bit/NUMBITS] &= ~((long)1 << (bit & (NUMBITS-1))))
#define TESTBIT(arr, bit) (arr[bit/NUMBITS] & ((long)1 << (bit & (NUMBITS-1))))
typedef long bittype;
extern int tempregs[], permregs[];
#define NTEMPREG 4
#define FREGS 3
#define NPERMREG 4
extern bittype validregs[];
#define AREGCNT 6
#define BREGCNT 8
#define CREGCNT 15
#define DREGCNT 8
#define EREGCNT 0
#define FREGCNT 0
#define GREGCNT 0
int aliasmap(int class, int regnum);
int color2reg(int color, int class);
int interferes(int reg1, int reg2);
#endif /* _EXTERNAL_H_ */
>How-To-Repeat:
On NetBSD/amd64:

./build.sh -V MKPCC=yes -O /tmp/netbsd-i386 -m i386 release sourcesets
>Fix:
None

NetBSD Home
NetBSD PR Database Search

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