Subject: port-alpha/33640: sbin/disklabel fails to build on alpha w/gcc 4
To: None <port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <khym@azeotrope.org>
List: netbsd-bugs
Date: 06/03/2006 05:45:00
>Number: 33640
>Category: port-alpha
>Synopsis: sbin/disklabel fails to build on alpha w/gcc 4
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-alpha-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 03 05:45:00 +0000 2006
>Originator: Dave Huang
>Release: NetBSD 3.99.20
>Organization:
Name: Dave Huang | Mammal, mammal / their names are called /
INet: khym@azeotrope.org | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 30 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Environment:
System: NetBSD yerfable.azeotrope.org 3.99.20 NetBSD 3.99.20 (YERFABLE) #219: Fri Jun 2 12:56:04 CDT 2006 khym@yerfable.azeotrope.org:/usr2/obj.alpha/sys/arch/alpha/compile/YERFABLE alpha
Architecture: alpha
Machine: alpha
>Description:
sbin/disklabel fails to build on NetBSD/alpha with gcc 4:
/usr/tools/bin/alpha--netbsd-gcc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Werror -mieee -nostdinc -isystem /usr/src.local/obj.alpha/destdir.alpha/usr/include -c /usr/src.local/sbin/disklabel/main.c
cc1: warnings being treated as errors
/usr/src.local/sbin/disklabel/main.c: In function 'write_bootarea':
/usr/src.local/sbin/disklabel/main.c:924: warning: dereferencing type-punned pointer will break strict-aliasing rules
*** Failed target: main.o
*** Failed command: /usr/tools/bin/alpha--netbsd-gcc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Werror -mieee -nostdinc -isystem /usr/src.local/obj.alpha/destdir.alpha/usr/include -c /usr/src.local/sbin/disklabel/main.c
*** Error code 1
Stop.
nbmake: stopped in /usr/src.local/sbin/disklabel
The line in question is:
bb = (struct alpha_boot_block *)bootarea;
and bootarea is an int[].
>How-To-Repeat:
Add HAVE_GCC=4 to /etc/mk.conf, then try to build disklabel
for NetBSD/alpha.
>Fix:
>Unformatted: