<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9201</bug_id>
          
          <creation_ts>2016-03-02 21:05:08 +0000</creation_ts>
          <short_desc>grub-efi-native fails to build because of trampolines</short_desc>
          <delta_ts>2016-03-21 15:12:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Bill Randle">bill.randle</assigned_to>
          <cc>bill.randle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59638</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-03-02 21:05:08 +0000</bug_when>
    <thetext>There are +- 30 places where gcc 5.3 generates error like this:

../grub-2.00/util/grub-script-check.c:99:14: error: trampoline generated for nested function &apos;get_config_line&apos; [-Werror=trampolines]
   grub_err_t get_config_line (char **line, int cont __attribute__ ((unused)))
              ^

and fails, adding -Wno-error=trampolines helps, but I&apos;m not sure if it&apos;s right work around or why I&apos;m (possibly) the only one seeing this issue.

OE @ ~/build/oe-core/tmp-glibc/work/x86_64-linux/grub-efi-native/2.00-r3/build $ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.3.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmpfs/portage/sys-devel/gcc-5.3.0/work/gcc-5.3.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.3.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=&apos;Gentoo 5.3.0 p1.0, pie-0.6.5&apos; --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --enable-lto --without-isl --enable-libsanitizer
Thread model: posix
gcc version 5.3.0 (Gentoo 5.3.0 p1.0, pie-0.6.5) 

Also there is unused 0001-Fix-build-with-glibc-2.20.patch file, which was removed from SRC_URI in:

commit a290429c8415042cb8c2f4258e76a3cc6815a172
Author: Khem Raj &lt;raj.khem@gmail.com&gt;
Date:   Tue Jan 12 23:43:13 2016 +0000

    grub: Backport fix for largefile detection/use</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59727</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-04 11:52:43 +0000</bug_when>
    <thetext>Khem, would you be able to have a look at this?  Whilst no major distro is shipping gcc 5.3 now, it looks like Ubuntu 16.04 will ship with gcc 5.3 at about the same time as we release 2.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59804</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-08 20:52:30 +0000</bug_when>
    <thetext>Using Debian&apos;s gcc-5 package (gcc version 5.3.1 20160224 (Debian 5.3.1-10)) grub-efi-native builds fine with no warnings.  Martin, can you still replicate this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59805</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-08 20:55:14 +0000</bug_when>
    <thetext>(pretty sure this is the first time I&apos;ve seen Debian testing be ahead of Gentoo in a compiler!)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59823</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-03-09 10:37:49 +0000</bug_when>
    <thetext>Yes still reproducible with latest oe-core:
http://errors.yoctoproject.org/Errors/Build/13790/

I&apos;m using minimalist gentoo chroot, in worst case you can download it here:
http://git.shr-project.org/git/?p=shr-chroot.git;a=summary</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60040</commentid>
    <comment_count>5</comment_count>
    <who name="Bill Randle">bill.randle</who>
    <bug_when>2016-03-16 22:42:16 +0000</bug_when>
    <thetext>Using Fedora 23&apos;s gcc (gcc version 5.3.1 20151207 (Red Hat 5.3.1-2)), I also can build qemux86_64, including grub-efi, from master with no errors. I&apos;ll do some digging into what&apos;s going on with Gentoo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60052</commentid>
    <comment_count>6</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2016-03-17 04:43:36 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Khem, would you be able to have a look at this?  Whilst no major distro is
&gt; shipping gcc 5.3 now, it looks like Ubuntu 16.04 will ship with gcc 5.3 at
&gt; about the same time as we release 2.1.

gentoo enables -Wtrampolines by default, thats why you see it. Disabling the warning
for native builds is the right fix here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60077</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-17 13:02:16 +0000</bug_when>
    <thetext>As it&apos;s gentoo explicitly adding that flag should we WONTFIX this as a gentoo issue and tell gentoo users to BUILD_CFLAGS_append = &quot; -Wno-error-trampolines&quot;, or add something that like globally?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60101</commentid>
    <comment_count>8</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2016-03-17 16:11:18 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; As it&apos;s gentoo explicitly adding that flag should we WONTFIX this as a
&gt; gentoo issue and tell gentoo users to BUILD_CFLAGS_append = &quot;
&gt; -Wno-error-trampolines&quot;, or add something that like globally?

We dont lose much by enabling this option in metadata. It is a harder sell
to change gentoo&apos;s defaults. I would suggest to add it to concerned recipe and only for native case. So its surgical.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60102</commentid>
    <comment_count>9</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-17 16:29:56 +0000</bug_when>
    <thetext>Sounds good to me.  Bill, can you handle this please.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60103</commentid>
    <comment_count>10</comment_count>
    <who name="Bill Randle">bill.randle</who>
    <bug_when>2016-03-17 16:34:19 +0000</bug_when>
    <thetext>I&apos;ve set up a copy of the reporter&apos;s build environment, so I can go through and find all the trampoline warnings in his build and update the appropriate native recipes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60104</commentid>
    <comment_count>11</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2016-03-17 16:43:38 +0000</bug_when>
    <thetext>is it lot of packages ? I thought it was just grub-efi. If its many, then I think, we should just suggest that gentoo user&apos;s set this option globally and leave it at that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60105</commentid>
    <comment_count>12</comment_count>
    <who name="Bill Randle">bill.randle</who>
    <bug_when>2016-03-17 16:46:39 +0000</bug_when>
    <thetext>I was thinking there was another package also, but I don&apos;t see it now, so maybe it was just grub-efi. I will verify when I do a test build of shr.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60110</commentid>
    <comment_count>13</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-03-17 17:28:57 +0000</bug_when>
    <thetext>Only grub is failing like this, because of default -Werror.

I&apos;ve sent the patch I&apos;m using:
http://lists.openembedded.org/pipermail/openembedded-core/2016-March/119141.html

because IIRC just adding -Wno-error-trampolines wasn&apos;t enough to solve this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60111</commentid>
    <comment_count>14</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2016-03-17 17:57:35 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; Only grub is failing like this, because of default -Werror.
&gt; 
&gt; I&apos;ve sent the patch I&apos;m using:
&gt; http://lists.openembedded.org/pipermail/openembedded-core/2016-March/119141.
&gt; html
&gt; 
&gt; because IIRC just adding -Wno-error-trampolines wasn&apos;t enough to solve this.

did you try -Wno-error=trampolines</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60114</commentid>
    <comment_count>15</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2016-03-17 18:09:11 +0000</bug_when>
    <thetext>According to git reflog I was testing:

+# bsdlabel.c:161:7: error: trampoline generated for nested function &apos;check_msdos&apos; [-Werror=trampolines]
+CFLAGS_append_class-native = &quot; -Wno-error=trampolines&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60126</commentid>
    <comment_count>16</comment_count>
    <who name="Bill Randle">bill.randle</who>
    <bug_when>2016-03-18 00:04:50 +0000</bug_when>
    <thetext>Using -Wno-error=trampolines solves the problem, in my testing. Patch submitted to the mailing list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60207</commentid>
    <comment_count>17</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-21 15:12:12 +0000</bug_when>
    <thetext>Merged in oe-core c2450e4fd01487aaf5bb37a4c70a5397650ba5f8.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>