Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Sep 2017 20:34:53 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>
Subject:   head -r 323246 /usr/src/sys/arm64/arm64/pmap.c:. . . error: no previous prototype for function 'pmap_invalidate_page' (also pmap_invalidate_range and pmap_invalidate_all)
Message-ID:  <B430F126-9A72-4D4E-9D0B-59D898D3EF63@dsl-only.net>

next in thread | raw e-mail | index | archive | help
This was from an amd64 -> arm64.aarch64 cross build context and was an
attempt to build a debug kernel.

# uname -apKU
FreeBSD FreeBSDx64OPC 12.0-CURRENT FreeBSD 12.0-CURRENT  r323246M  amd64 =
amd64 1200043 1200043

# svnlite info /usr/src/ | grep "Re[plv]"
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 323246
Last Changed Rev: 323246

--- pmap.o ---
/usr/src/sys/arm64/arm64/pmap.c:903:1: error: no previous prototype for =
function 'pmap_invalidate_page' [-Werror,-Wmissing-prototypes]
pmap_invalidate_page(pmap_t pmap, vm_offset_t va)
^
/usr/src/sys/arm64/arm64/pmap.c:917:1: error: no previous prototype for =
function 'pmap_invalidate_range' [-Werror,-Wmissing-prototypes]
pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
^
/usr/src/sys/arm64/arm64/pmap.c:934:1: error: no previous prototype for =
function 'pmap_invalidate_all' [-Werror,-Wmissing-prototypes]
pmap_invalidate_all(pmap_t pmap)
^
. . .
3 errors generated.
*** [pmap.o] Error code 1

make[2]: stopped in =
/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/sys/GENERIC-DBG
.ERROR_TARGET=3D'pmap.o'
=
.ERROR_META_FILE=3D'/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/sys/=
GENERIC-DBG/pmap.o.meta'
.MAKE.LEVEL=3D'2'
MAKEFILE=3D''
.MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes =
verbose curdirOk=3Dyes'
_ERROR_CMD=3D'cc -mcpu=3Dcortex-a53 -target aarch64-unknown-freebsd12.0 =
--sysroot=3D/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/tmp =
-B/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/tmp/usr/bin -c -O =
-pipe  -g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/libfdt =
-D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  =
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mgeneral-regs-only =
-ffixed-x18 -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall =
-Wredundant-decls -Wnested-externs -Wstrict-prototypes =
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef =
-Wno-pointer-sign -D__printf__=3D__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 =
-Wno-error-address-of-packed-member    -std=3Diso9899:1999 -Werror  =
/usr/src/sys/arm64/arm64/pmap.c; ctfconvert -L VERSION -g pmap.o;'
=
.CURDIR=3D'/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/sys/GENERIC-D=
BG'
.MAKE=3D'make'
=
.OBJDIR=3D'/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/sys/GENERIC-D=
BG'
.TARGETS=3D'all'
DESTDIR=3D''
LD_LIBRARY_PATH=3D''
MACHINE=3D'arm64'
MACHINE_ARCH=3D'aarch64'
MAKEOBJDIRPREFIX=3D'/usr/obj/cortexA53dbg_clang/arm64.aarch64'
MAKESYSPATH=3D'/usr/src/share/mk'
MAKE_VERSION=3D'20170720'
=
PATH=3D'/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/tmp/legacy/usr/s=
bin:/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/tmp/legacy/usr/bin:/=
usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/tmp/legacy/bin:/usr/obj/c=
ortexA53dbg_clang/arm64.aarch64/usr/src/tmp/usr/sbin:/usr/obj/cortexA53dbg=
_clang/arm64.aarch64/usr/src/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP=3D'/usr/src'
OBJTOP=3D'/usr/src'
.MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk =
/usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk =
/root/src.configs/src.conf.cortexA53dbg-clang-bootstrap.amd64-host =
/usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/bsd.suffixes.mk =
/root/src.configs/make.conf /usr/src/share/mk/local.sys.mk =
/usr/src/share/mk/src.sys.mk /dev/null Makefile =
/usr/src/sys/conf/kern.pre.mk /usr/src/share/mk/bsd.own.mk =
/usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk =
/usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk =
/usr/src/sys/conf/kern.opts.mk /usr/src/sys/conf/kern.post.mk =
/usr/src/sys/conf/kern.mk'
.PATH=3D'. =
/usr/obj/cortexA53dbg_clang/arm64.aarch64/usr/src/sys/GENERIC-DBG'
1 error


# grep -r pmap_invalidate_page /usr/src/sys/arm64/ | more
/usr/src/sys/arm64/arm64/pmap.c:pmap_invalidate_page(pmap_t pmap, =
vm_offset_t va)
/usr/src/sys/arm64/arm64/pmap.c:        =
pmap_invalidate_page(kernel_pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:        pmap_invalidate_page(pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:                =
pmap_invalidate_page(kernel_pmap, kernel_vm_end);
/usr/src/sys/arm64/arm64/pmap.c:                                =
pmap_invalidate_page(pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:        pmap_invalidate_page(pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:                =
pmap_invalidate_page(pmap, pv->pv_va);
/usr/src/sys/arm64/arm64/pmap.c:                        =
pmap_invalidate_page(pmap, sva);
/usr/src/sys/arm64/arm64/pmap.c:                =
pmap_invalidate_page(pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:                        =
pmap_invalidate_page(pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:        pmap_invalidate_page(pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:                                =
pmap_invalidate_page(pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:        pmap_invalidate_page(pmap, va);
/usr/src/sys/arm64/arm64/pmap.c:                        =
pmap_invalidate_page(pmap, pv->pv_va);
/usr/src/sys/arm64/arm64/pmap.c:                                =
pmap_invalidate_page(pmap, pv->pv_va);

I will note that WERROR=3D was not in use:

# more ~/src.configs/src.conf.cortexA53dbg-clang-bootstrap.amd64-host=20
TO_TYPE=3Daarch64
TOOLS_TO_TYPE=3D${TO_TYPE}
#
KERNCONF=3DGENERIC-DBG
TARGET=3Darm64
.if ${.MAKE.LEVEL} =3D=3D 0
TARGET_ARCH=3D${TO_TYPE}
.export TARGET_ARCH
.endif
#
WITH_CROSS_COMPILER=3D
WITHOUT_SYSTEM_COMPILER=3D
#
WITH_LIBCPLUSPLUS=3D
WITHOUT_BINUTILS_BOOTSTRAP=3D
WITH_ELFTOOLCHAIN_BOOTSTRAP=3D
WITH_CLANG_BOOTSTRAP=3D
WITH_CLANG=3D
WITH_CLANG_IS_CC=3D
WITH_CLANG_FULL=3D
WITH_CLANG_EXTRAS=3D
WITH_LLD_BOOTSTRAP=3D
WITH_LLD=3D
WITH_LLD_IS_LD=3D
WITH_LLDB=3D
#
WITH_BOOT=3D
WITHOUT_LIB32=3D
#
WITHOUT_GCC_BOOTSTRAP=3D
WITHOUT_GCC=3D
WITHOUT_GCC_IS_CC=3D
WITHOUT_GNUCXX=3D
#
NO_WERROR=3D
#WERROR=3D
#MALLOC_PRODUCTION=3D
#
WITH_REPRODUCIBLE_BUILD=3D
WITH_DEBUG_FILES=3D
#
#CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/
XCFLAGS+=3D -mcpu=3Dcortex-a53
XCXXFLAGS+=3D -mcpu=3Dcortex-a53
# There is no XCPPFLAGS but XCPP gets XCFLAGS content.


I will note that there are other architectures with the
likes of:

/usr/src/sys/i386/include/pmap.h:void   pmap_invalidate_page(pmap_t, =
vm_offset_t);
/usr/src/sys/mips/mips/pmap.c:static void pmap_invalidate_page(pmap_t =
pmap, vm_offset_t va);
/usr/src/sys/amd64/include/pmap.h:void  pmap_invalidate_page(pmap_t, =
vm_offset_t);




=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B430F126-9A72-4D4E-9D0B-59D898D3EF63>