{"id":2511,"date":"2019-02-22T00:19:57","date_gmt":"2019-02-22T08:19:57","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=2511"},"modified":"2019-02-22T00:19:57","modified_gmt":"2019-02-22T08:19:57","slug":"compiler-gcc-9-first-impressions","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2511","title":{"rendered":"Compiler &#8211;  GCC 9 &#8211; First Impressions.."},"content":{"rendered":"<p>Just updated to the pre-release <strong>Fedora 30<\/strong> (<em>Rawhide<\/em>) on the test system, and tried out the new version of GCC:<\/p>\n<pre><strong><span style=\"font-family: Courier New, Courier, monospace;\">$ gcc --version<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">gcc (GCC) 9.0.1 20190209 (Red Hat 9.0.1-0.4)<\/span><\/strong><\/pre>\n<p>Kernel <strong>5.0-rc7<\/strong> compiled successfully, and runs OK.\u00a0\u00a0\u00a0 As expected, there were quite a lot of compiler &#8216;warnings&#8217;:<\/p>\n<pre><strong><span style=\"font-family: Courier New, Courier, monospace;\">.......................<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC net\/ipv4\/proc.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC drivers\/hid\/hid-samsung.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC net\/ipv4\/fib_rules.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC drivers\/hid\/hid-sunplus.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c: In function \u2018xfs_ioctl32_bstat_copyin\u2019:<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c:141:50: warning: taking address of packed member of \u2018struct compat_xfs_bstat\u2019 may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">141 | xfs_ioctl32_bstime_copyin(&amp;bstat-&gt;bs_atime, &amp;bstat32-&gt;bs_atime) ||<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c:142:50: warning: taking address of packed member of \u2018struct compat_xfs_bstat\u2019 may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">142 | xfs_ioctl32_bstime_copyin(&amp;bstat-&gt;bs_mtime, &amp;bstat32-&gt;bs_mtime) ||<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c:143:50: warning: taking address of packed member of \u2018struct compat_xfs_bstat\u2019 may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">143 | xfs_ioctl32_bstime_copyin(&amp;bstat-&gt;bs_ctime, &amp;bstat32-&gt;bs_ctime) ||<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c: In function \u2018xfs_bulkstat_one_fmt_compat\u2019:<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c:196:30: warning: taking address of packed member of \u2018struct compat_xfs_bstat\u2019 may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">196 | xfs_bstime_store_compat(&amp;p32-&gt;bs_atime, &amp;buffer-&gt;bs_atime) ||<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c:197:30: warning: taking address of packed member of \u2018struct compat_xfs_bstat\u2019 may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">197 | xfs_bstime_store_compat(&amp;p32-&gt;bs_mtime, &amp;buffer-&gt;bs_mtime) ||<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c:198:30: warning: taking address of packed member of \u2018struct compat_xfs_bstat\u2019 may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">198 | xfs_bstime_store_compat(&amp;p32-&gt;bs_ctime, &amp;buffer-&gt;bs_ctime) ||<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c: In function \u2018xfs_compat_attrlist_by_handle\u2019:<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c:385:51: warning: taking address of packed member of \u2018struct compat_xfs_fsop_attrlist_handlereq\u2019 may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">385 | dentry = xfs_compat_handlereq_to_dentry(parfilp, &amp;al_hreq.hreq);<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">fs\/xfs\/xfs_ioctl32.c:394:37: warning: taking address of packed member of \u2018struct compat_xfs_fsop_attrlist_handlereq\u2019 may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">394 | cursor = (attrlist_cursor_kern_t *)&amp;al_hreq.pos;<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC net\/ipv4\/ipmr.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC drivers\/hid\/hid-topseed.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">LD [M] fs\/xfs\/xfs.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC [M] drivers\/gpu\/drm\/i915\/i915_gem_object.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC fs\/binfmt_elf.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">...................<\/span><\/strong><\/pre>\n<p>Next, I tried the VMware 15.0.2 <strong>vmmon<\/strong>\/<strong>vmnet<\/strong> drivers, patched for Kernel 5.0&#8230;\u00a0 <strong>vmnet<\/strong> actually compiled cleanly, but <strong>vmmon<\/strong> threw a lot of warnings, although the compilation completed OK:<\/p>\n<pre><strong><span style=\"font-family: Courier New, Courier, monospace;\">............................<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/include\/x86desc.h: In function \u2018Desc64_EqualIgnoreAccessed\u2019:<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/include\/x86desc.h:155:4: warning: converting a packed \u2018Descriptor64\u2019 {aka \u2018const struct Descriptor64\u2019} pointer (alignment 1) to a \u2018Descriptor64Union\u2019 {aka \u2018const union &lt;anonymous&gt;\u2019} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">155 | const Descriptor64Union *du1 = (const Descriptor64Union*) d1;<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/include\/x86desc.h:156:4: warning: converting a packed \u2018Descriptor64\u2019 {aka \u2018const struct Descriptor64\u2019} pointer (alignment 1) to a \u2018Descriptor64Union\u2019 {aka \u2018const union &lt;anonymous&gt;\u2019} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">156 | const Descriptor64Union *du2 = (const Descriptor64Union*) d2;<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC [M] \/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/bootstrap\/monLoader.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">CC [M] \/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/bootstrap\/vmmblob.o<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">In file included from \/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/include\/modulecall.h:34,<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">from \/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/common\/vmx86.h:33,<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">from \/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/common\/hostif.h:32,<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">from \/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/bootstrap\/vmmblob.c:30:<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/include\/x86desc.h: In function \u2018Desc64_EqualIgnoreAccessed\u2019:<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/include\/x86desc.h:155:4: warning: converting a packed \u2018Descriptor64\u2019 {aka \u2018const struct Descriptor64\u2019} pointer (alignment 1) to a \u2018Descriptor64Union\u2019 {aka \u2018const union &lt;anonymous&gt;\u2019} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">155 | const Descriptor64Union *du1 = (const Descriptor64Union*) d1;<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/kernel\/vmware15-kernel50\/vmware-host-modules\/vmmon-only\/.\/include\/x86desc.h:156:4: warning: converting a packed \u2018Descriptor64\u2019 {aka \u2018const struct Descriptor64\u2019} pointer (alignment 1) to a \u2018Descriptor64Union\u2019 {aka \u2018const union &lt;anonymous&gt;\u2019} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">.........................<\/span><\/strong><\/pre>\n<p>The latest NVIDIA driver &#8211; <strong>418.30<\/strong> &#8211; compiled successfully, with just one warning:<\/p>\n<pre><strong><span style=\"font-family: Courier New, Courier, monospace;\">........................<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-418.30\/kernel\/nvidia-uvm\/uvm8_mmu.c: In function \u2018uvm_page_tree_put_ptes_async\u2019:<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/home\/rgadsdon\/kernel\/NVIDIA-Linux-x86_64-418.30\/kernel\/nvidia-uvm\/uvm8_mmu.c:693:5: warning: \u2018invalidate_depth\u2019 may be used uninitialized in this function [-Wmaybe-uninitialized]<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">693 | tree-&gt;gpu-&gt;host_hal-&gt;tlb_invalidate_all(&amp;push,<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">694 | uvm_page_tree_pdb(tree)-&gt;addr,<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">695 | invalidate_depth,<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">696 | membar_after_invalidate);<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">| ~~~~~~~~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">.........................<\/span><\/strong><\/pre>\n<p>This Fedora version is not yet ready for real use, as a lot of the off-distro multimedia applications (from <strong><em>rpmfusion<\/em><\/strong>..etc.) are not yet available..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 February 21, 2019.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just updated to the pre-release Fedora 30 (Rawhide) on the test system, and tried out the new version of GCC: $ gcc &#8211;version gcc (GCC) 9.0.1 20190209 (Red Hat 9.0.1-0.4) Kernel 5.0-rc7 compiled successfully, and runs OK.\u00a0\u00a0\u00a0 As expected, there were quite a lot of compiler &#8216;warnings&#8217;: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. 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: <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2511\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,10,1617,14,15,18,19,25],"tags":[2036,2037,2034,2035,2038,277,402,1843],"class_list":["post-2511","post","type-post","status-publish","format-standard","hentry","category-compilation","category-fedora","category-gcc","category-kernel","category-linux-2","category-nvidia","category-opinion","category-vmware","tag-compile-tests","tag-completed-ok","tag-fedora-30","tag-gcc-9","tag-kernel-5-0-rc7","tag-nvidia-2","tag-vmware-2","tag-warnings"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2511"}],"version-history":[{"count":1,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2511\/revisions"}],"predecessor-version":[{"id":2512,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2511\/revisions\/2512"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}