NetBSD Problem Report #45560

From  Thu Nov  3 11:12:22 2011
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 774F163C75A
	for <>; Thu,  3 Nov 2011 11:12:22 +0000 (UTC)
Message-Id: <>
Date: Thu,  3 Nov 2011 11:12:21 +0000 (UTC)
Subject: Unable to cross build HEAD kernel on MacOS X 10.7
X-Send-Pr-Version: www-1.0

>Number:         45560
>Category:       toolchain
>Synopsis:       Unable to cross build HEAD kernel on MacOS X 10.7
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 03 11:15:00 +0000 2011
>Originator:     Radoslaw Kujawa
Darwin 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
I'm unable to cross build kernel since m68k ports were switched to GCC 4.5 (31 october). 

Compilation fails with:

#    create  GENERIC/db_access.d
CC=/Users/rkujawa/repos/src/obj/tooldir.Darwin-11.2.0-x86_64/bin/m68k--netbsdelf-gcc /Users/rkujawa/repos/src/obj/tooldir.Darwin-11.2.0-x86_64/bin/nbmkdep -f db_access.d --  -m68020-60 -Wa,-m68030 -Wa,-m68851 -msoft-float -ffreestanding -fno-zero-initialized-in-bss  -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      --sysroot=/Users/rkujawa/repos/src/obj/destdir.amiga -Damiga -DFPCOPROC -I.  -I/Users/rkujawa/repos/src/sys/../common/include -I/Users/rkujawa/repos/src/sys/arch  -I/Users/rkujawa/repos/src/sys -nostdinc -DDRACO -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/Users/rkujawa/repos/src/sys/lib/libkern/../../../common/lib/libc/quad -I/Users/rkujawa/repos/src/sys/lib/libkern/../../../common/lib/libc/string -I/Users/rkujawa/repos/src/sys/lib/libkern/../.
 ./../common/lib/libc/arch/m68k/string   -I/Users/rkujawa/repos/src/sys/dist/ipf  /Users/rkujawa/repos/src/sys/ddb/db_access.c
--- assym.h ---
/tmp/genassym.99980/assym.c:132:1: internal compiler error: in execute_ipa_pass_list, at passes.c:1800
Please submit a full bug report,
with preprocessed source if appropriate.
See <> for instructions.
*** [assym.h] Error code 1

nbmake: stopped in /Users/rkujawa/repos/src/sys/arch/amiga/compile/obj/GENERIC
1 error

nbmake: stopped in /Users/rkujawa/repos/src/sys/arch/amiga/compile/obj/GENERIC

ERROR: Failed to make depend in "/Users/rkujawa/repos/src/sys/arch/amiga/compile/obj/GENERIC"

This problem probably exist also for other architectures (is not m68k-specific). 
- Install MacOS X 10.7
- Install XCode 4.1
- Check out NetBSD source dated 20111101 or newer
- Build tools: ./ -U -j2 -m amiga tools
- Try to build a kernel for amiga port: ./ -U -j2 -m amiga kernel=GENERIC
- Observe the error message

Workaround: specify HOST_CC and HOST_CXX variables to use old GCC 4.2 (non clang/llvm):

 ./ -m amiga -U -j2 -V HOST_CC=gcc-4.2 -V HOST_CXX=g++-4.2 tools

GCC bug: .

Proper fix not known. 

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.