qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 15/21] linux-user/riscv: Add vdso


From: Richard Henderson
Subject: Re: [PULL 15/21] linux-user/riscv: Add vdso
Date: Sat, 13 Jan 2024 11:05:27 +1100
User-agent: Mozilla Thunderbird

On 1/13/24 10:37, Vineet Gupta wrote:


On 1/12/24 13:35, Richard Henderson wrote:
On 1/12/24 08:49, Vineet Gupta wrote:
Hi Richard, Alistair

On 10/30/23 14:17, Richard Henderson wrote:
diff --git a/linux-user/riscv/Makefile.vdso b/linux-user/riscv/Makefile.vdso
new file mode 100644
index 0000000000..2c257dbfda
--- /dev/null
+++ b/linux-user/riscv/Makefile.vdso
@@ -0,0 +1,15 @@
+include $(BUILD_DIR)/tests/tcg/riscv64-linux-user/config-target.mak
+
+SUBDIR = $(SRC_PATH)/linux-user/riscv
+VPATH += $(SUBDIR)
+
+all: $(SUBDIR)/vdso-32.so $(SUBDIR)/vdso-64.so
+
+LDFLAGS = -nostdlib -shared -fpic -Wl,-h,linux-vdso.so.1 -Wl,--build-id=sha1 \
+         -Wl,--hash-style=both -Wl,-T,$(SUBDIR)/vdso.ld
+
+$(SUBDIR)/vdso-32.so: vdso.S vdso.ld vdso-asmoffset.h
+       $(CC) -o $@ $(LDFLAGS) -mabi=ilp32d -march=rv32g $<
+
+$(SUBDIR)/vdso-64.so: vdso.S vdso.ld vdso-asmoffset.h
+       $(CC) -o $@ $(LDFLAGS) -mabi=lp64d -march=rv64g $<
So by default qemu ships the vdso binary. How can one rebuild it ?

  From skimming the build files it seems following ought to do it
      make update-linux-vdso

with a prior configure cmd like below with PATH pointing to the cross
compiler.
../configure  --target-list=riscv64-linux-user
--cross-cc-riscv64=riscv64-unknown-linux-gnu-gcc
Yes, that should do it.

But it doesn't, I'm sure we are missing something basis here.
Do you get an error message?
Did $(BUILD_DIR)/tests/tcg/riscv64-linux-user/config-target.mak get created 
properly?

It was indeed, but invoking make wasn't doing anything.

Odd.  It Just Works here...

What do you have in the "Cross compilers" section of the configure output?

I would expect '--cross-prefix-riscv64=...' to be a better option that just gcc. And if you have it installed as "riscv64-linux-gnu-", I would not expect you to need to provide any configure option at all -- it should be auto-detected.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]