diff mbox series

[2/3] tests/migration: Add -fno-stack-protector

Message ID 20230731065904.5869-3-akihiko.odaki@daynix.com
State New
Headers show
Series Accompany -nostdlib with -fno-stack-protector | expand

Commit Message

Akihiko Odaki July 31, 2023, 6:58 a.m. UTC
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>
---
 tests/migration/s390x/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Juan Quintela July 31, 2023, 7:10 a.m. UTC | #1
Akihiko Odaki <akihiko.odaki@daynix.com> 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>

Reviewed-by: Juan Quintela <quintela@redhat.com>

For whatever is related to migration.
My liker options skills are (very) rusty, so I will let others decided
if this is the correct way to do it O:-)
Thomas Huth July 31, 2023, 7:44 a.m. UTC | #2
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>
> ---
>   tests/migration/s390x/Makefile | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/migration/s390x/Makefile b/tests/migration/s390x/Makefile
> index 6393c3e5b9..6671de2efc 100644
> --- a/tests/migration/s390x/Makefile
> +++ b/tests/migration/s390x/Makefile
> @@ -6,8 +6,8 @@ all: a-b-bios.h
>   fwdir=../../../pc-bios/s390-ccw
>   
>   CFLAGS+=-ffreestanding -fno-delete-null-pointer-checks -fPIE -Os \
> -	-msoft-float -march=z900 -fno-asynchronous-unwind-tables -Wl,-pie \
> -	-Wl,--build-id=none -nostdlib
> +	-msoft-float -march=z900 -fno-asynchronous-unwind-tables \
> +	-fno-stack-protector -Wl,-pie -Wl,--build-id=none -nostdlib
>   
>   a-b-bios.h: s390x.elf
>   	echo "$$__note" > header.tmp

Reviewed-by: Thomas Huth <thuth@redhat.com>
Philippe Mathieu-Daudé Aug. 1, 2023, 9:48 p.m. UTC | #3
On 31/7/23 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>
> ---
>   tests/migration/s390x/Makefile | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Queuing this single patch via misc-fixes.
diff mbox series

Patch

diff --git a/tests/migration/s390x/Makefile b/tests/migration/s390x/Makefile
index 6393c3e5b9..6671de2efc 100644
--- a/tests/migration/s390x/Makefile
+++ b/tests/migration/s390x/Makefile
@@ -6,8 +6,8 @@  all: a-b-bios.h
 fwdir=../../../pc-bios/s390-ccw
 
 CFLAGS+=-ffreestanding -fno-delete-null-pointer-checks -fPIE -Os \
-	-msoft-float -march=z900 -fno-asynchronous-unwind-tables -Wl,-pie \
-	-Wl,--build-id=none -nostdlib
+	-msoft-float -march=z900 -fno-asynchronous-unwind-tables \
+	-fno-stack-protector -Wl,-pie -Wl,--build-id=none -nostdlib
 
 a-b-bios.h: s390x.elf
 	echo "$$__note" > header.tmp