qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/tcg/s390x: Use -nostdlib for softmmu tests
@ 2023-01-31 18:20 Ilya Leoshkevich
  2023-01-31 18:28 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ilya Leoshkevich @ 2023-01-31 18:20 UTC (permalink / raw)
  To: Richard Henderson, David Hildenbrand
  Cc: Christian Borntraeger, qemu-s390x, qemu-devel, Ilya Leoshkevich

The code currently uses -nostartfiles, but this does not prevent
linking with libc. On Fedora there is no cross-libc, so the linking
step fails.

Fix by using the more comprehensive -nostdlib (that's also what
probe_target_compiler() checks for as well).

Fixes: 503e549e441e ("tests/tcg/s390x: Test unaligned accesses to lowcore")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 tests/tcg/s390x/Makefile.softmmu-target | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Makefile.softmmu-target
index a34fa68473e..50c1b88065d 100644
--- a/tests/tcg/s390x/Makefile.softmmu-target
+++ b/tests/tcg/s390x/Makefile.softmmu-target
@@ -3,7 +3,7 @@ VPATH+=$(S390X_SRC)
 QEMU_OPTS=-action panic=exit-failure -kernel
 
 %: %.S
-	$(CC) -march=z13 -m64 -nostartfiles -static -Wl,-Ttext=0 \
+	$(CC) -march=z13 -m64 -nostdlib -static -Wl,-Ttext=0 \
 		-Wl,--build-id=none $< -o $@
 
 TESTS += unaligned-lowcore
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests/tcg/s390x: Use -nostdlib for softmmu tests
  2023-01-31 18:20 [PATCH] tests/tcg/s390x: Use -nostdlib for softmmu tests Ilya Leoshkevich
@ 2023-01-31 18:28 ` Richard Henderson
  2023-01-31 18:41 ` Alex Bennée
  2023-02-01 11:06 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-01-31 18:28 UTC (permalink / raw)
  To: Ilya Leoshkevich, David Hildenbrand
  Cc: Christian Borntraeger, qemu-s390x, qemu-devel

On 1/31/23 08:20, Ilya Leoshkevich wrote:
> The code currently uses -nostartfiles, but this does not prevent
> linking with libc. On Fedora there is no cross-libc, so the linking
> step fails.
> 
> Fix by using the more comprehensive -nostdlib (that's also what
> probe_target_compiler() checks for as well).
> 
> Fixes: 503e549e441e ("tests/tcg/s390x: Test unaligned accesses to lowcore")
> Signed-off-by: Ilya Leoshkevich<iii@linux.ibm.com>
> ---
>   tests/tcg/s390x/Makefile.softmmu-target | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests/tcg/s390x: Use -nostdlib for softmmu tests
  2023-01-31 18:20 [PATCH] tests/tcg/s390x: Use -nostdlib for softmmu tests Ilya Leoshkevich
  2023-01-31 18:28 ` Richard Henderson
@ 2023-01-31 18:41 ` Alex Bennée
  2023-02-01 11:06 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2023-01-31 18:41 UTC (permalink / raw)
  To: Ilya Leoshkevich
  Cc: Richard Henderson, David Hildenbrand, Christian Borntraeger,
	qemu-s390x, qemu-devel


Ilya Leoshkevich <iii@linux.ibm.com> writes:

> The code currently uses -nostartfiles, but this does not prevent
> linking with libc. On Fedora there is no cross-libc, so the linking
> step fails.
>
> Fix by using the more comprehensive -nostdlib (that's also what
> probe_target_compiler() checks for as well).
>
> Fixes: 503e549e441e ("tests/tcg/s390x: Test unaligned accesses to lowcore")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  tests/tcg/s390x/Makefile.softmmu-target | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Makefile.softmmu-target
> index a34fa68473e..50c1b88065d 100644
> --- a/tests/tcg/s390x/Makefile.softmmu-target
> +++ b/tests/tcg/s390x/Makefile.softmmu-target
> @@ -3,7 +3,7 @@ VPATH+=$(S390X_SRC)
>  QEMU_OPTS=-action panic=exit-failure -kernel
>  
>  %: %.S
> -	$(CC) -march=z13 -m64 -nostartfiles -static -Wl,-Ttext=0 \
> +	$(CC) -march=z13 -m64 -nostdlib -static -Wl,-Ttext=0 \
>  		-Wl,--build-id=none $< -o $@
>  
>  TESTS += unaligned-lowcore

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

I take it this will go via the s390x tree?

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests/tcg/s390x: Use -nostdlib for softmmu tests
  2023-01-31 18:20 [PATCH] tests/tcg/s390x: Use -nostdlib for softmmu tests Ilya Leoshkevich
  2023-01-31 18:28 ` Richard Henderson
  2023-01-31 18:41 ` Alex Bennée
@ 2023-02-01 11:06 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-01 11:06 UTC (permalink / raw)
  To: Ilya Leoshkevich, Richard Henderson, David Hildenbrand
  Cc: Christian Borntraeger, qemu-s390x, qemu-devel

On 31/1/23 19:20, Ilya Leoshkevich wrote:
> The code currently uses -nostartfiles, but this does not prevent
> linking with libc. On Fedora there is no cross-libc, so the linking
> step fails.
> 
> Fix by using the more comprehensive -nostdlib (that's also what
> probe_target_compiler() checks for as well).
> 
> Fixes: 503e549e441e ("tests/tcg/s390x: Test unaligned accesses to lowcore")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>   tests/tcg/s390x/Makefile.softmmu-target | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-01 11:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-31 18:20 [PATCH] tests/tcg/s390x: Use -nostdlib for softmmu tests Ilya Leoshkevich
2023-01-31 18:28 ` Richard Henderson
2023-01-31 18:41 ` Alex Bennée
2023-02-01 11:06 ` Philippe Mathieu-Daudé

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).