From: John Thomson <lists@johnthomson.fastmail.com.au>
To: xen-devel@lists.xenproject.org
Subject: staging GCC 8.1.0 build warnings
Date: Thu, 10 May 2018 09:38:26 +1000 [thread overview]
Message-ID: <1525909106.2372757.1366819088.5605C10E@webmail.messagingengine.com> (raw)
Hi,
Trying to build Xen staging with GCC 8.1.0 and facing some of the new warnings:
For OVMF, I used these three commits:
https://github.com/tianocore/edk2/compare/1d212a83df0eaf32a6f5d4159beb2d77832e0231^...9de306701312f986c9638cb819d3f1f848d55cab.patch
1d212a83df0eaf32a6f5d4159beb2d77832e0231
9222154ae7b3eef75ae88cdb56158256227cb929
9de306701312f986c9638cb819d3f1f848d55cab
For IPXE, one of these patches:
http://lists.ipxe.org/pipermail/ipxe-devel/2018-April/006146.html
https://build.opensuse.org/package/view_file/openSUSE:Factory/qemu/ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch?expand=1
I was still unable to build IPXE at the Xen selected commit in tools/firmware/etherboot/Makefile:IPXE_GIT_TAG, with Errors:
[BUILD] bin/netdevice.o
Assembler messages
junk at end of line, first unrecognized character is `@'
can't resolve `__table_entries.2720' {.tbl.net_device_configurators.99 section} - `__table_entries.2722' {.tbl.net_device_configurators.00 section}
can't resolve `__table_entries.2796' {.tbl.net_device_configurators.99 section} - `__table_entries.2798' {.tbl.net_device_configurators.00 section}
I ended up using IPXE master and the OpenSUSE ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
I have not followed this up to find which commit fixes my build yet.
How close to ready are the standalone IPXE patches?
For QEMU, this commit:
https://github.com/qemu/qemu/commit/84c868f6b8f8c1be9d3d65df93cf00b30821401c.patch
84c868f6b8f8c1be9d3d65df93cf00b30821401c
In tools/ocaml/libs/xc/xenctrl_stubs.c
char error_str[1028];
CC xenctrl_stubs.o
xenctrl_stubs.c: In function 'failwith_xc':
xenctrl_stubs.c:65:17: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
"%d: %s: %s", error->code,
^
xenctrl_stubs.c:64:4: note: 'snprintf' output 6 or more bytes (assuming 1029) into a destination of size 1028
snprintf(error_str, sizeof(error_str),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"%d: %s: %s", error->code,
~~~~~~~~~~~~~~~~~~~~~~~~~~
xc_error_code_to_desc(error->code),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error->message);
~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
I changed these, but am not sure if this is correct?
char error_str[XC_MAX_ERROR_MSG_LEN + 6]
sizeof(error_str) - 1 in the three snprintf
/build/xen-git/src/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_deprecated.c:437:7: error: 'memcmp' reading 20 bytes from a region of size 8 [-Werror=stringop-overflow=]
if (memcmp(&b1, &newAuthLink, sizeof(TPM_HMAC))) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Not sure how to approach this, I disabled the vtpm stubdoms in my builds for now.
Cheers,
--
John Thomson
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2018-05-09 23:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 23:38 John Thomson [this message]
2018-05-14 17:03 ` staging GCC 8.1.0 build warnings Wei Liu
2018-05-14 18:20 ` Jason Andryuk
2018-05-15 1:42 ` John Thomson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1525909106.2372757.1366819088.5605C10E@webmail.messagingengine.com \
--to=lists@johnthomson.fastmail.com.au \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).