[Bug 220122] head -r320059 (e.g.) clang based buildkernel (without WERROR): /usr/src/sys/sys/sglist.h:81:19: error: passing 'int *' to parameter of type 'volatile u_int *' ... converts between pointers to integer types with different sign
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Jun 19 04:24:22 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220122
Bug ID: 220122
Summary: head -r320059 (e.g.) clang based buildkernel (without
WERROR): /usr/src/sys/sys/sglist.h:81:19: error:
passing 'int *' to parameter of type 'volatile u_int
*' ... converts between pointers to integer types with
different sign
Product: Base System
Version: CURRENT
Hardware: powerpc
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: markmi at dsl-only.net
Attempting to buildkernel (without WERROR)
stopped with:
--- drm_auth.o ---
In file included from /usr/src/sys/dev/drm2/drm_auth.c:39:
In file included from /usr/src/sys/dev/drm2/drmP.h:51:
/usr/src/sys/sys/sglist.h:67:16: error: passing 'int *' to parameter of type
'volatile u_int *' (aka 'volatile unsigned int *') converts between pointers to
integer types with different sign [-Werror,-Wpointer-sign]
refcount_init(&sg->sg_refs, 1);
^~~~~~~~~~~~
/usr/src/sys/sys/refcount.h:42:31: note: passing argument to parameter 'count'
here
refcount_init(volatile u_int *count, u_int value)
^
In file included from /usr/src/sys/dev/drm2/drm_auth.c:39:
In file included from /usr/src/sys/dev/drm2/drmP.h:51:
/usr/src/sys/sys/sglist.h:81:19: error: passing 'int *' to parameter of type
'volatile u_int *' (aka 'volatile unsigned int *') converts between pointers to
integer types with different sign [-Werror,-Wpointer-sign]
refcount_acquire(&sg->sg_refs);
^~~~~~~~~~~~
/usr/src/sys/sys/refcount.h:49:34: note: passing argument to parameter 'count'
here
refcount_acquire(volatile u_int *count)
^
. . .
--- all_subdir_drm2/drm2 ---
2 errors generated.
*** [drm_auth.o] Error code 1
make[5]: stopped in /usr/src/sys/modules/drm2/drm2
.ERROR_TARGET='drm_auth.o'
.ERROR_META_FILE='/usr/obj/powerpc64vtsc_xtoolchain-llvm/powerpc.powerpc64/usr/src/sys/GENERIC64vtsc-NODBG/modules/usr/src/sys/modules/drm2/drm2/drm_auth.o.meta'
.MAKE.LEVEL='5'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='/usr/local/bin/clang40 -target powerpc64-unknown-freebsd12.0
--sysroot=/usr/obj/powerpc64vtsc_xtoolchain-llvm/powerpc.powerpc64/usr/src/tmp
-B/usr/local/powerpc64-freebsd/bin/ -O2 -pipe -fno-strict-aliasing -Werror
-D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include
/usr/obj/powerpc64vtsc_xtoolchain-llvm/powerpc.powerpc64/usr/src/sys/GENERIC64vtsc-NODBG/opt_global.h
-I. -I/usr/src/sys -fno-common -g -fno-omit-frame-pointer
-I/usr/obj/powerpc64vtsc_xtoolchain-llvm/powerpc.powerpc64/usr/src/sys/GENERIC64vtsc-NODBG
-mno-altivec -msoft-float -ffreestanding -fwrapv -fstack-protector -gdwarf-2
-Wno-cast-qual -std=iso9899:1999 -c /usr/src/sys/dev/drm2/drm_auth.c -o
drm_auth.o; ctfconvert -L VERSION -g drm_auth.o;'
.CURDIR='/usr/src/sys/modules/drm2/drm2'
. . .
This does not look to be powerpc64 specific but powerpc64
was the context.
This did happen to be built via a llvm40 xtoolchain variant that
allowed me to specify to use devel/powerpc64-bintuils use
(including for ld since lld does not work for powerpc64 or
powerpc last I knew).
# more /usr/local/share/toolchains/llvm40_altbinutils.mk
XCC=/usr/local/bin/clang40
XCXX=/usr/local/bin/clang++40
XCPP=/usr/local/bin/clang-cpp40
X_COMPILER_TYPE=clang
# more ~/src.configs/src.conf.powerpc64-xtoolchain-llvm.amd64-host
TO_TYPE=powerpc64
TOOLS_TO_TYPE=${TO_TYPE}
#
KERNCONF=GENERIC64vtsc-NODBG
TARGET=powerpc
.if ${.MAKE.LEVEL} == 0
TARGET_ARCH=${TO_TYPE}
.export TARGET_ARCH
.endif
#
WITHOUT_CROSS_COMPILER=
WITHOUT_SYSTEM_COMPILER=
#
WITH_LIBCPLUSPLUS=
WITHOUT_BINUTILS_BOOTSTRAP=
WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=
WITHOUT_CLANG_BOOTSTRAP=
WITH_CLANG=
WITH_CLANG_IS_CC=
WITH_CLANG_FULL=
WITH_CLANG_EXTRAS=
WITHOUT_LLD_BOOTSTRAP=
WITH_LLD=
WITHOUT_LLD_IS_LD=
WITH_LLDB=
#
WITH_BOOT=
WITH_LIB32=
#
WITHOUT_GCC_BOOTSTRAP=
WITHOUT_GCC=
WITHOUT_GCC_IS_CC=
WITHOUT_GNUCXX=
#
NO_WERROR=
#
# Avoid build aborting for the likes of:
# /usr/src/sys/sys/sglist.h:81:19: error:
# passing 'int *' to parameter of type 'volatile u_int *'
# (aka 'volatile unsigned int *') converts between
# pointers to integer types with different sign
# [-Werror,-Wpointer-sign]
#
WERROR=
MALLOC_PRODUCTION=
#
WITH_REPRODUCIBLE_BUILD=
WITH_DEBUG_FILES=
#
#
# For TO (so-called "cross") stages . . .
# TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . .
#
CROSS_TOOLCHAIN=llvm40_altbinutils
X_COMPILER_TYPE=clang
CROSS_BINUTILS_PREFIX=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/
.if ${.MAKE.LEVEL} == 0
XCC=/usr/local/bin/clang40
XCXX=/usr/local/bin/clang++40
XCPP=/usr/local/bin/clang-cpp40
.export XCC
.export XCXX
.export XCPP
XAS=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as
XAR=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar
XLD=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld
XNM=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm
XOBJCOPY=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy
XOBJDUMP=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump
XRANLIB=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib
XSIZE=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size
#NO-SUCH: XSTRINGS=/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings
XSTRINGS=/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings
.export XAS
.export XAR
.export XLD
.export XNM
.export XOBJCOPY
.export XOBJDUMP
.export XRANLIB
.export XSIZE
.export XSTRINGS
.endif
#
#
# From based on clang (via system). . .
#
.if ${.MAKE.LEVEL} == 0
CC=/usr/bin/clang
CXX=/usr/bin/clang++
CPP=/usr/bin/clang-cpp
.export CC
.export CXX
.export CPP
.endif
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list