Dear SeaBIOS folks,
Building SeaBIOS with GCC 8, the warnings below are shown.
```
$ gcc-8 --version
gcc-8 (Debian 8-20180218-1) 8.0.1 20180218 (experimental) [trunk revision
257787]
[…]
$ git log --oneline -1
5adc8bd (HEAD -> master, origin/master, origin/HEAD) tpm: Handle unimplemented
TIS_REG_IFACE_ID in tis_get_tpm_version()
$ make CC=gcc-8
scripts/kconfig/conf --olddefconfig /dev/shm/seabios2/src/Kconfig
#
# configuration written to /dev/shm/seabios2/.config
#
Build Kconfig config file
Compile checking out/src/misc.o
Compile checking out/src/stacks.o
Compile checking out/src/output.o
Compile checking out/src/string.o
Compile checking out/src/block.o
Compile checking out/src/cdrom.o
Compile checking out/src/disk.o
Compile checking out/src/mouse.o
Compile checking out/src/kbd.o
Compile checking out/src/system.o
Compile checking out/src/serial.o
Compile checking out/src/sercon.o
Compile checking out/src/clock.o
Compile checking out/src/resume.o
Compile checking out/src/pnpbios.o
Compile checking out/src/vgahooks.o
Compile checking out/src/pcibios.o
Compile checking out/src/apm.o
Compile checking out/src/cp437.o
Compile checking out/src/hw/pci.o
Compile checking out/src/hw/timer.o
Compile checking out/src/hw/rtc.o
Compile checking out/src/hw/dma.o
Compile checking out/src/hw/pic.o
Compile checking out/src/hw/ps2port.o
Compile checking out/src/hw/serialio.o
Compile checking out/src/hw/usb.o
Compile checking out/src/hw/usb-uhci.o
Compile checking out/src/hw/usb-ohci.o
Compile checking out/src/hw/usb-ehci.o
Compile checking out/src/hw/usb-hid.o
Compile checking out/src/hw/usb-msc.o
Compile checking out/src/hw/usb-uas.o
Compile checking out/src/hw/blockcmd.o
Compile checking out/src/hw/floppy.o
Compile checking out/src/hw/ata.o
Compile checking out/src/hw/ramdisk.o
Compile checking out/src/hw/lsi-scsi.o
Compile checking out/src/hw/esp-scsi.o
Compile checking out/src/hw/megasas.o
Compile checking out/src/hw/mpt-scsi.o
Compile checking out/src/post.o
Compile checking out/src/e820map.o
Compile checking out/src/malloc.o
Compile checking out/src/romfile.o
Compile checking out/src/x86.o
Compile checking out/src/optionroms.o
Compile checking out/src/pmm.o
Compile checking out/src/font.o
Compile checking out/src/boot.o
Compile checking out/src/bootsplash.o
Compile checking out/src/jpeg.o
Compile checking out/src/bmp.o
Compile checking out/src/tcgbios.o
Compile checking out/src/sha1.o
Compile checking out/src/hw/pcidevice.o
Compile checking out/src/hw/ahci.o
Compile checking out/src/hw/pvscsi.o
Compile checking out/src/hw/usb-xhci.o
Compile checking out/src/hw/usb-hub.o
Compile checking out/src/hw/sdcard.o
Compile checking out/src/fw/coreboot.o
Compile checking out/src/fw/lzmadecode.o
Compile checking out/src/fw/multiboot.o
Compile checking out/src/fw/csm.o
Compile checking out/src/fw/biostables.o
Compile checking out/src/fw/paravirt.o
Compile checking out/src/fw/shadow.o
In file included from src/fw/shadow.c:17:
src/fw/shadow.c: In function 'qemu_reboot':
src/string.h:23:16: warning: '__builtin_memcpy' offset -1048576 is out of the
bounds [0, 1] of object 'code32flat_start' with type 'char' [-Warray-bounds]
#define memcpy __builtin_memcpy
src/fw/shadow.c:190:9: note: in expansion of macro 'memcpy'
memcpy(cstart, cstart + BIOS_SRC_OFFSET, hrp - cstart);
^~~~~~
In file included from src/biosvar.h:11,
from src/fw/paravirt.h:5,
from src/fw/shadow.c:16:
src/fw/shadow.c:176:28: note: 'code32flat_start' declared here
void *cstart = VSYMBOL(code32flat_start), *cend = VSYMBOL(code32flat_end);
^~~~~~~~~~~~~~~~
src/memmap.h:18:36: note: in definition of macro 'SYMBOL'
#define SYMBOL(SYM) ({ extern char SYM; (u32)&SYM; })
^~~
src/fw/shadow.c:176:20: note: in expansion of macro 'VSYMBOL'
void *cstart = VSYMBOL(code32flat_start), *cend = VSYMBOL(code32flat_end);
^~~~~~~
In file included from src/fw/shadow.c:17:
src/string.h:23:16: warning: '__builtin_memcpy' offset -1048572 is out of the
bounds [0, 4] of object 'HaveRunPost' with type 'int' [-Warray-bounds]
#define memcpy __builtin_memcpy
src/fw/shadow.c:191:9: note: in expansion of macro 'memcpy'
memcpy(hrp + 4, hrp + 4 + BIOS_SRC_OFFSET, cend - (hrp + 4));
^~~~~~
In file included from src/fw/shadow.c:18:
src/util.h:193:12: note: 'HaveRunPost' declared here
extern int HaveRunPost;
^~~~~~~~~~~
Compile checking out/src/fw/pciinit.o
Compile checking out/src/fw/smm.o
Compile checking out/src/fw/smp.o
Compile checking out/src/fw/mtrr.o
Compile checking out/src/fw/xen.o
Compile checking out/src/fw/acpi.o
Compile checking out/src/fw/mptable.o
Compile checking out/src/fw/pirtable.o
Compile checking out/src/fw/smbios.o
Compile checking out/src/fw/romfile_loader.o
Compile checking out/src/hw/virtio-ring.o
Compile checking out/src/hw/virtio-pci.o
Compile checking out/src/hw/virtio-blk.o
Compile checking out/src/hw/virtio-scsi.o
Compile checking out/src/hw/tpm_drivers.o
Compile checking out/src/hw/nvme.o
Compiling whole program out/ccode32flat.o
In file included from out/ccode32flat.o.tmp.c:4:
In function 'qemu_reboot',
inlined from 'tryReboot' at ./src/resume.c:129:5,
inlined from 'handle_resume32' at ./src/resume.c:156:5:
./src/string.c:156:16: warning: '__builtin_memcpy' offset -1048576 is out of
the bounds [0, 1] of object 'code32flat_start' with type 'char' [-Warray-bounds]
#define memcpy __builtin_memcpy
./src/fw/shadow.c:190:9: note: in expansion of macro 'memcpy'
memcpy(cstart, cstart + BIOS_SRC_OFFSET, hrp - cstart);
^~~~~~
In file included from ./src/biosvar.h:11,
from ./src/misc.c:8,
from out/ccode32flat.o.tmp.c:1:
./src/resume.c: In function 'handle_resume32':
./src/fw/shadow.c:176:28: note: 'code32flat_start' declared here
void *cstart = VSYMBOL(code32flat_start), *cend = VSYMBOL(code32flat_end);
^~~~~~~~~~~~~~~~
./src/memmap.h:18:36: note: in definition of macro 'SYMBOL'
#define SYMBOL(SYM) ({ extern char SYM; (u32)&SYM; })
^~~
./src/fw/shadow.c:176:20: note: in expansion of macro 'VSYMBOL'
void *cstart = VSYMBOL(code32flat_start), *cend = VSYMBOL(code32flat_end);
^~~~~~~
In file included from out/ccode32flat.o.tmp.c:4:
In function 'qemu_reboot',
inlined from 'tryReboot' at ./src/resume.c:129:5,
inlined from 'handle_resume32' at ./src/resume.c:156:5:
./src/string.c:156:16: warning: '__builtin_memcpy' offset -1048572 is out of
the bounds [0, 4] of object 'HaveRunPost' with type 'int' [-Warray-bounds]
#define memcpy __builtin_memcpy
./src/fw/shadow.c:191:9: note: in expansion of macro 'memcpy'
memcpy(hrp + 4, hrp + 4 + BIOS_SRC_OFFSET, cend - (hrp + 4));
^~~~~~
In file included from ./src/stacks.c:17,
from out/ccode32flat.o.tmp.c:2:
./src/resume.c: In function 'handle_resume32':
./src/util.h:193:12: note: 'HaveRunPost' declared here
extern int HaveRunPost;
^~~~~~~~~~~
Compiling whole program out/code32seg.o
Compiling whole program out/ccode16.o
Compiling to assembler out/src/asm-offsets.s
Generating offset file out/asm-offsets.h
Compiling (16bit) out/romlayout.o
Building ld scripts
Version: rel-1.11.0-25-g5adc8bd
Fixed space: 0xe05b-0x10000 total: 8101 slack: 12 Percent slack: 0.1%
16bit size: 37920
32bit segmented size: 2198
32bit flat size: 38890
32bit flat init size: 80416
Lowmem size: 2240
f-segment var size: 1248
Linking out/rom16.o
Stripping out/rom16.strip.o
Linking out/rom32seg.o
Stripping out/rom32seg.strip.o
Linking out/rom.o
Prepping out/bios.bin.prep
Total size: 168448 Fixed: 80256 Free: 93696 (used 64.3% of 256KiB rom)
Creating out/bios.bin
```
Thanks,
Paul# # Automatically generated file; DO NOT EDIT. # SeaBIOS Configuration # # # General Features # # CONFIG_COREBOOT is not set CONFIG_QEMU=y # CONFIG_CSM is not set CONFIG_QEMU_HARDWARE=y CONFIG_XEN=y CONFIG_THREADS=y CONFIG_RELOCATE_INIT=y CONFIG_BOOTMENU=y CONFIG_BOOTSPLASH=y CONFIG_BOOTORDER=y CONFIG_ENTRY_EXTRASTACK=y CONFIG_MALLOC_UPPERMEMORY=y CONFIG_ROM_SIZE=0 # # Hardware support # CONFIG_ATA=y # CONFIG_ATA_DMA is not set # CONFIG_ATA_PIO32 is not set CONFIG_AHCI=y CONFIG_SDCARD=y CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_SCSI=y CONFIG_PVSCSI=y CONFIG_ESP_SCSI=y CONFIG_LSI_SCSI=y CONFIG_MEGASAS=y CONFIG_MPT_SCSI=y CONFIG_FLOPPY=y CONFIG_FLASH_FLOPPY=y CONFIG_NVME=y CONFIG_PS2PORT=y CONFIG_USB=y CONFIG_USB_UHCI=y CONFIG_USB_OHCI=y CONFIG_USB_EHCI=y CONFIG_USB_XHCI=y CONFIG_USB_MSC=y CONFIG_USB_UAS=y CONFIG_USB_HUB=y CONFIG_USB_KEYBOARD=y CONFIG_USB_MOUSE=y CONFIG_SERIAL=y CONFIG_SERCON=y CONFIG_LPT=y CONFIG_RTC_TIMER=y CONFIG_HARDWARE_IRQ=y CONFIG_USE_SMM=y CONFIG_CALL32_SMM=y CONFIG_MTRR_INIT=y CONFIG_PMTIMER=y CONFIG_TSC_TIMER=y # # BIOS interfaces # CONFIG_DRIVES=y CONFIG_CDROM_BOOT=y CONFIG_CDROM_EMU=y CONFIG_PCIBIOS=y CONFIG_APMBIOS=y CONFIG_PNPBIOS=y CONFIG_OPTIONROMS=y CONFIG_PMM=y CONFIG_BOOT=y CONFIG_KEYBOARD=y CONFIG_KBD_CALL_INT15_4F=y CONFIG_MOUSE=y CONFIG_S3_RESUME=y CONFIG_VGAHOOKS=y # CONFIG_DISABLE_A20 is not set # CONFIG_WRITABLE_UPPERMEMORY is not set CONFIG_TCGBIOS=y # # BIOS Tables # CONFIG_PIRTABLE=y CONFIG_MPTABLE=y CONFIG_SMBIOS=y CONFIG_ACPI=y CONFIG_ACPI_DSDT=y CONFIG_FW_ROMFILE_LOAD=y # # VGA ROM # CONFIG_NO_VGABIOS=y # CONFIG_VGA_STANDARD_VGA is not set # CONFIG_VGA_CIRRUS is not set # CONFIG_VGA_BOCHS is not set # CONFIG_VGA_GEODEGX2 is not set # CONFIG_VGA_GEODELX is not set # CONFIG_BUILD_VGABIOS is not set CONFIG_VGA_EXTRA_STACK_SIZE=512 # # Debugging # CONFIG_DEBUG_LEVEL=1 # CONFIG_DEBUG_SERIAL is not set # CONFIG_DEBUG_SERIAL_MMIO is not set CONFIG_DEBUG_IO=y
signature.asc
Description: This is a digitally signed message part
_______________________________________________ SeaBIOS mailing list [email protected] https://mail.coreboot.org/mailman/listinfo/seabios
