Cross-buildworld works but not native build?

Tim Kientzle kientzle at freebsd.org
Fri Apr 27 06:48:57 UTC 2012


I've been working with the projects/armv6 tree and have encountered a very confusing situation.

On i386, this works:
  $ make TARGET_ARCH=arm TARGET_CPUTYPE=armv6 buildworld

If I take the resulting world and run it on arm, then the following fails (with the exact same source):
  $ make buildworld
  …. 
cc  -O -pipe  -fpic -fvisibility=hidden -DVISIBILITY_HIDDEN -std=gnu99 -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=hidden -DVISIBILITY_HIDDEN -std=gnu99 -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=hidden -DVISIBILITY_HIDDEN -std=gnu99 -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



More information about the freebsd-arm mailing list