amd64/186291: Compilation fail when "device pst" in kernel config on amd64.
Ivan Chetyrkin
frice at inbox.ru
Fri Jan 31 07:10:01 UTC 2014
>Number: 186291
>Category: amd64
>Synopsis: Compilation fail when "device pst" in kernel config on amd64.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-amd64
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jan 31 07:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Ivan Chetyrkin
>Release: 10.0-STABLE
>Organization:
>Environment:
FreeBSD v64.devel.local 10.0-STABLE FreeBSD 10.0-STABLE #0: Thu Jan 30 21:31:03 UTC 2014 root at v64.devel.local:/usr/obj/usr/src/sys/VBOX64 amd64
>Description:
When trying to compile my own kernel with "device pst" in configuration file, process fail with message:
cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -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 -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror /usr/src/sys/dev/pst/pst-iop.c
/usr/src/sys/dev/pst/pst-iop.c:197:3: error: cast to 'void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply *)' from smaller integer type 'u_int32_t' (aka 'unsigned int')
[-Werror,-Wint-to-pointer-cast]
((void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply *))
^
/usr/src/sys/dev/pst/pst-iop.c:419:9: error: cast to 'struct iop_request *' from smaller integer type 'u_int32_t' (aka 'unsigned int') [-Werror,-Wint-to-pointer-cast]
(struct iop_request *)reply->transaction_context;
^
2 errors generated.
As we see from /usr/src/sys/dev/pst/pst-iop.h, initiator_context and transaction_context fields of driver message struct are declared as u_int32_t, which doesn't match pointer size on 64-bit processor.
>How-To-Repeat:
On amd64 machine include
device pst
in your config file and try compile kernel.
>Fix:
The controller is very old hardware and one of fix may be exclude it from available devices on amd64 platform.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-amd64
mailing list