Bug 11954

Summary: [pyro-next] Grub-efi-native fails
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Armin Kuster <akuster>
Component: coreAssignee: Armin Kuster <akuster>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: jku, meta.mr.watcher, meta.watcher
Version: 2.3.2   
Target Milestone: 2.3.2   
Hardware: x86   
OS: Multiple   
URL: https://autobuilder.yocto.io/builders/nightly-x86-lsb/builds/428/steps/BuildImages_1/logs/stdio
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: Don't know
Attachments:
Description Flags
CreateAutoConf none

Description Armin Kuster 2017-08-19 22:16:40 UTC
Created attachment 3948 [details]
CreateAutoConf

gcc  -DHAVE_CONFIG_H -I. -I../grub-2.00  -Wall -W -I./include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-lsb/build/build/tmp/work/x86_64-linux/grub-efi-native/2.00-r3/recipe-sysroot-native/usr/lib/grub\" -DLOCALEDIR=\"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-lsb/build/build/tmp/work/x86_64-linux/grub-efi-native/2.00-r3/recipe-sysroot-native/usr/share/locale\" -DGRUB_FILE=\"util/ieee1275/ofpath.c\" -I. -I../grub-2.00 -I. -I../grub-2.00 -I../grub-2.00/include -I./include -I./grub-core/gnulib -I../grub-2.00/grub-core/gnulib   -fno-builtin-gettext -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wno-unused-result -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -Werror -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-old-style-definition -Wno-unsafe-loop-optimizations  -Wno-error=trampolines -c -o util/ieee1275/grub_ofpathname-ofpath.o `test -f 'util/ieee1275/ofpath.c' || echo '../grub-2.00/'`util/ieee1275/ofpath.c
| ./config.status --file=grub-mkrescue:../grub-2.00/util/grub-mkrescue.in
| ./config.status --file=grub-mkstandalone:../grub-2.00/util/grub-mkstandalone.in
| ../grub-2.00/grub-core/lib/legacy_parse.c: In function 'grub_legacy_parse':
| ../grub-2.00/grub-core/lib/legacy_parse.c:628:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
|       hold_arg = 1;
|       ~~~~~~~~~^~~
| ../grub-2.00/grub-core/lib/legacy_parse.c:629:4: note: here
|     case TYPE_PARTITION:
|     ^~~~
| ./config.status --file=grub-kbdcomp:../grub-2.00/util/grub-kbdcomp.in
| In file included from ../grub-2.00/util/grub-mkimage.c:698:0:
| ../grub-2.00/util/grub-mkimagexx.c: In function 'relocate_addresses64':
| ../grub-2.00/util/grub-mkimagexx.c:477:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
|      {
|      ^
| ../grub-2.00/util/grub-mkimagexx.c:488:3: note: here
|    case R_IA64_LTOFF_FPTR22:
Comment 1 Armin Kuster 2017-08-20 16:35:55 UTC
could not reproduce locally
Comment 2 Jussi Kukkonen 2017-08-21 08:49:04 UTC
Not sure what changed (and why it wouldn't show up locally) but "implicit-fallthrough" is in default Werror with gcc 7 and wasn't there before.

The comment added in grub 2.02 possibly triggers the gcc heuristic for "this fallthrough is intended, don't warn"...
Comment 3 Jussi Kukkonen 2017-08-21 08:55:47 UTC
(In reply to comment #2)
> Not sure what changed (and why it wouldn't show up locally) but
> "implicit-fallthrough" is in default Werror with gcc 7 and wasn't there
> before.

Sorry, it's actually behind "-Wextra" but grub enables that.
Comment 4 Armin Kuster 2017-08-21 15:40:51 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Not sure what changed (and why it wouldn't show up locally) but
> > "implicit-fallthrough" is in default Werror with gcc 7 and wasn't there
> > before.
> 
> Sorry, it's actually behind "-Wextra" but grub enables that.

Are you referring to 

gnu-efi: Fix build with gcc7

http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-bsp/gnu-efi?id=7f14d7de88da7e6e1b6934f9c608d67d80dc8398

Now that description does not indicate if its against 7.2 toolchain in core or on the host.
Comment 5 Jussi Kukkonen 2017-08-22 06:39:00 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Not sure what changed (and why it wouldn't show up locally) but
> > > "implicit-fallthrough" is in default Werror with gcc 7 and wasn't there
> > > before.
> > 
> > Sorry, it's actually behind "-Wextra" but grub enables that.
> 
> Are you referring to 
> 
> gnu-efi: Fix build with gcc7

I don't really know what I'm saying -- just that the error is something I would only expect from gcc 7.
Comment 6 Armin Kuster 2017-08-24 14:36:20 UTC
backported gcc7 patch to see if it fixes this.
Comment 7 Armin Kuster 2017-08-24 17:36:25 UTC
build now passes.