From 112c32eb54782f246bdc5d5c1a1a124833629cda Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Thu, 24 Oct 2019 18:11:40 +0200 Subject: [PATCH] ports: noux-pkg/gcc_arm_64 Added ARMv8 as a native gcc target. This requires a rebuild of the tool chain. issue #3537 --- repos/ports/ports/gcc.hash | 2 +- .../src/noux-pkg/gcc/patches/aarch64.patch | 27 ++++++++++++++----- repos/ports/src/noux-pkg/gcc_arm_64/target.mk | 7 +++++ 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 repos/ports/src/noux-pkg/gcc_arm_64/target.mk diff --git a/repos/ports/ports/gcc.hash b/repos/ports/ports/gcc.hash index 7f24e9c571..e770f28a05 100644 --- a/repos/ports/ports/gcc.hash +++ b/repos/ports/ports/gcc.hash @@ -1 +1 @@ -3283673a91ae961dfb4e439854ef4f2a23bdc793 +20345a83596fa42a25a85938329aea54bb4b2146 diff --git a/repos/ports/src/noux-pkg/gcc/patches/aarch64.patch b/repos/ports/src/noux-pkg/gcc/patches/aarch64.patch index 921e80b942..a2fd58fcd2 100644 --- a/repos/ports/src/noux-pkg/gcc/patches/aarch64.patch +++ b/repos/ports/src/noux-pkg/gcc/patches/aarch64.patch @@ -1,10 +1,23 @@ +diff --git a/gcc/config.host b/gcc/config.host +index b5a4eb1..64a85dc 100644 +--- a/gcc/config.host ++++ b/gcc/config.host +@@ -99,7 +99,7 @@ case ${host} in + esac + + case ${host} in +- aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia*) ++ aarch64*-*-* | aarch64*-*-linux* | aarch64*-*-fuchsia*) + case ${target} in + aarch64*-*-*) + host_extra_gcc_objs="driver-aarch64.o" diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h -index b9bf979..86f64f9 100644 +index 976f9af..3c150d1 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h -@@ -935,4 +935,20 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); - extern tree aarch64_fp16_type_node; - extern tree aarch64_fp16_ptr_type_node; +@@ -1061,4 +1061,20 @@ extern poly_uint16 aarch64_sve_vg; + + #define REGMODE_NATURAL_SIZE(MODE) aarch64_regmode_natural_size (MODE) +/* genode.h */ + @@ -24,10 +37,10 @@ index b9bf979..86f64f9 100644 + #endif /* GCC_AARCH64_H */ diff --git a/libgcc/config.host b/libgcc/config.host -index fd206a4..a9a07ad 100644 +index 5e9cfa8..58af2f0 100644 --- a/libgcc/config.host +++ b/libgcc/config.host -@@ -331,8 +331,9 @@ esac +@@ -334,8 +334,9 @@ esac case ${host} in aarch64*-*-elf | aarch64*-*-rtems*) @@ -37,4 +50,4 @@ index fd206a4..a9a07ad 100644 + tmake_file="$tmake_file t-freebsd t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" tmake_file="${tmake_file} ${cpu_type}/t-aarch64" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" - ;; + md_unwind_header=aarch64/aarch64-unwind.h diff --git a/repos/ports/src/noux-pkg/gcc_arm_64/target.mk b/repos/ports/src/noux-pkg/gcc_arm_64/target.mk new file mode 100644 index 0000000000..1993a65207 --- /dev/null +++ b/repos/ports/src/noux-pkg/gcc_arm_64/target.mk @@ -0,0 +1,7 @@ +PROGRAM_PREFIX = genode-aarch64- +GCC_TARGET = aarch64-none-elf + +# cross-compiling does not work yet +REQUIRES = arm_64 + +include $(PRG_DIR)/../gcc/target.inc