NetBSD Problem Report #45400

From www@NetBSD.org  Mon Sep 26 08:05:39 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id BC9B263CDD7
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 26 Sep 2011 08:05:39 +0000 (UTC)
Message-Id: <20110926080538.9491B63CDD5@www.NetBSD.org>
Date: Mon, 26 Sep 2011 08:05:38 +0000 (UTC)
From: netbsd.wij8@gishpuppy.com
Reply-To: netbsd.wij8@gishpuppy.com
To: gnats-bugs@NetBSD.org
Subject: arm--netbsdelf-gcc: Internal error: Segmentation fault (program as)
X-Send-Pr-Version: www-1.0

>Number:         45400
>Category:       port-evbarm
>Synopsis:       arm--netbsdelf-gcc: Internal error: Segmentation fault (program as)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-evbarm-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 26 08:10:01 +0000 2011
>Closed-Date:    Sun Oct 30 08:53:10 +0000 2011
>Last-Modified:  Sun Oct 30 08:53:10 +0000 2011
>Originator:     Alfred
>Release:        CVS (5.99.55)
>Organization:
>Environment:
> uname -a
Linux boxibox 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux

>Description:
I am trying to build the kernel for the SHEEVAPLUG, but gcc ("as") segfaults when compiling kern/atomic_and_32_nv_cas.





>How-To-Repeat:
> ./build.sh -j 2 -u -m evbarm tools

===> Summary of results:
         build.sh command:    ./build.sh -j 2 -u -m evbarm tools
         build.sh started:    Mon Sep 26 09:54:11 CEST 2011
         NetBSD version:      5.99.55
         MACHINE:             evbarm
         MACHINE_ARCH:        arm
         Build platform:      Linux 2.6.38-8-generic i686
         HOST_SH:             /bin/sh
         TOOLDIR path:        /home/bla/netbsd2/src/obj/tooldir.Linux-2.6.38-8-generic-i686
         DESTDIR path:        /home/bla/netbsd2/src/obj/destdir.evbarm
         RELEASEDIR path:     /home/bla/netbsd2/src/obj/releasedir
         Updated makewrapper: /home/bla/netbsd2/src/obj/tooldir.Linux-2.6.38-8-generic-i686/bin/nbmake-evbarm
         Tools built to /home/bla/netbsd2/src/obj/tooldir.Linux-2.6.38-8-generic-i686
         build.sh ended:      Mon Sep 26 09:54:32 CEST 2011



./build.sh -u -m evbarm kernel=SHEEVAPLUG
===> build.sh command:    ./build.sh -j 2 -u -m evbarm kernel=SHEEVAPLUG
===> build.sh started:    Mon Sep 26 09:59:21 CEST 2011
===> NetBSD version:      5.99.55
===> MACHINE:             evbarm
===> MACHINE_ARCH:        arm
===> Build platform:      Linux 2.6.38-8-generic i686
===> HOST_SH:             /bin/sh
===> TOOLDIR path:        /home/bla/netbsd2/src/obj/tooldir.Linux-2.6.38-8-generic-i686
===> DESTDIR path:        /home/bla/netbsd2/src/obj/destdir.evbarm
===> RELEASEDIR path:     /home/bla/netbsd2/src/obj/releasedir
===> Updated makewrapper: /home/bla/netbsd2/src/obj/tooldir.Linux-2.6.38-8-generic-i686/bin/nbmake-evbarm
===> Building kernel without building new tools
--- obj ---
===> Building kernel:     SHEEVAPLUG
===> Build directory:     /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG
Build directory is /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG
Don't forget to run "make depend"
--- __always_make_kernlib ---
--- __always_make_compatlib ---
--- dependkernlib ---
--- dependcompatlib ---
--- dependkernlib ---
depending the kern library objects
--- dependcompatlib ---
depending the compat library objects
--- __always_make_compatlib ---
--- __always_make_kernlib ---
--- /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/compat/libcompat.a ---
--- /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/kern/libkern.o ---
--- /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/compat/libcompat.a ---
making sure the compat library is up to date...
--- /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/kern/libkern.o ---
making sure the kern library is up to date...
--- /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/compat/libcompat.a ---
--- uipc_syscalls_43.o ---
#   compile  compat/uipc_syscalls_43.o
/home/bla/netbsd2/src/obj/tooldir.Linux-2.6.38-8-generic-i686/bin/arm--netbsdelf-gcc -ffreestanding -fno-zero-initialized-in-bss -g -O2 -O2 -fno-strict-aliasing   -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-sign-compare   -march=armv5te --sysroot=/home/bla/netbsd2/src/obj/destdir.evbarm -I../../. -I/home/bla/netbsd2/src/sys/../common/include -I/home/bla/netbsd2/src/sys/arch -I/home/bla/netbsd2/src/sys -nostdinc -D__HAVE_PCI_CONF_HOOK -DKERNEL_BASE_EXT="0xc0000000" -DMV_CACHE_RANGE_OPS -DDIAGNOSTIC -DDEBUG -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/quad -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/string -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/arch/arm/string  --sysroot=/home/bla/netbsd2
 /src/obj/destdir.evbarm  -c    /home/bla/netbsd2/src/sys/compat/common/uipc_syscalls_43.c -o uipc_syscalls_43.o
--- /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/kern/libkern.o ---
--- atomic_dec_32_cas.o ---
#   compile  kern/atomic_dec_32_cas.o
/home/bla/netbsd2/src/obj/tooldir.Linux-2.6.38-8-generic-i686/bin/arm--netbsdelf-gcc -ffreestanding -fno-zero-initialized-in-bss -g -O2 -O2 -fno-strict-aliasing   -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-sign-compare   -march=armv5te  --sysroot=/home/bla/netbsd2/src/obj/destdir.evbarm -I/home/bla/netbsd2/src/sys/lib/libkern/arch/arm --sysroot=/home/bla/netbsd2/src/obj/destdir.evbarm -I../../. -I/home/bla/netbsd2/src/sys/../common/include -I/home/bla/netbsd2/src/sys/arch -I/home/bla/netbsd2/src/sys -nostdinc -D__HAVE_PCI_CONF_HOOK -DKERNEL_BASE_EXT="0xc0000000" -DMV_CACHE_RANGE_OPS -DDIAGNOSTIC -DDEBUG -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/quad -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/string -I/home/
 bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/arch/arm/string  -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/quad -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/string -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/arch/arm/string -I/home/bla/netbsd2/src/sys/lib/libkern/../../../common/include  -c    /home/bla/netbsd2/src/sys/lib/libkern/../../../common/lib/libc/atomic/atomic_dec_32_cas.c -o atomic_dec_32_cas.o
arm--netbsdelf-gcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:http://gnats.NetBSD.org/support/send-pr.html> for instructions.
*** [atomic_dec_32_cas.o] Error code 1

nbmake: stopped in /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/kern
1 error

nbmake: stopped in /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/kern
*** [/home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/kern/libkern.o] Error code 2

nbmake: stopped in /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG
--- /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/compat/libcompat.a ---
arm--netbsdelf-gcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:http://gnats.NetBSD.org/support/send-pr.html> for instructions.
*** [uipc_syscalls_43.o] Error code 1

nbmake: stopped in /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/compat
1 error

nbmake: stopped in /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/compat
*** [/home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG/lib/compat/libcompat.a] Error code 2

nbmake: stopped in /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG

nbmake: stopped in /home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG


ERROR: Failed to make all in "/home/bla/netbsd2/src/sys/arch/evbarm/compile/obj/SHEEVAPLUG"
*** BUILD ABORTED ***

>Fix:

>Release-Note:

>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: port-evbarm-maintainer@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: re: port-evbarm/45400: arm--netbsdelf-gcc: Internal error: Segmentation fault (program as)
Date: Mon, 26 Sep 2011 19:36:35 +1000

 new bug with binutils 2.20+ and arm-elf-alike targets.  the below patch
 should get you running again, but it's just a hack.


 .mrg.


 Index: gas/config/tc-arm.c
 ===================================================================
 RCS file: /cvsroot/src/external/gpl3/binutils/dist/gas/config/tc-arm.c,v
 retrieving revision 1.3
 diff -p -r1.3 tc-arm.c
 *** gas/config/tc-arm.c	25 Sep 2011 04:32:37 -0000	1.3
 --- gas/config/tc-arm.c	26 Sep 2011 09:27:47 -0000
 *************** arm_cleanup (void)
 *** 21802,21809 ****
 --- 21802,21811 ----
   {
     literal_pool * pool;

 + #if 0
     /* Ensure that all the IT blocks are properly closed.  */
     check_it_blocks_finished ();
 + #endif

     for (pool = list_of_pools; pool; pool = pool->next)
       {

State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Sun, 30 Oct 2011 08:53:10 +0000
State-Changed-Why:
christos fixed this a couple of weeks ago with a real fix.


>Unformatted:

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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.