* [PATCH] linux-user: move target_flat.h to target subdirs
@ 2023-01-29 0:46 Mike Frysinger
2023-01-29 5:46 ` Richard Henderson
2023-01-30 8:40 ` Laurent Vivier
0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2023-01-29 0:46 UTC (permalink / raw)
To: qemu-devel, Laurent Vivier
This makes target_flat.h behave like every other target_xxx.h header.
It also makes it actually work -- while the current header says adding
a header to the target subdir overrides the common one, it doesn't.
This is for two reasons:
* meson.build adds -Ilinux-user before -Ilinux-user/$arch
* the compiler search path for "target_flat.h" looks in the same dir
as the source file before searching -I paths.
This can be seen with the xtensa port -- the subdir settings aren't
used which breaks stack setup.
Move it to the generic/ subdir and add include stubs like every
other target_xxx.h header is handled.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
linux-user/aarch64/target_flat.h | 1 +
linux-user/arm/target_flat.h | 1 +
linux-user/{ => generic}/target_flat.h | 0
linux-user/m68k/target_flat.h | 1 +
linux-user/microblaze/target_flat.h | 1 +
linux-user/sh4/target_flat.h | 1 +
6 files changed, 5 insertions(+)
create mode 100644 linux-user/aarch64/target_flat.h
create mode 100644 linux-user/arm/target_flat.h
rename linux-user/{ => generic}/target_flat.h (100%)
create mode 100644 linux-user/m68k/target_flat.h
create mode 100644 linux-user/microblaze/target_flat.h
create mode 100644 linux-user/sh4/target_flat.h
diff --git a/linux-user/aarch64/target_flat.h b/linux-user/aarch64/target_flat.h
new file mode 100644
index 000000000000..bc83224cea12
--- /dev/null
+++ b/linux-user/aarch64/target_flat.h
@@ -0,0 +1 @@
+#include "../generic/target_flat.h"
diff --git a/linux-user/arm/target_flat.h b/linux-user/arm/target_flat.h
new file mode 100644
index 000000000000..bc83224cea12
--- /dev/null
+++ b/linux-user/arm/target_flat.h
@@ -0,0 +1 @@
+#include "../generic/target_flat.h"
diff --git a/linux-user/target_flat.h b/linux-user/generic/target_flat.h
similarity index 100%
rename from linux-user/target_flat.h
rename to linux-user/generic/target_flat.h
diff --git a/linux-user/m68k/target_flat.h b/linux-user/m68k/target_flat.h
new file mode 100644
index 000000000000..bc83224cea12
--- /dev/null
+++ b/linux-user/m68k/target_flat.h
@@ -0,0 +1 @@
+#include "../generic/target_flat.h"
diff --git a/linux-user/microblaze/target_flat.h b/linux-user/microblaze/target_flat.h
new file mode 100644
index 000000000000..bc83224cea12
--- /dev/null
+++ b/linux-user/microblaze/target_flat.h
@@ -0,0 +1 @@
+#include "../generic/target_flat.h"
diff --git a/linux-user/sh4/target_flat.h b/linux-user/sh4/target_flat.h
new file mode 100644
index 000000000000..bc83224cea12
--- /dev/null
+++ b/linux-user/sh4/target_flat.h
@@ -0,0 +1 @@
+#include "../generic/target_flat.h"
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] linux-user: move target_flat.h to target subdirs
2023-01-29 0:46 [PATCH] linux-user: move target_flat.h to target subdirs Mike Frysinger
@ 2023-01-29 5:46 ` Richard Henderson
2023-01-30 8:40 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-01-29 5:46 UTC (permalink / raw)
To: Mike Frysinger, qemu-devel, Laurent Vivier
On 1/28/23 14:46, Mike Frysinger wrote:
> This makes target_flat.h behave like every other target_xxx.h header.
> It also makes it actually work -- while the current header says adding
> a header to the target subdir overrides the common one, it doesn't.
> This is for two reasons:
> * meson.build adds -Ilinux-user before -Ilinux-user/$arch
> * the compiler search path for "target_flat.h" looks in the same dir
> as the source file before searching -I paths.
>
> This can be seen with the xtensa port -- the subdir settings aren't
> used which breaks stack setup.
>
> Move it to the generic/ subdir and add include stubs like every
> other target_xxx.h header is handled.
>
> Signed-off-by: Mike Frysinger<vapier@gentoo.org>
> ---
> linux-user/aarch64/target_flat.h | 1 +
> linux-user/arm/target_flat.h | 1 +
> linux-user/{ => generic}/target_flat.h | 0
> linux-user/m68k/target_flat.h | 1 +
> linux-user/microblaze/target_flat.h | 1 +
> linux-user/sh4/target_flat.h | 1 +
> 6 files changed, 5 insertions(+)
> create mode 100644 linux-user/aarch64/target_flat.h
> create mode 100644 linux-user/arm/target_flat.h
> rename linux-user/{ => generic}/target_flat.h (100%)
> create mode 100644 linux-user/m68k/target_flat.h
> create mode 100644 linux-user/microblaze/target_flat.h
> create mode 100644 linux-user/sh4/target_flat.h
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] linux-user: move target_flat.h to target subdirs
2023-01-29 0:46 [PATCH] linux-user: move target_flat.h to target subdirs Mike Frysinger
2023-01-29 5:46 ` Richard Henderson
@ 2023-01-30 8:40 ` Laurent Vivier
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2023-01-30 8:40 UTC (permalink / raw)
To: Mike Frysinger, qemu-devel
Le 29/01/2023 à 01:46, Mike Frysinger a écrit :
> This makes target_flat.h behave like every other target_xxx.h header.
> It also makes it actually work -- while the current header says adding
> a header to the target subdir overrides the common one, it doesn't.
> This is for two reasons:
> * meson.build adds -Ilinux-user before -Ilinux-user/$arch
> * the compiler search path for "target_flat.h" looks in the same dir
> as the source file before searching -I paths.
>
> This can be seen with the xtensa port -- the subdir settings aren't
> used which breaks stack setup.
>
> Move it to the generic/ subdir and add include stubs like every
> other target_xxx.h header is handled.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> linux-user/aarch64/target_flat.h | 1 +
> linux-user/arm/target_flat.h | 1 +
> linux-user/{ => generic}/target_flat.h | 0
> linux-user/m68k/target_flat.h | 1 +
> linux-user/microblaze/target_flat.h | 1 +
> linux-user/sh4/target_flat.h | 1 +
> 6 files changed, 5 insertions(+)
> create mode 100644 linux-user/aarch64/target_flat.h
> create mode 100644 linux-user/arm/target_flat.h
> rename linux-user/{ => generic}/target_flat.h (100%)
> create mode 100644 linux-user/m68k/target_flat.h
> create mode 100644 linux-user/microblaze/target_flat.h
> create mode 100644 linux-user/sh4/target_flat.h
>
> diff --git a/linux-user/aarch64/target_flat.h b/linux-user/aarch64/target_flat.h
> new file mode 100644
> index 000000000000..bc83224cea12
> --- /dev/null
> +++ b/linux-user/aarch64/target_flat.h
> @@ -0,0 +1 @@
> +#include "../generic/target_flat.h"
> diff --git a/linux-user/arm/target_flat.h b/linux-user/arm/target_flat.h
> new file mode 100644
> index 000000000000..bc83224cea12
> --- /dev/null
> +++ b/linux-user/arm/target_flat.h
> @@ -0,0 +1 @@
> +#include "../generic/target_flat.h"
> diff --git a/linux-user/target_flat.h b/linux-user/generic/target_flat.h
> similarity index 100%
> rename from linux-user/target_flat.h
> rename to linux-user/generic/target_flat.h
> diff --git a/linux-user/m68k/target_flat.h b/linux-user/m68k/target_flat.h
> new file mode 100644
> index 000000000000..bc83224cea12
> --- /dev/null
> +++ b/linux-user/m68k/target_flat.h
> @@ -0,0 +1 @@
> +#include "../generic/target_flat.h"
> diff --git a/linux-user/microblaze/target_flat.h b/linux-user/microblaze/target_flat.h
> new file mode 100644
> index 000000000000..bc83224cea12
> --- /dev/null
> +++ b/linux-user/microblaze/target_flat.h
> @@ -0,0 +1 @@
> +#include "../generic/target_flat.h"
> diff --git a/linux-user/sh4/target_flat.h b/linux-user/sh4/target_flat.h
> new file mode 100644
> index 000000000000..bc83224cea12
> --- /dev/null
> +++ b/linux-user/sh4/target_flat.h
> @@ -0,0 +1 @@
> +#include "../generic/target_flat.h"
Applied to my linux-user-for-8.0 branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-30 8:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-29 0:46 [PATCH] linux-user: move target_flat.h to target subdirs Mike Frysinger
2023-01-29 5:46 ` Richard Henderson
2023-01-30 8:40 ` Laurent Vivier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.