Received: from eggs.gnu.org ([2001:4830:134:3::10]:41132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4T3q-0005rc-3S for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4T3m-0001Tg-BR for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:00:17 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:49850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4T3l-0001So-Pi for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:00:14 -0400 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Jun 2015 13:00:12 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0920E17D8066 for ; Mon, 15 Jun 2015 13:01:13 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t5FC087922413498 for ; Mon, 15 Jun 2015 12:00:08 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t5F6rSWe021332 for ; Mon, 15 Jun 2015 02:53:29 -0400 From: Christian Borntraeger Date: Mon, 15 Jun 2015 14:00:31 +0200 Message-Id: <1434369631-76375-8-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1434369631-76375-1-git-send-email-borntraeger@de.ibm.com> References: <1434369631-76375-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 7/7] s390/bios: build with -fdelete-null-pointer-checks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel , Alexander Graf , Christian Borntraeger , Jens Freimann , Cornelia Huck , Aurelien Jarno From: Aurelien Jarno Starting with version 4.9, GCC assumes it can't safely dereference null pointers, and uses this for some optimizations. On s390, the lowcore memory is located at address 0, so this assumption is wrong and breaks the s390-ccw firmware. Pass -fdelete-null-pointer-checks to avoid that. Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Alexander Graf Signed-off-by: Aurelien Jarno Message-Id: <1434363843-14576-1-git-send-email-aurelien@aurel32.net> Signed-off-by: Christian Borntraeger --- pc-bios/s390-ccw/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 009bb8d..746603a 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -10,7 +10,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw) .PHONY : all clean build-all OBJECTS = start.o main.o bootmap.o sclp-ascii.o virtio.o -CFLAGS += -fPIE -fno-stack-protector -ffreestanding +CFLAGS += -fPIE -fno-stack-protector -ffreestanding -fno-delete-null-pointer-checks LDFLAGS += -Wl,-pie -nostdlib build-all: s390-ccw.img -- 2.3.0