From owner-freebsd-arm@FreeBSD.ORG Fri Apr 27 06:48:57 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0306D106564A for ; Fri, 27 Apr 2012 06:48:57 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id BAC6A8FC15 for ; Fri, 27 Apr 2012 06:48:56 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q3R6mois085693 for arm@freebsd.org; Fri, 27 Apr 2012 06:48:50 GMT (envelope-from kientzle@freebsd.org) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id j78j322b35h2t88t9vhymx9tu2; for arm@freebsd.org; Fri, 27 Apr 2012 06:48:50 +0000 (UTC) (envelope-from kientzle@freebsd.org) From: Tim Kientzle Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Date: Thu, 26 Apr 2012 23:48:47 -0700 Message-Id: <9AD7075B-B85D-40DB-84B7-FD630B858A30@freebsd.org> To: arm@freebsd.org Mime-Version: 1.0 (Apple Message framework v1257) X-Mailer: Apple Mail (2.1257) Cc: Subject: Cross-buildworld works but not native build? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2012 06:48:57 -0000 I've been working with the projects/armv6 tree and have encountered a = very confusing situation. On i386, this works: $ make TARGET_ARCH=3Darm TARGET_CPUTYPE=3Darmv6 buildworld If I take the resulting world and run it on arm, then the following = fails (with the exact same source): $ make buildworld =85.=20 cc -O -pipe -fpic -fvisibility=3Dhidden -DVISIBILITY_HIDDEN -std=3Dgnu99= -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized = -Wno-pointer-sign -c = /usr/src/lib/libcompiler_rt/../../contrib/compiler-rt/lib/umoddi3.c -o = umoddi3.o cc -O -pipe -fpic -fvisibility=3Dhidden -DVISIBILITY_HIDDEN -std=3Dgnu99= -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized = -Wno-pointer-sign -c = /usr/src/lib/libcompiler_rt/../../contrib/compiler-rt/lib/umodti3.c -o = umodti3.o cc -O -pipe -fpic -fvisibility=3Dhidden -DVISIBILITY_HIDDEN -std=3Dgnu99= -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized = -Wno-pointer-sign -c = /usr/src/lib/libcompiler_rt/__sync_fetch_and_add_4.c -o = __sync_fetch_and_add_4.o In file included from = /usr/src/lib/libcompiler_rt/__sync_fetch_and_op_n.h:31, from = /usr/src/lib/libcompiler_rt/__sync_fetch_and_add_4.c:6: /usr/obj/usr/src/tmp/usr/include/machine/atomic.h: In function = 'atomic_cmpset_32': /usr/obj/usr/src/tmp/usr/include/machine/atomic.h:491: error: = 'ARM_RAS_START' undeclared (first use in this function) /usr/obj/usr/src/tmp/usr/include/machine/atomic.h:491: error: (Each = undeclared identifier is reported only once /usr/obj/usr/src/tmp/usr/include/machine/atomic.h:491: error: for each = function it appears in.) /usr/obj/usr/src/tmp/usr/include/machine/atomic.h: In function = 'atomic_add_32': /usr/obj/usr/src/tmp/usr/include/machine/atomic.h:516: error: = 'ARM_RAS_START' undeclared (first use in this function) Looking at the source, ARM_RAS_START really does seem to be undeclared = (it's declared in sysarch.h, but atomic.h only includes sysarch.h for = kernel builds). So it looks to me like the cross-buildworld should fail also. In any = case, it's not clear why the two aren't behaving the same way. Tim