Date: Sun, 13 Mar 2016 17:27:01 -0600 From: Ian Lepore <ian@freebsd.org> To: Paul Mather <paul@gromit.dlib.vt.edu>, freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: filemon module on BeagleBone Black and cp15_pmccntr_get() Message-ID: <1457911621.1406.110.camel@freebsd.org> In-Reply-To: <3875EACE-DAD6-41EF-A301-664CEDE35137@gromit.dlib.vt.edu> References: <3875EACE-DAD6-41EF-A301-664CEDE35137@gromit.dlib.vt.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2016-03-13 at 17:20 -0400, Paul Mather wrote: > I just tried building the filemon kernel module on FreeBSD/arm 11 > -CURRENT (r296804) on my BeagleBone Black. It fails: > > root@beaglebone:/usr/src/sys/modules/filemon # make > cc -O -pipe -mfloat-abi=softfp -Werror -D_KERNEL -DKLD_MODULE > -nostdinc -I. -I/usr/src/sys/modules/filemon/../.. -fno-common > -funwind-tables -MD -MP -MF.depend.filemon.o -MTfilemon.o > -ffreestanding -fwrapv -Wall -Wredundant-decls -Wnested-externs > -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline > -Wcast-qual -Wundef -Wno-pointer-sign > -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs > -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error > -tautological-compare -Wno-error-empty-body -Wno-error-parentheses > -equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno > -error-shift-negative-value -mno-movt -mfpu=none -std=iso9899:1999 > -c /usr/src/sys/modules/filemon/../../dev/filemon/filemon.c -o > filemon.o > In file included from > /usr/src/sys/modules/filemon/../../dev/filemon/filemon.c:37: > In file included from > /usr/src/sys/modules/filemon/../../sys/buf.h:263: > In file included from > /usr/src/sys/modules/filemon/../../sys/proc.h:66: > In file included from > /usr/src/sys/modules/filemon/../../sys/_vm_domain.h:34: > In file included from > /usr/src/sys/modules/filemon/../../sys/seq.h:70: > ./machine/cpu.h:48:10: error: implicit declaration of function > 'cp15_pmccntr_get' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > return cp15_pmccntr_get(); > ^ > 1 error generated. > *** Error code 1 > > Stop. > make: stopped in /usr/src/sys/modules/filemon > root@beaglebone:/usr/src/sys/modules/filemon # Try: make CONF_CFLAGS=-march=armv7a Even though armv7 is the native arch for a BB, we've lied and tried to pretend that armv6 and armv7 are the same thing, and increasingly that lie is screwing us, especially when building ports. It looks like building modules is another place the lie gets exposed. BTW, *don't* set arch to v7 in make.conf or src.conf, you'll end up with a broken world. The kernel must be built with arch set to v7 and world must be set to v6, at least until some bugs get fixed. (What a mess we've made for ourselves with this v6/v7 stuff.) -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1457911621.1406.110.camel>
