From ae431cf4f3bf4ee46098f4dfad1d9f2ccbc7a251 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Tue, 5 Nov 2019 18:45:10 -0500 Subject: rts: Ensure that Rts.h is always included first In general this is the convention that we use in the RTS. On Windows things actually fail if we break it. For instance, you see things like: includes\stg\Types.h:26:9: error: warning: #warning "Mismatch between __USE_MINGW_ANSI_STDIO definitions. If using Rts.h make sure it is the first header included." [-Wcpp] --- rts/linker/elf_got.c | 2 ++ rts/linker/elf_plt.c | 4 +++- rts/linker/elf_plt_aarch64.c | 4 +++- rts/linker/elf_plt_arm.c | 5 +++-- rts/linker/elf_reloc.c | 1 + rts/linker/elf_reloc_aarch64.c | 7 +++++-- rts/linker/elf_util.c | 1 + 7 files changed, 18 insertions(+), 6 deletions(-) (limited to 'rts') diff --git a/rts/linker/elf_got.c b/rts/linker/elf_got.c index 27e0f818a0..991c6a9f91 100644 --- a/rts/linker/elf_got.c +++ b/rts/linker/elf_got.c @@ -1,4 +1,6 @@ +#include "Rts.h" #include "elf_got.h" + #include #if defined(OBJFORMAT_ELF) diff --git a/rts/linker/elf_plt.c b/rts/linker/elf_plt.c index 69a9f0782a..9cd42efff2 100644 --- a/rts/linker/elf_plt.c +++ b/rts/linker/elf_plt.c @@ -1,7 +1,9 @@ +#include "Rts.h" +#include "elf_plt.h" + #include #include #include -#include "elf_plt.h" #if defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH) #if defined(OBJFORMAT_ELF) diff --git a/rts/linker/elf_plt_aarch64.c b/rts/linker/elf_plt_aarch64.c index 85c7a9b0c1..6a9d1ddd94 100644 --- a/rts/linker/elf_plt_aarch64.c +++ b/rts/linker/elf_plt_aarch64.c @@ -1,7 +1,9 @@ -#include +#include "Rts.h" #include "elf_compat.h" #include "elf_plt_aarch64.h" +#include + #if defined(aarch64_HOST_ARCH) #if defined(OBJFORMAT_ELF) diff --git a/rts/linker/elf_plt_arm.c b/rts/linker/elf_plt_arm.c index 4fa9a28b19..bd21243ec4 100644 --- a/rts/linker/elf_plt_arm.c +++ b/rts/linker/elf_plt_arm.c @@ -1,8 +1,9 @@ +#include "Rts.h" +#include "elf_compat.h" + #include #include #include -#include "elf_compat.h" -#include "ghcplatform.h" #if defined(arm_HOST_ARCH) diff --git a/rts/linker/elf_reloc.c b/rts/linker/elf_reloc.c index e1421d2269..410a23607b 100644 --- a/rts/linker/elf_reloc.c +++ b/rts/linker/elf_reloc.c @@ -1,3 +1,4 @@ +#include "Rts.h" #include "elf_reloc.h" #include "elf_plt.h" diff --git a/rts/linker/elf_reloc_aarch64.c b/rts/linker/elf_reloc_aarch64.c index bb15576d06..c2df14b06e 100644 --- a/rts/linker/elf_reloc_aarch64.c +++ b/rts/linker/elf_reloc_aarch64.c @@ -1,11 +1,14 @@ -#include -#include +#include "Rts.h" #include "elf_compat.h" #include "elf_reloc_aarch64.h" #include "util.h" #include "elf_util.h" #include "elf_plt.h" +#include +#include + + #if defined(aarch64_HOST_ARCH) #if defined(OBJFORMAT_ELF) diff --git a/rts/linker/elf_util.c b/rts/linker/elf_util.c index 052b2d9cae..fe7e2c35a4 100644 --- a/rts/linker/elf_util.c +++ b/rts/linker/elf_util.c @@ -1,3 +1,4 @@ +#include "Rts.h" #include "linker/elf_util.h" #if defined(OBJFORMAT_ELF) -- cgit v1.2.1