NetBSD Problem Report #38632

From he@quattro.urc.uninett.no  Mon May 12 10:33:06 2008
Return-Path: <he@quattro.urc.uninett.no>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 84E4D63B8BC
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 12 May 2008 10:33:06 +0000 (UTC)
Message-Id: <200805120930.m4C9UPFw006462@quattro.urc.uninett.no>
Date: Mon, 12 May 2008 11:30:25 +0200 (CEST)
From: he@NetBSD.org
Reply-To: he@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: acorn26 fails to build after matt-armv6 branch merge
X-Send-Pr-Version: 3.95

>Number:         38632
>Category:       port-acorn26
>Synopsis:       acorn26 fails to build after matt-armv6 branch merge
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-acorn26-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 12 10:35:00 +0000 2008
>Closed-Date:    Sun May 20 13:58:13 +0000 2012
>Last-Modified:  Sun May 20 13:58:13 +0000 2012
>Originator:     Havard Eidnes
>Release:        NetBSD-current of May 11, 2008
>Organization:
	I try...
>Environment:
Host System: NetBSD quattro.urc.uninett.no 3.1_STABLE NetBSD 3.1_STABLE (QUATTRO) #1: Tue Nov 21 02:34:49 CET 2006 he@quattro.urc.uninett.no:/usr/obj/sys/arch/i386/compile/QUATTRO i386
Architecture: acorn26
Machine: acorn26
>Description:
	acorn26 fails to build bcopyinout.o as part of GENERIC, with

/u/build/HEAD/src/sys/arch/arm/arm/bcopyinout.S: Assembler messages:
/u/build/HEAD/src/sys/arch/arm/arm/bcopyinout.S:61: Error: undefined symbol `cpu_info_store' in operation
/u/build/HEAD/src/sys/arch/arm/arm/bcopyinout.S:61: Error: undefined symbol `CI_CURPCB' in operation

*** Failed target:  bcopyinout.o

	An inspection of bcopyinout.S reveals that revision 1.15
	changed "_C_LABEL(curpcb)" to "_C_LABEL(cpu_info_store) + CI_CURPCB"
	at the quoted line number as part of the matt-armv6 branch merge.
	This is in the !MULTIPROCESSOR preprocessor branch.

	By the looks of it, acorn26 doesn't have cpu_info nor
	cpu_info_store.

	It's not obvious to me that this is a reaonable and intended
	new requirement for arm ports to provide these structures
	even when they are not multiprocessor platforms.

	Reverting this single line change reveals another similar change:

    compile  GENERIC/copystr.o
/u/build/HEAD/src/sys/arch/arm/arm/copystr.S: Assembler messages:
/u/build/HEAD/src/sys/arch/arm/arm/copystr.S:60: Error: undefined symbol `cpu_info_store' in operation
/u/build/HEAD/src/sys/arch/arm/arm/copystr.S:60: Error: undefined symbol `CI_CURPCB' in operation

	...and reverting similarly reveals another completely different
	problem:

    compile  GENERIC/cpuswitch.o
/u/build/HEAD/src/sys/arch/acorn26/acorn26/cpuswitch.c:58: error: expected identifier or '(' before '&' token
/u/build/HEAD/src/sys/arch/acorn26/acorn26/cpuswitch.c:58: error: expected ')' before '->' token

	...and... hmm, this is

struct pcb *curpcb;

	and apparently this is now defined to something else, but I
	can't see why that should happen:

#ifdef _KERNEL
#ifdef _KERNEL_OPT
#include "opt_multiprocessor.h"
#endif
#ifdef MULTIPROCESSOR
#define curpcb  (curcpu()->ci_curpcb)
#else
extern struct pcb *curpcb;
#endif
#endif  /* _KERNEL */

	says arm/include/pcb.h, and MULTIPROCESSOR is not defined
	in the configuration.  However, arm/include/cpu.h says:

#ifndef curpcb
#define curpcb          (curcpu()->ci_curpcb)
#endif

	in the !MULTIRPROCESSOR preprocessor branch, which is
	probably the source of this last problem.

>How-To-Repeat:
	Try to build -current for acorn26, watch it fail as above.
>Fix:
	Sorry, don't know.

	See above for half-baked attempts at probably following the
	wrong path, and that cpu_info_store and associated glue is
	now probably a requirement also for non-MULTIPROCESSOR platforms.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: matt@NetBSD.org
State-Changed-When: Sun, 20 May 2012 13:58:13 +0000
State-Changed-Why:
acorn26 successfully builds on HEAD.


>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.