⛏️ index : buildtools.git

author Fredrik Holmqvist <fredrik.holmqvist@gmail.com> 2021-02-27 8:41:01.0 +01:00:00
committer Adrien Destugues <pulkomandy@gmail.com> 2021-03-15 21:51:09.0 +00:00:00
commit
4ab0fe4d95a13d203733d2dac3895c014ba7d293 [patch]
tree
7a251b34948807d202288afb585204e12a44e3ca
parent
f4963fa33e01d7801cbc621cd3afa9bb2e630b17
download
r1beta3.tar.gz

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 <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

Diff

 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 */