Date: Mon, 19 Jun 2017 04:24:22 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [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 Message-ID: <bug-220122-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220122 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@FreeBSD.org Reporter: markmi@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 pointer= s 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 'cou= nt' 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 pointer= s 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 'cou= nt' 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=3D'drm_auth.o' .ERROR_META_FILE=3D'/usr/obj/powerpc64vtsc_xtoolchain-llvm/powerpc.powerpc6= 4/usr/src/sys/GENERIC64vtsc-NODBG/modules/usr/src/sys/modules/drm2/drm2/drm= _auth.o.meta' .MAKE.LEVEL=3D'5' MAKEFILE=3D'' .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes ve= rbose' _ERROR_CMD=3D'/usr/local/bin/clang40 -target powerpc64-unknown-freebsd12.0 --sysroot=3D/usr/obj/powerpc64vtsc_xtoolchain-llvm/powerpc.powerpc64/usr/sr= c/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/GENERI= C64vtsc-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/GENE= RIC64vtsc-NODBG -mno-altivec -msoft-float -ffreestanding -fwrapv -fstack-protector -gdwarf= -2 -Wno-cast-qual -std=3Diso9899:1999 -c /usr/src/sys/dev/drm2/drm_auth.c -o drm_auth.o; ctfconvert -L VERSION -g drm_auth.o;' .CURDIR=3D'/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=20 XCC=3D/usr/local/bin/clang40 XCXX=3D/usr/local/bin/clang++40 XCPP=3D/usr/local/bin/clang-cpp40 X_COMPILER_TYPE=3Dclang # more ~/src.configs/src.conf.powerpc64-xtoolchain-llvm.amd64-host=20 TO_TYPE=3Dpowerpc64 TOOLS_TO_TYPE=3D${TO_TYPE} # KERNCONF=3DGENERIC64vtsc-NODBG TARGET=3Dpowerpc .if ${.MAKE.LEVEL} =3D=3D 0 TARGET_ARCH=3D${TO_TYPE} .export TARGET_ARCH .endif # WITHOUT_CROSS_COMPILER=3D WITHOUT_SYSTEM_COMPILER=3D # WITH_LIBCPLUSPLUS=3D WITHOUT_BINUTILS_BOOTSTRAP=3D WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=3D WITHOUT_CLANG_BOOTSTRAP=3D WITH_CLANG=3D WITH_CLANG_IS_CC=3D WITH_CLANG_FULL=3D WITH_CLANG_EXTRAS=3D WITHOUT_LLD_BOOTSTRAP=3D WITH_LLD=3D WITHOUT_LLD_IS_LD=3D WITH_LLDB=3D # WITH_BOOT=3D WITH_LIB32=3D # WITHOUT_GCC_BOOTSTRAP=3D WITHOUT_GCC=3D WITHOUT_GCC_IS_CC=3D WITHOUT_GNUCXX=3D # NO_WERROR=3D # # 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=3D MALLOC_PRODUCTION=3D # WITH_REPRODUCIBLE_BUILD=3D WITH_DEBUG_FILES=3D # # # For TO (so-called "cross") stages . . . # TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . . # CROSS_TOOLCHAIN=3Dllvm40_altbinutils X_COMPILER_TYPE=3Dclang CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ .if ${.MAKE.LEVEL} =3D=3D 0 XCC=3D/usr/local/bin/clang40 XCXX=3D/usr/local/bin/clang++40 XCPP=3D/usr/local/bin/clang-cpp40 .export XCC .export XCXX .export XCPP XAS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as XAR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar XLD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld XNM=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm XOBJCOPY=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy XOBJDUMP=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump XRANLIB=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib XSIZE=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size #NO-SUCH: XSTRINGS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings XSTRINGS=3D/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} =3D=3D 0 CC=3D/usr/bin/clang CXX=3D/usr/bin/clang++ CPP=3D/usr/bin/clang-cpp .export CC .export CXX .export CPP .endif --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-220122-8>