mbox series

[v2,0/2] Accompany -nostdlib with -fno-stack-protector

Message ID 20230731091042.139159-1-akihiko.odaki@daynix.com
Headers show
Series Accompany -nostdlib with -fno-stack-protector | expand

Message

Akihiko Odaki July 31, 2023, 9:10 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.

This is a tree-wide change to add -fno-stack-protector where -nostdlib is
present.

V1 -> V2:
  Dropped changes for pc-bios as they already had the option. (Thomas Huth)
  Make the change for softmmu tests in a central place. (Thomas Huth)

Akihiko Odaki (2):
  tests/migration: Add -fno-stack-protector
  tests/tcg: Add -fno-stack-protector

 tests/tcg/mips/hello-mips.c       | 4 ++--
 tests/migration/s390x/Makefile    | 4 ++--
 tests/tcg/Makefile.target         | 2 +-
 tests/tcg/aarch64/Makefile.target | 2 +-
 tests/tcg/arm/Makefile.target     | 2 +-
 tests/tcg/cris/Makefile.target    | 2 +-
 tests/tcg/hexagon/Makefile.target | 2 +-
 tests/tcg/i386/Makefile.target    | 2 +-
 tests/tcg/minilib/Makefile.target | 2 +-
 tests/tcg/mips/Makefile.target    | 2 +-
 10 files changed, 12 insertions(+), 12 deletions(-)

Comments

Michael Tokarev Nov. 1, 2023, 9:58 a.m. UTC | #1
31.07.2023 12:10, Akihiko Odaki:
> 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.
> 
> This is a tree-wide change to add -fno-stack-protector where -nostdlib is
> present.

Should we perhaps pick this up for -stable too?
The changes seems to be harmless for older compiler and lets to test
qemu with more recent compiler.

/mjt