{"id":2243,"date":"2018-03-22T00:34:18","date_gmt":"2018-03-22T07:34:18","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=2243"},"modified":"2018-03-22T00:34:18","modified_gmt":"2018-03-22T07:34:18","slug":"kernel-gcc-8-tests-not-quite-ready","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2243","title":{"rendered":"Kernel &#8211; GCC 8 Tests &#8211; Not Quite Ready&#8230;"},"content":{"rendered":"<p>I decided to try updating a crash-and-burn test system to Fedora 28 (<em>early-beta<\/em>..) as this included GCC 8 (currently <strong>8.0.1<\/strong>), to see how well the Kernel (<strong>4.16-rc6<\/strong>) compiled..<\/p>\n<p>There were a <span style=\"text-decoration: underline;\">lot<\/span> of warnings generated:<\/p>\n<pre><strong><span style=\"font-family: courier\\ new, courier;\">........................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC [M] drivers\/rtc\/rtc-pcf8523.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC drivers\/usb\/core\/file.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC drivers\/video\/hdmi.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC [M] drivers\/rtc\/rtc-pcf8563.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/hdmi.c: In function \u2018hdmi_spd_infoframe_init\u2019:<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/hdmi.c:171:2: warning: \u2018strncpy\u2019 specified bound 8 equals destination size [-Wstringop-truncation]<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> strncpy(frame-&gt;vendor, vendor, sizeof(frame-&gt;vendor));<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/hdmi.c:172:2: warning: \u2018strncpy\u2019 specified bound 16 equals destination size [-Wstringop-truncation]<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> strncpy(frame-&gt;product, product, sizeof(frame-&gt;product));<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/usb\/core\/file.o: warning: objtool: usb_register_dev()+0x1b3: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/usb\/core\/file.o: warning: objtool: usb_major_init()+0x24: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC drivers\/usb\/core\/buffer.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC drivers\/video\/backlight\/backlight.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC [M] drivers\/rtc\/rtc-pcf8583.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC drivers\/usb\/core\/sysfs.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">.................................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC drivers\/usb\/host\/ehci-pci.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC drivers\/video\/fbdev\/core\/softcursor.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/fbdev\/core\/fbcon.o: warning: objtool: fbcon_prepare_logo()+0x218: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/fbdev\/core\/fbcon.o: warning: objtool: fbcon_init()+0x4ba: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/fbdev\/core\/fbcon.o: warning: objtool: fbcon_switch()+0x47f: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/fbdev\/core\/fbcon.o: warning: objtool: con2fb_release_oldinfo.isra.9()+0xd2: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/fbdev\/core\/fbcon.o: warning: objtool: set_con2fb_map()+0x151: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/fbdev\/core\/fbcon.o: warning: objtool: fbcon_event_notify()+0x195: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">drivers\/video\/fbdev\/core\/fbcon.o: warning: objtool: fbcon_prepare_logo.cold.21()+0x20: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC [M] drivers\/usb\/image\/mdc800.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">....................................<\/span><\/strong><\/pre>\n<p>These were displayed throughout the compile, although the process completed successfully, and the resulting kernel booted OK:<\/p>\n<pre><strong><span style=\"font-family: courier\\ new, courier;\">................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">Fedora 28 (Workstation Edition)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">Kernel 4.16.0-rc6 on an x86_64 (ttyS0)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">...................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">[root@rgup ~]# uname -a<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">Linux rgup 4.16.0-rc6 #1 SMP Tue Mar 20 19:52:54 PDT 2018 x86_64 x86_64 x86_64 GNU\/Linux<\/span><\/strong><\/pre>\n<p>When I tried to run <strong>grub-customizer<\/strong>, it crashed:<\/p>\n<pre><strong><span style=\"font-family: courier\\ new, courier;\">....<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">*** initializing (w\/o specified bootloader type)\u2026<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> * reading partition info\u2026<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">\/usr\/include\/c++\/8\/bits\/basic_string.h:1048: std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::reference std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::operator[](std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type) [with _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Alloc = std::allocator&lt;char&gt;; std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::reference = char&amp;; std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type = long unsigned int]: Assertion '__pos &lt;= size()' failed.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\">Aborted (core dumped)<\/span><\/strong><\/pre>\n<p>So, I had to use <strong>grub2-mkconfig<\/strong> instead..<\/p>\n<p>I compiled the NVIDIA driver (<strong>384.111<\/strong> patched for 4.16) and this also gave warnings, but the compile completed OK..<\/p>\n<pre><strong><span style=\"font-family: courier\\ new, courier;\">...............<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC [M] \/usb3\/kernel\/NVIDIA-Linux-x86_64-384.111-custom\/kernel\/nvidia-uvm\/uvm8_pmm_test.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> \/usb3\/kernel\/NVIDIA-Linux-x86_64-384.111-custom\/kernel\/nvidia-uvm\/uvm8_pmm_test.o: warning: objtool: chunk_alloc_check_common.isra.5()+0x3b: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> \/usb3\/kernel\/NVIDIA-Linux-x86_64-384.111-custom\/kernel\/nvidia-uvm\/uvm8_pmm_test.o: warning: objtool: split_test_single()+0x66: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> \/usb3\/kernel\/NVIDIA-Linux-x86_64-384.111-custom\/kernel\/nvidia-uvm\/uvm8_pmm_test.o: warning: objtool: basic_test_alloc()+0x2a: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> \/usb3\/kernel\/NVIDIA-Linux-x86_64-384.111-custom\/kernel\/nvidia-uvm\/uvm8_pmm_test.o: warning: objtool: uvm8_test_pmm_sanity()+0x9cc: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> CC [M] \/usb3\/kernel\/NVIDIA-Linux-x86_64-384.111-custom\/kernel\/nvidia-uvm\/uvm8_perf_events_test.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> \/usb3\/kernel\/NVIDIA-Linux-x86_64-384.111-custom\/kernel\/nvidia-uvm\/uvm8_perf_events_test.o: warning: objtool: test_events()+0x4c: sibling call from callable instruction with modified stack frame<\/span><\/strong>\r\n<strong><span style=\"font-family: courier\\ new, courier;\"> ........................<\/span><\/strong><\/pre>\n<p>This was all only for testing purposes, and &#8211; obviously &#8211; none of this is recommended for real use, yet!<\/p>\n<p>There are several gcc8-related patches for the kernel, proposed, and these should eventually be included in later -rc versions, and 4.17..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 March 21, 2018<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I decided to try updating a crash-and-burn test system to Fedora 28 (early-beta..) as this included GCC 8 (currently 8.0.1), to see how well the Kernel (4.16-rc6) compiled.. There were a lot of warnings generated: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; CC [M] drivers\/rtc\/rtc-pcf8523.o CC drivers\/usb\/core\/file.o CC drivers\/video\/hdmi.o CC [M] drivers\/rtc\/rtc-pcf8563.o drivers\/video\/hdmi.c: In function \u2018hdmi_spd_infoframe_init\u2019: drivers\/video\/hdmi.c:171:2: warning: \u2018strncpy\u2019 specified bound 8 equals <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2243\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,1617,11,14,15,18,19],"tags":[1842,1841,1844,1846,1005,277,362,1843],"class_list":["post-2243","post","type-post","status-publish","format-standard","hentry","category-compilation","category-gcc","category-hacks","category-kernel","category-linux-2","category-nvidia","category-opinion","tag-early-beta","tag-fedora-28","tag-gcc-8-0-1","tag-kernel-4-16-rc6","tag-kernel-compile","tag-nvidia-2","tag-testing","tag-warnings"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2243","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2243"}],"version-history":[{"count":3,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2243\/revisions"}],"predecessor-version":[{"id":2246,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2243\/revisions\/2246"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}