Compiler – GCC 9 – First Impressions..
Just updated to the pre-release Fedora 30 (Rawhide) on the test system, and tried out the new version of GCC:
$ gcc --version gcc (GCC) 9.0.1 20190209 (Red Hat 9.0.1-0.4)
Kernel 5.0-rc7 compiled successfully, and runs OK. As expected, there were quite a lot of compiler ‘warnings’:
....................... CC net/ipv4/proc.o CC drivers/hid/hid-samsung.o CC net/ipv4/fib_rules.o CC drivers/hid/hid-sunplus.o fs/xfs/xfs_ioctl32.c: In function ‘xfs_ioctl32_bstat_copyin’: fs/xfs/xfs_ioctl32.c:141:50: warning: taking address of packed member of ‘struct compat_xfs_bstat’ may result in an unaligned pointer value [-Waddress-of-packed-member] 141 | xfs_ioctl32_bstime_copyin(&bstat->bs_atime, &bstat32->bs_atime) || | ^~~~~~~~~~~~~~~~~~ fs/xfs/xfs_ioctl32.c:142:50: warning: taking address of packed member of ‘struct compat_xfs_bstat’ may result in an unaligned pointer value [-Waddress-of-packed-member] 142 | xfs_ioctl32_bstime_copyin(&bstat->bs_mtime, &bstat32->bs_mtime) || | ^~~~~~~~~~~~~~~~~~ fs/xfs/xfs_ioctl32.c:143:50: warning: taking address of packed member of ‘struct compat_xfs_bstat’ may result in an unaligned pointer value [-Waddress-of-packed-member] 143 | xfs_ioctl32_bstime_copyin(&bstat->bs_ctime, &bstat32->bs_ctime) || | ^~~~~~~~~~~~~~~~~~ fs/xfs/xfs_ioctl32.c: In function ‘xfs_bulkstat_one_fmt_compat’: fs/xfs/xfs_ioctl32.c:196:30: warning: taking address of packed member of ‘struct compat_xfs_bstat’ may result in an unaligned pointer value [-Waddress-of-packed-member] 196 | xfs_bstime_store_compat(&p32->bs_atime, &buffer->bs_atime) || | ^~~~~~~~~~~~~~ fs/xfs/xfs_ioctl32.c:197:30: warning: taking address of packed member of ‘struct compat_xfs_bstat’ may result in an unaligned pointer value [-Waddress-of-packed-member] 197 | xfs_bstime_store_compat(&p32->bs_mtime, &buffer->bs_mtime) || | ^~~~~~~~~~~~~~ fs/xfs/xfs_ioctl32.c:198:30: warning: taking address of packed member of ‘struct compat_xfs_bstat’ may result in an unaligned pointer value [-Waddress-of-packed-member] 198 | xfs_bstime_store_compat(&p32->bs_ctime, &buffer->bs_ctime) || | ^~~~~~~~~~~~~~ fs/xfs/xfs_ioctl32.c: In function ‘xfs_compat_attrlist_by_handle’: fs/xfs/xfs_ioctl32.c:385:51: warning: taking address of packed member of ‘struct compat_xfs_fsop_attrlist_handlereq’ may result in an unaligned pointer value [-Waddress-of-packed-member] 385 | dentry = xfs_compat_handlereq_to_dentry(parfilp, &al_hreq.hreq); | ^~~~~~~~~~~~~ fs/xfs/xfs_ioctl32.c:394:37: warning: taking address of packed member of ‘struct compat_xfs_fsop_attrlist_handlereq’ may result in an unaligned pointer value [-Waddress-of-packed-member] 394 | cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; | ^~~~~~~~~~~~ CC net/ipv4/ipmr.o CC drivers/hid/hid-topseed.o LD [M] fs/xfs/xfs.o CC [M] drivers/gpu/drm/i915/i915_gem_object.o CC fs/binfmt_elf.o ...................
Next, I tried the VMware 15.0.2 vmmon/vmnet drivers, patched for Kernel 5.0… vmnet actually compiled cleanly, but vmmon threw a lot of warnings, although the compilation completed OK:
............................ /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./include/x86desc.h: In function ‘Desc64_EqualIgnoreAccessed’: /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./include/x86desc.h:155:4: warning: converting a packed ‘Descriptor64’ {aka ‘const struct Descriptor64’} pointer (alignment 1) to a ‘Descriptor64Union’ {aka ‘const union <anonymous>’} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member] 155 | const Descriptor64Union *du1 = (const Descriptor64Union*) d1; | ^~~~~ /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./include/x86desc.h:156:4: warning: converting a packed ‘Descriptor64’ {aka ‘const struct Descriptor64’} pointer (alignment 1) to a ‘Descriptor64Union’ {aka ‘const union <anonymous>’} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member] 156 | const Descriptor64Union *du2 = (const Descriptor64Union*) d2; | ^~~~~ CC [M] /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/bootstrap/monLoader.o CC [M] /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/bootstrap/vmmblob.o In file included from /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./include/modulecall.h:34, from /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./common/vmx86.h:33, from /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./common/hostif.h:32, from /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/bootstrap/vmmblob.c:30: /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./include/x86desc.h: In function ‘Desc64_EqualIgnoreAccessed’: /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./include/x86desc.h:155:4: warning: converting a packed ‘Descriptor64’ {aka ‘const struct Descriptor64’} pointer (alignment 1) to a ‘Descriptor64Union’ {aka ‘const union <anonymous>’} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member] 155 | const Descriptor64Union *du1 = (const Descriptor64Union*) d1; | ^~~~~ /home/rgadsdon/kernel/vmware15-kernel50/vmware-host-modules/vmmon-only/./include/x86desc.h:156:4: warning: converting a packed ‘Descriptor64’ {aka ‘const struct Descriptor64’} pointer (alignment 1) to a ‘Descriptor64Union’ {aka ‘const union <anonymous>’} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member] .........................
The latest NVIDIA driver – 418.30 – compiled successfully, with just one warning:
........................ /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.30/kernel/nvidia-uvm/uvm8_mmu.c: In function ‘uvm_page_tree_put_ptes_async’: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.30/kernel/nvidia-uvm/uvm8_mmu.c:693:5: warning: ‘invalidate_depth’ may be used uninitialized in this function [-Wmaybe-uninitialized] 693 | tree->gpu->host_hal->tlb_invalidate_all(&push, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 694 | uvm_page_tree_pdb(tree)->addr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 695 | invalidate_depth, | ~~~~~~~~~~~~~~~~~ 696 | membar_after_invalidate); | ~~~~~~~~~~~~~~~~~~~~~~~~ .........................
This Fedora version is not yet ready for real use, as a lot of the off-distro multimedia applications (from rpmfusion..etc.) are not yet available..
Robert Gadsdon. February 21, 2019.
Comments
Compiler – GCC 9 – First Impressions.. — No Comments