qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: "Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Leonardo Bras" <leobras@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Brian Cain" <bcain@quicinc.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Song Gao" <gaosong@loongson.cn>,
	"Xiaojuan Yang" <yangxiaojuan@loongson.cn>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Chris Wulff" <crwulff@gmail.com>, "Marek Vasut" <marex@denx.de>,
	"David Hildenbrand" <david@redhat.com>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	qemu-devel@nongnu.org, qemu-s390x@nongnu.org,
	qemu-arm@nongnu.org
Subject: Re: [PATCH 1/3] pc-bios/optionrom: Add -fno-stack-protector
Date: Mon, 31 Jul 2023 09:46:35 +0200	[thread overview]
Message-ID: <c887c365-e4ab-a2e5-25b3-3685b7737f4a@redhat.com> (raw)
In-Reply-To: <20230731065904.5869-2-akihiko.odaki@daynix.com>

On 31/07/2023 08.58, Akihiko Odaki wrote:
> A build of GCC 13.2 will have stack protector enabled by default if it
> was configured with --enable-default-ssp option. For such a compiler,
> it is necessary to explicitly disable stack protector when linking
> without standard libraries.
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
>   pc-bios/optionrom/Makefile | 2 +-
>   pc-bios/s390-ccw/Makefile  | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
> index b1fff0ba6c..f220d81f2c 100644
> --- a/pc-bios/optionrom/Makefile
> +++ b/pc-bios/optionrom/Makefile
> @@ -19,7 +19,7 @@ quiet-command = $(call quiet-@,$2 $@)$1
>   override CPPFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
>   
>   override CFLAGS += -march=i486 -Wall $(EXTRA_CFLAGS) -m16
> -override CFLAGS += -ffreestanding -I$(TOPSRC_DIR)/include
> +override CFLAGS += -ffreestanding -fno-stack-protector -I$(TOPSRC_DIR)/include
>   
>   cc-test = $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>/dev/null
>   cc-option = if $(call cc-test, $1); then \
> diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
> index acfcd1e71a..446d448913 100644
> --- a/pc-bios/s390-ccw/Makefile
> +++ b/pc-bios/s390-ccw/Makefile
> @@ -38,7 +38,7 @@ OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \
>   EXTRA_CFLAGS += -Wall
>   EXTRA_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -fno-common -fPIE
>   EXTRA_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables
> -EXTRA_CFLAGS += -msoft-float
> +EXTRA_CFLAGS += -fno-stack-protector -msoft-float
>   EXTRA_CFLAGS += -std=gnu99
>   LDFLAGS += -Wl,-pie -nostdlib
>   

Both Makefiles seem to add -no-stack-protector in other lines already, so 
this patch does not seem to be necessary?

  Thomas



  reply	other threads:[~2023-07-31  7:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31  6:58 [PATCH 0/3] Accompany -nostdlib with -fno-stack-protector Akihiko Odaki
2023-07-31  6:58 ` [PATCH 1/3] pc-bios/optionrom: Add -fno-stack-protector Akihiko Odaki
2023-07-31  7:46   ` Thomas Huth [this message]
2023-07-31  6:58 ` [PATCH 2/3] tests/migration: " Akihiko Odaki
2023-07-31  7:10   ` Juan Quintela
2023-07-31  7:44   ` Thomas Huth
2023-08-01 21:48   ` Philippe Mathieu-Daudé
2023-07-31  6:58 ` [PATCH 3/3] tests/tcg: " Akihiko Odaki
2023-07-31  7:51   ` Ilya Leoshkevich
2023-07-31  7:54   ` Thomas Huth

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=c887c365-e4ab-a2e5-25b3-3685b7737f4a@redhat.com \
    --to=thuth@redhat.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=bcain@quicinc.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=crwulff@gmail.com \
    --cc=david@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=eduardo@habkost.net \
    --cc=gaosong@loongson.cn \
    --cc=iii@linux.ibm.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=leobras@redhat.com \
    --cc=marex@denx.de \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.org \
    --cc=yangxiaojuan@loongson.cn \
    /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).