[gdb/testsuite] Fix gdb.base/nested-subp{2,3}.exp with recent ld
authorTom de Vries <tdevries@suse.de>
Wed, 12 Oct 2022 14:50:16 +0000 (16:50 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 12 Oct 2022 14:50:16 +0000 (16:50 +0200)
commit9693166f6648b3aaa7dc680b3fecda16b63ecfb4
treec003636c0ca89a4ff43c20ad976ab98080d7f7bb
parente2800454ce9d89f9c4587bc20ee7c6cd0122c340
[gdb/testsuite] Fix gdb.base/nested-subp{2,3}.exp with recent ld

On openSUSE Tumbleweed (with ld 2.39) I get for test-case
gdb.base/nested-subp2.exp:
...
gdb compile failed, ld: warning: tmp.o: requires executable stack \
  (because the .note.GNU-stack section is executable)
...

Fix this by compiling with -Wl,--no-warn-execstack.

Likewise in gdb.base/nested-subp3.exp

Tested on x86_64-linux.
gdb/testsuite/gdb.base/nested-subp2.exp
gdb/testsuite/gdb.base/nested-subp3.exp