NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/50286: MKPCC=yes broken for crossbuilding from amd64 to i386



>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



Home | Main Index | Thread Index | Old Index