Build break in dtrace modules at r253772 with gcc
Andriy Gapon
avg at FreeBSD.org
Sun Aug 4 20:00:41 UTC 2013
on 02/08/2013 23:29 Garrett Cooper said the following:
> r253772 breaks dtrace compiled as a module on amd64 like so when using gcc:
I am aware of the problem with dtrace/dtrace module and apologize for it.
The easiest way to work around it is to add
CWARNFLAGS+= -Wno-cast-qual
to the respective Makefile.
There is a patch to fix the problem in the C code.
> cc1: warnings being treated as errors
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1184:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1184:
> warning: cast discards qualifiers from pointer target type
> --- g_label_iso9660.o ---
> --- modules-all ---
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1265:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1265:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1441:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1441:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1448:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1494:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1498:
> warning: cast discards qualifiers from pointer target type
> --- g_label_ext2fs.o ---
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=core2
> -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 -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-common -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror /usr/src/sys/geom/label/g_label_ext2fs.c
> --- modules-all ---
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1502:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1891:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1891:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1891:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1891:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1911:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1911:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1916:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1916:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1916:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1916:
> warning: cast discards qualifiers from pointer target type
> --- g_label_msdosfs.o ---
> --- modules-all ---
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1933:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1933:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1935:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:1935:
> warning: cast discards qualifiers from pointer target type
> --- g_label_msdosfs.o ---
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=core2
> -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 -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-common -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror /usr/src/sys/geom/label/g_label_msdosfs.c
> --- g_label_ntfs.o ---
> --- modules-all ---
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:
> In function 'dtrace_disx86':
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2606:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2650:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2695:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2699:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2703:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2707:
> warning: cast discards qualifiers from pointer target type
> --- g_label_reiserfs.o ---
> --- modules-all ---
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2752:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2756:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2760:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2769:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2778:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2785:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2827:
> warning: cast discards qualifiers from pointer target type
> --- g_label_ntfs.o ---
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=core2
> -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 -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-common -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror /usr/src/sys/geom/label/g_label_ntfs.c
> --- modules-all ---
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2846:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2848:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2856:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2887:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2894:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2895:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2940:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2960:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2962:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2964:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2966:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2969:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2972:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:2984:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:3045:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:3047:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:3050:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:3076:
> warning: cast discards qualifiers from pointer target type
> /usr/src/sys/modules/dtrace/dtrace/../../../cddl/dev/dtrace/amd64/dis_tables.c:3096:
> warning: cast discards qualifiers from pointer target type
> --- g_label_reiserfs.o ---
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=core2
> -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 -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-common -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror /usr/src/sys/geom/label/g_label_reiserfs.c
> --- g_label_ufs.o ---
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=core2
> -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 -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-common -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror /usr/src/sys/geom/label/g_label_ufs.c
> --- g_label_gpt.o ---
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -march=core2
> -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 -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-common -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -Werror /usr/src/sys/geom/label/g_label_gpt.c
> --- modules-all ---
> *** [dis_tables.o] Error code 1
>
> make: stopped in /usr/src/sys/modules/dtrace/dtrace
>
>
> $ uname -a
> FreeBSD gran-tourismo.west.isilon.com 10.0-CURRENT FreeBSD
> 10.0-CURRENT #2 r+4fbed0e: Sat Jun 22 16:53:12 PDT 2013
> gcooper at gran-tourismo.west.isilon.com:/usr/obj/usr/src/sys/GRAN-TOURISMO
> amd64
>
> My KERNCONFs, make.conf, and src.conf are provided for reference.
>
> Thanks,
> -Garrett
>
--
Andriy Gapon
More information about the freebsd-current
mailing list