linux-user: move target_flat.h to target subdirs
PATCH 1/1 linux-user: move target_flat.h to target subdirs
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.
---
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.hlinux-user/aarch64/target_flat.h new file +1 -0
@@ -0,0 +1 @@ +#include "../generic/target_flat.h"
linux-user/arm/target_flat.h new file +1 -0
@@ -0,0 +1 @@ +#include "../generic/target_flat.h"
linux-user/generic/target_flat.h renamed from linux-user/target_flat.h +0 -0
linux-user/m68k/target_flat.h new file +1 -0
@@ -0,0 +1 @@ +#include "../generic/target_flat.h"
linux-user/microblaze/target_flat.h new file +1 -0
@@ -0,0 +1 @@ +#include "../generic/target_flat.h"
linux-user/sh4/target_flat.h new file +1 -0
@@ -0,0 +1 @@ +#include "../generic/target_flat.h"
Signature · 1 line
2.39.0
Quoted 23 lines · Mike Frysinger
This makes
target_flat.hbehave like every othertarget_xxx.hheader. 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.hheader is handled.Signed-off-by Mike Frysinger<[email protected]>--- 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(+)
Quoted 6 lines
create mode 100644
linux-user/aarch64/target_flat.hcreate mode 100644linux-user/arm/target_flat.hrename linux-user/{ =>generic}/target_flat.h(100%) create mode 100644linux-user/m68k/target_flat.hcreate mode 100644linux-user/microblaze/target_flat.hcreate mode 100644linux-user/sh4/target_flat.h
r~
Laurent Vivier
AppliedLe 29/01/2023 à 01:46, Mike Frysinger a écrit :
Quoted 68 lines
This makes
target_flat.hbehave like every othertarget_xxx.hheader. 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.hheader is handled.Signed-off-by Mike Frysinger <[email protected]>--- 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.hcreate mode 100644linux-user/arm/target_flat.hrename linux-user/{ =>generic}/target_flat.h(100%) create mode 100644linux-user/m68k/target_flat.hcreate mode 100644linux-user/microblaze/target_flat.hcreate mode 100644linux-user/sh4/target_flat.hlinux-user/aarch64/target_flat.h new file +1
-0@@ -0,0 +1 @@ +#include "../generic/target_flat.h" linux-user/arm/target_flat.h new file +1
-0@@ -0,0 +1 @@ +#include "../generic/target_flat.h" linux-user/generic/target_flat.h renamed from linux-user/target_flat.h +0
-0linux-user/m68k/target_flat.h new file +1
-0@@ -0,0 +1 @@ +#include "../generic/target_flat.h" linux-user/microblaze/target_flat.h new file +1
-0@@ -0,0 +1 @@ +#include "../generic/target_flat.h" linux-user/sh4/target_flat.h new file +0
-0
linux-user/sh4/target_flat.h line 1
Quoted 1 line
linux-user/sh4/target_flat.h new file +1
-0@@ -0,0 +1 @@ +#include "../generic/target_flat.h"
Applied to my linux-user-for-8.0 branch.
Thanks,
Laurent