Hi,

Since past 3–4 days, I am getting consistent failures while compiling the 
kernel – current.
I tried commenting out offending drivers/modules in my kernel config. But, it 
looks like a lot of drivers are resulting into this compilation failure. The 
source of errors seems to be drivers taking an int pointer of a struct, which 
could be a common operation.

#   compile  MYKERNEL/ar5416_xmit.o
gcc -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float 
-mindirect-branch=thunk -mindirect-branch-register -ffreestanding 
-fno-zero-initialized-in-bss -fno-delete-null-pointer-checks -g -O2 
-fno-omit-frame-pointer -fstack-protector -Wstack-protector --param 
ssp-buffer-size=1 -fstack-usage -Wstack-usage=3584 -fno-strict-aliasing 
-fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length 
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition 
-Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code 
-Wno-pointer-sign -Wno-attributes -Wno-type-limits -Wextra 
-Wno-unused-parameter -Wold-style-definition -Wno-sign-compare -Walloca -Damd64 
-Dx86_64 -I. -I../../../../external/mit/xen-include-public/dist/ 
-I../../../../external/bsd/libnv/dist -I../../../../external/bsd/acpica/dist 
-I../../../../../common/lib/libx86emu -I../../../../../common/lib/libc/misc 
-I../../../../../common/include -I../../../../arch -I../../../.. -nostdinc 
-DCOMPAT_UTILS -D__XEN_INTERFACE_VERSION__=0x3020a -DDIAGNOSTIC -DCOMPAT_44 
-D_KERNEL -D_KERNEL_OPT -std=gnu99 
-I../../../../lib/libkern/../../../common/lib/libc/quad 
-I../../../../lib/libkern/../../../common/lib/libc/string 
-I../../../../lib/libkern/../../../common/lib/libc/arch/x86_64/string 
-I../../../../lib/libkern/../../../common/lib/libc/arch/x86_64/atomic 
-I../../../../lib/libkern/../../../common/lib/libc/hash/sha3 
-D_FORTIFY_SOURCE=2 -I../../../../external/isc/atheros_hal/dist 
-I../../../../external/isc/atheros_hal/ic -I../../../../../common/include 
-I../../../../external/bsd/acpica/dist/include 
-I../../../../external/bsd/libnv/dist -c 
../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c -o ar5416_xmit.o
In file included from 
../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:28:
../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c: In function 
‘ar5416ProcTxDesc’:
../../../../external/isc/atheros_hal/dist/ar5416/ar5416desc.h:32:3: error: 
taking address of packed member of ‘struct ar5416_desc’ may result in an 
unaligned pointer value [-Werror=address-of-packed-member]
   32 |  ((uint32_t*)(&(_ads)->u.tx.status[_get_index(_ah)]))
      |  ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:470:26: note: in 
expansion of macro ‘AR5416_DS_TXSTATUS’
  470 |  uint32_t *ds_txstatus = AR5416_DS_TXSTATUS(ah,ads);
      |                          ^~~~~~~~~~~~~~~~~~
../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:560:27: error: 
this statement may fall through [-Werror=implicit-fallthrough=]
  560 |  case 3: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries2);
../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:561:2: note: here
  561 |  case 2: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries1);
      |  ^~~~
../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:561:27: error: 
this statement may fall through [-Werror=implicit-fallthrough=]
  561 |  case 2: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries1);
../../../../external/isc/atheros_hal/dist/ar5416/ar5416_xmit.c:562:2: note: here
  562 |  case 1: ts->ts_longretry += MS(ads->ds_ctl2, AR_XmitDataTries0);
      |  ^~~~
cc1: all warnings being treated as errors
*** Error code 1

Stop.
make: stopped in /usr/src/sys/arch/amd64/compile/MYKERNEL


Best,
Salil

Reply via email to