From 4ab0fe4d95a13d203733d2dac3895c014ba7d293 Mon Sep 17 00:00:00 2001 From: Fredrik Holmqvist Date: Sat, 27 Feb 2021 08:41:01 +0100 Subject: [PATCH] Redo gcc AARCH64 config Previous setup failed to do link bootstrap libz with msissing unwind symbols due to not finding libgcc_s.so.1 Change-Id: I80a85502843f82d2324cf816cb761ddfa78e289f Reviewed-on: https://review.haiku-os.org/c/buildtools/+/3754 Reviewed-by: Fredrik Holmqvist Reviewed-by: Adrien Destugues --- gcc/gcc/config/aarch64/aarch64-haiku.h | 49 +++++++++++++++---------------------------------- 1 file changed, 15 insertions(+), 34 deletions(-) diff --git a/gcc/gcc/config/aarch64/aarch64-haiku.h b/gcc/gcc/config/aarch64/aarch64-haiku.h index 1d49930..4dd2bda 100644 --- a/gcc/gcc/config/aarch64/aarch64-haiku.h +++ a/gcc/gcc/config/aarch64/aarch64-haiku.h @@ -22,32 +22,22 @@ #ifndef GCC_AARCH64_HAIKU_H #define GCC_AARCH64_HAIKU_H -#define HAIKU_DYNAMIC_LINKER "/system/runtime_loader" - -#define CPP_SPEC "%{pthread:-D_REENTRANT}" +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define ("__HAIKU__"); \ + builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ + builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ + builtin_define ("__STDC_ISO_10646__=201103L"); \ + builtin_assert ("system=haiku"); \ + } \ + while (0) #if TARGET_BIG_ENDIAN_DEFAULT #define TARGET_LINKER_EMULATION "aarch64haikub" #else #define TARGET_LINKER_EMULATION "aarch64haiku" #endif - -#undef SUBTARGET_EXTRA_LINK_SPEC -#define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION - -#undef HAIKU_TARGET_LINK_SPEC -#define HAIKU_TARGET_LINK_SPEC " \ - %{p:%nconsider using `-pg' instead of `-p' with gprof (1) } \ - %{v:-V} \ - %{assert*} %{R*} %{rpath*} %{defsym*} \ - %{shared:-Bshareable %{h*} %{soname*}} \ - %{symbolic:-Bsymbolic} \ - %{static:-Bstatic} \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!shared:-dynamic-linker " HAIKU_DYNAMIC_LINKER " }} \ - -X" SUBTARGET_EXTRA_LINK_SPEC " \ - %{mbig-endian:-EB} %{mlittle-endian:-EL}" #if TARGET_FIX_ERR_A53_835769_DEFAULT #define CA53_ERR_835769_SPEC \ @@ -65,21 +55,7 @@ " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}" #endif -#define LINK_SPEC HAIKU_TARGET_LINK_SPEC \ - CA53_ERR_835769_SPEC \ - CA53_ERR_843419_SPEC -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - builtin_define ("__HAIKU__"); \ - builtin_define ("__stdcall=__attribute__((__stdcall__))"); \ - builtin_define ("__cdecl=__attribute__((__cdecl__))"); \ - builtin_define ("__STDC_ISO_10646__=201103L"); \ - builtin_assert ("system=haiku"); \ - } \ - while (0) - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack /* Uninitialized common symbols in non-PIE executables, even with @@ -90,5 +66,10 @@ /* Define this to be nonzero if static stack checking is supported. */ #define STACK_CHECK_STATIC_BUILTIN 1 + + +#undef LINK_SPEC +#define LINK_SPEC "%{!o*:-o %b} -m " TARGET_LINKER_EMULATION " %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}\ + %{mbig-endian:-EB} %{mlittle-endian:-EL} " CA53_ERR_835769_SPEC " " CA53_ERR_843419_SPEC " -X" #endif /* GCC_AARCH64_HAIKU_H */ -- gitore 0.2.1