Date: Mon, 17 Jun 2019 11:18:52 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 238654] sysutils/shim: Unbreak build with GCC 9 Message-ID: <bug-238654-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238654 Bug ID: 238654 Summary: sysutils/shim: Unbreak build with GCC 9 Product: Ports & Packages Version: Latest Hardware: Any URL: https://github.com/rhboot/shim/issues/161 OS: Any Status: New Keywords: needs-qa, patch Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: egypcio@FreeBSD.org Reporter: tobik@freebsd.org CC: egypcio@FreeBSD.org Blocks: 238330 Flags: maintainer-feedback?(egypcio@FreeBSD.org) Assignee: egypcio@FreeBSD.org Attachment #205172 maintainer-approval?(egypcio@FreeBSD.org) Flags: CC: egypcio@FreeBSD.org Created attachment 205172 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D205172&action= =3Dedit shim.diff shim fails to build with GCC 9: gcc9 -std=3Dgnu99 -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -Wall -Wsign-compare -Werror -fno-builtin -Werror=3Dsign-comp= are -ffreestanding -I/usr/local/lib/gcc9/gcc/x86_64-portbld-freebsd12.0/9.1.0/include "-DDEFAULT_LOADER=3DL\"\\\\grub.efi\"" "-DDEFAULT_LOADER_CHAR=3D\"\\\\grub.= efi\"" -nostdinc -ICryptlib -ICryptlib/Include -I/usr/local/include/efi -I/usr/local/include/efi/x86_64 -I/usr/local/include/efi/protocol -I/wrkdirs/usr/ports/sysutils/shim/work/shim-0.9/include -I/usr/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI "-DEFI_ARCH=3DL\"x64\"" "-DDEBUGDIR=3DL\"/usr/lib/debug/usr/share/shim/x64-0.9""/\"" -c -o MokMan= ager.o MokManager.c MokManager.c: In function 'write_back_mok_list': MokManager.c:1040:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=3Daddress-of-packed-member] 1040 | if (CompareGuid(&(list[i].Type), &CertType) =3D=3D 0) | ^~~~~~~~~~~~~~~ MokManager.c:1062:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=3Daddress-of-packed-member] 1062 | if (CompareGuid(&(list[i].Type), &CertType) =3D=3D 0) { | ^~~~~~~~~~~~~~~ MokManager.c: In function 'delete_cert': MokManager.c:1103:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=3Daddress-of-packed-member] 1103 | if (CompareGuid(&(mok[i].Type), &CertType) !=3D 0) | ^~~~~~~~~~~~~~ MokManager.c: In function 'delete_hash_in_list': MokManager.c:1154:20: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=3Daddress-of-packed-member] 1154 | if ((CompareGuid(&(mok[i].Type), &Type) !=3D 0) || | ^~~~~~~~~~~~~~ MokManager.c: In function 'delete_keys': MokManager.c:1325:19: error: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Werror=3Daddress-of-packed-member] 1325 | if (CompareGuid(&(del_key[i].Type), &CertType) =3D=3D 0) { | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors http://package18.nyi.freebsd.org/data/120amd64-default-PR238330/2019-06-09_= 20h26m27s/logs/errors/shim-0.9_2.log This has been reported at [1], which leads to a patch [2]. I have adapted it to the version in port which fixes the build but if runtime is fine too I do not know. Can you take a look? [1] https://github.com/rhboot/shim/issues/161 [2] https://github.com/rhboot/shim/pull/170 Referenced Bugs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238330 [Bug 238330] [exp-run] Update GCC_DEFAULT from 8 to 9 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238654-7788>