File seabios.mx86-used-note.patch of Package xen
From: Bruce Rogers <brogers@suse.com>
Date: Thu, 4 Feb 2021 11:06:47 -0700
Subject: mx86-used-note
build: be explicit about -mx86-used-note=no
binutils v2.36 switched the default for the assembler's -mx86-used-note,
which caused breakage building seavgabios as follows:
ld: section .note.gnu.property LMA [0000000000000000,0000000000000027]
overlaps section .text LMA [0000000000000000,0000000000006e87]
Fix by explicitly specifying -mx86-used-note=no to assembler in seabios'
Makefile (boo#1181775)
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
Makefile | 3 +++
1 file changed, 3 insertions(+)
--- a/Makefile
+++ b/Makefile
@@ -39,44 +39,47 @@ SRC16=$(SRCBOTH)
SRC32FLAT=$(SRCBOTH) post.c e820map.c malloc.c romfile.c x86.c optionroms.c \
pmm.c font.c boot.c bootsplash.c jpeg.c bmp.c tcgbios.c sha1.c \
hw/pcidevice.c hw/ahci.c hw/pvscsi.c hw/usb-xhci.c hw/usb-hub.c hw/sdcard.c \
fw/coreboot.c fw/lzmadecode.c fw/multiboot.c fw/csm.c fw/biostables.c \
fw/paravirt.c fw/shadow.c fw/pciinit.c fw/smm.c fw/smp.c fw/mtrr.c fw/xen.c \
fw/acpi.c fw/mptable.c fw/pirtable.c fw/smbios.c fw/romfile_loader.c \
hw/virtio-ring.c hw/virtio-pci.c hw/virtio-blk.c hw/virtio-scsi.c \
hw/tpm_drivers.c
SRC32SEG=string.c output.c pcibios.c apm.c stacks.c hw/pci.c hw/serialio.c
DIRS=src src/hw src/fw vgasrc
# Default compiler flags
+as-option=$(shell if test -z "`$(1) $(2) -c -o /dev/null -xc /dev/null 2>&1`" \
+ ; then echo "$(2)"; else echo "$(3)"; fi ;)
cc-option=$(shell if test -z "`$(1) $(2) -S -o /dev/null -xc /dev/null 2>&1`" \
; then echo "$(2)"; else echo "$(3)"; fi ;)
EXTRAVERSION=
CPPFLAGS = -P -MD -MT $@
COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \
-Wall -Wno-strict-aliasing -Wold-style-definition \
$(call cc-option,$(CC),-Wtype-limits,) \
-m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \
-minline-all-stringops -fomit-frame-pointer \
-freg-struct-return -ffreestanding -fno-delete-null-pointer-checks \
-ffunction-sections -fdata-sections -fno-common -fno-merge-constants
COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-pie,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,)
COMMA := ,
+COMMONCFLAGS += $(call as-option,$(CC),-Wa$(COMMA)-mx86-used-note=no,)
CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0
CFLAGSSEG := $(COMMONCFLAGS) -DMODESEGMENT=1 -fno-defer-pop \
$(call cc-option,$(CC),-fno-jump-tables,-DMANUAL_NO_JUMP_TABLE) \
$(call cc-option,$(CC),-fno-tree-switch-conversion,)
CFLAGS32SEG := $(CFLAGSSEG) -DMODE16=0
CFLAGS16 := $(CFLAGSSEG) -DMODE16=1 \
$(call cc-option,$(CC),-m16,-Wa$(COMMA)src/code16gcc.s) \
$(call cc-option,$(CC),--param large-stack-frame=4,-fno-inline)
# Run with "make V=1" to see the actual compile commands
ifdef V