mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
parent
664702d8b5
commit
496671e523
@ -1,6 +1,6 @@
|
||||
INC_DIR += $(REP_DIR)/src/core/spec/riscv
|
||||
|
||||
CC_OPT += -fno-delete-null-pointer-checks -msoft-float
|
||||
CC_OPT += -fno-delete-null-pointer-checks
|
||||
|
||||
# add C++ sources
|
||||
SRC_CC += platform_services.cc
|
||||
|
@ -1 +1 @@
|
||||
8943c53d0247a0a69fb62be66a224348170af9be
|
||||
e062a6fcfe6dcbfcba8bbb58f833669766487b56
|
||||
|
@ -1,20 +1,12 @@
|
||||
config.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
gcc/config.gcc | 2 +-
|
||||
gcc/config/arm/unknown-elf.h | 16 ++++++++++++++++
|
||||
gcc/config/i386/x86-64.h | 23 +++++++++++++++++++++--
|
||||
libgcc/config.host | 12 ++++++++++--
|
||||
4 files changed, 48 insertions(+), 5 deletions(-)
|
||||
commit 3f0b1ef2e5aebf896033ee5f78635d349807fc08
|
||||
Author: Sebastian Sumpf <sebastian.sumpf@genode-labs.com>
|
||||
Date: Wed May 3 14:15:07 2017 +0200
|
||||
|
||||
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||
index 1d5b23f..1840148 100644
|
||||
index 263739c..2bc831e 100644
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -1119,7 +1119,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
|
||||
@@ -1123,7 +1123,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
|
||||
case ${target} in
|
||||
arm*-*-eabi*)
|
||||
tm_file="$tm_file newlib-stdint.h"
|
||||
@ -23,6 +15,7 @@ index 1d5b23f..1840148 100644
|
||||
use_gcc_stdint=wrap
|
||||
;;
|
||||
arm*-*-rtems*)
|
||||
|
||||
--- a/gcc/config/arm/arm.h
|
||||
+++ b/gcc/config/arm/arm.h
|
||||
@@ -671,11 +671,11 @@
|
||||
@ -39,6 +32,17 @@ index 1d5b23f..1840148 100644
|
||||
#endif
|
||||
|
||||
/* AAPCS requires that structure alignment is affected by bitfields. */
|
||||
|
||||
@@ -2064,7 +2064,7 @@ riscv*-*-elf*)
|
||||
xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
|
||||
*) echo "Unknown value for enable_multilib"; exit 1
|
||||
esac
|
||||
- tmake_file="${tmake_file} riscv/t-riscv"
|
||||
+ tmake_file="${tmake_file} riscv/t-riscv t-slibgcc"
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
# Force .init_array support. The configure script cannot always
|
||||
|
||||
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
|
||||
index fafe057..8bd23e0 100644
|
||||
--- a/gcc/config/arm/unknown-elf.h
|
||||
@ -103,11 +107,25 @@ index 204f128..8f590fe 100644
|
||||
+/* Don't assume anything about the header files. */
|
||||
+/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57699 */
|
||||
+#define NO_IMPLICIT_EXTERN_C
|
||||
diff --git a/gcc/config/riscv/elf.h b/gcc/config/riscv/elf.h
|
||||
index 391e59f..9271e17 100644
|
||||
--- a/gcc/config/riscv/elf.h
|
||||
+++ b/gcc/config/riscv/elf.h
|
||||
@@ -19,7 +19,8 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
#define LINK_SPEC "\
|
||||
-melf" XLEN_SPEC "lriscv \
|
||||
-%{shared}"
|
||||
+%{shared:-shared} \
|
||||
+%{!static:--eh-frame-hdr}"
|
||||
|
||||
/* Link against Newlib libraries, because the ELF backend assumes Newlib.
|
||||
Handle the circular dependence between libc and libgloss. */
|
||||
diff --git a/libgcc/config.host b/libgcc/config.host
|
||||
index 124f2ce..7b25b79 100644
|
||||
index 40e3038..fd206a4 100644
|
||||
--- a/libgcc/config.host
|
||||
+++ b/libgcc/config.host
|
||||
@@ -309,7 +309,7 @@ case ${host} in
|
||||
@@ -312,7 +312,7 @@ case ${host} in
|
||||
tmake_file=t-vxworks
|
||||
;;
|
||||
*-*-elf)
|
||||
@ -116,7 +134,7 @@ index 124f2ce..7b25b79 100644
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -414,8 +414,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
|
||||
@@ -417,8 +417,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
|
||||
tm_file="$tm_file arm/bpabi-lib.h"
|
||||
case ${host} in
|
||||
arm*-*-eabi* | arm*-*-rtems*)
|
||||
@ -130,7 +148,7 @@ index 124f2ce..7b25b79 100644
|
||||
;;
|
||||
arm*-*-symbianelf*)
|
||||
tmake_file="${tmake_file} arm/t-symbian t-slibgcc-nolc-override"
|
||||
@@ -585,6 +589,10 @@ i[34567]86-*-elf*)
|
||||
@@ -588,6 +592,10 @@ i[34567]86-*-elf*)
|
||||
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
|
||||
;;
|
||||
x86_64-*-elf* | x86_64-*-rtems*)
|
||||
@ -141,3 +159,14 @@ index 124f2ce..7b25b79 100644
|
||||
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
|
||||
;;
|
||||
i[34567]86-*-dragonfly*)
|
||||
@@ -1104,8 +1112,8 @@ riscv*-*-linux*)
|
||||
md_unwind_header=riscv/linux-unwind.h
|
||||
;;
|
||||
riscv*-*-*)
|
||||
- tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address}"
|
||||
- extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
|
||||
+ tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address} t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
|
||||
+ extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
|
||||
;;
|
||||
rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
|
||||
md_unwind_header=rs6000/aix-unwind.h
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
||||
riscv.patch
|
||||
config.patch
|
||||
misc.patch
|
||||
no_short_enums.patch
|
||||
|
@ -175,7 +175,9 @@ LOCAL_LIB_INSTALL_LOCATION = $(shell pwd)/build/lib-install
|
||||
|
||||
TARGET_NAME_x86 = x86_64-pc-elf
|
||||
TARGET_NAME_arm = arm-none-eabi
|
||||
TARGET_NAME_riscv = riscv-unknown-elf
|
||||
TARGET_NAME_riscv = riscv64-unknown-elf
|
||||
|
||||
GCC_CONFIG_riscv = --with-arch=rv64imac
|
||||
|
||||
ifneq ($(VERBOSE),)
|
||||
CONFIG_QUIET = --quiet
|
||||
@ -189,6 +191,19 @@ COMMON_BOOTSTRAP_CONFIG = $(CONFIG_QUIET) \
|
||||
|
||||
BINUTILS_BOOTSTRAP_CONFIG += $(COMMON_BOOTSTRAP_CONFIG)
|
||||
|
||||
ifeq ($(PLATFORM),riscv)
|
||||
LANGUAGES = c,c++
|
||||
GDB_INSTALLED_BINARIES =
|
||||
LIB_GCC = cd $(INSTALL_LOCATION)/lib/gcc/riscv64-unknown-elf/$(GCC_VERSION)/rv64imac/lp64 && \
|
||||
sudo ln -sf ../../include include
|
||||
INSTALL_ADA =
|
||||
else
|
||||
LANGUAGES = c,c++,ada
|
||||
GDB_INSTALLED_BINARIES = $(LOCAL_INSTALL_LOCATION)/bin/genode-$(PLATFORM)-gdb
|
||||
LIB_GCC =
|
||||
INSTALL_ADA = sudo cp $(LOCAL_BOOTSTRAP_INSTALL_LOCATION)/bin/gnatmake $(INSTALL_LOCATION)/bin/genode-$(PLATFORM)-gnatmake
|
||||
endif
|
||||
|
||||
GCC_BOOTSTRAP_CONFIG += $(COMMON_BOOTSTRAP_CONFIG) \
|
||||
--enable-languages=c,c++,ada \
|
||||
--disable-bootstrap \
|
||||
@ -237,7 +252,7 @@ BINUTILS_CONFIG += $(BINUTILS_CONFIG_$(PLATFORM))
|
||||
GDB_CONFIG += $(COMMON_CONFIG) --disable-werror
|
||||
|
||||
GCC_CONFIG += $(COMMON_CONFIG) \
|
||||
--enable-languages=c,c++,go,ada \
|
||||
--enable-languages=$(LANGUAGES),go \
|
||||
--disable-libgo \
|
||||
--disable-gotools \
|
||||
--disable-libssp \
|
||||
@ -300,11 +315,6 @@ GCC_BINARIES = build/$(PLATFORM)/gcc/gcc/g++-cross
|
||||
GCC_INSTALLED_BINARIES = $(LOCAL_INSTALL_LOCATION)/bin/genode-$(PLATFORM)-g++
|
||||
GDB_BINARIES = build/$(PLATFORM)/gdb/gdb/gdb
|
||||
|
||||
ifeq ($(PLATFORM),riscv)
|
||||
GDB_INSTALLED_BINARIES =
|
||||
else
|
||||
GDB_INSTALLED_BINARIES = $(LOCAL_INSTALL_LOCATION)/bin/genode-$(PLATFORM)-gdb
|
||||
endif
|
||||
|
||||
build_all: $(GCC_INSTALLED_BINARIES) $(GDB_INSTALLED_BINARIES)
|
||||
|
||||
@ -492,4 +502,5 @@ cleanall: clean
|
||||
install: build_all
|
||||
$(ECHO) "$(BRIGHT_COL)installing tool chain to '$(INSTALL_LOCATION)'...$(DEFAULT_COL)"
|
||||
$(VERBOSE)sudo cp -a --remove-destination --no-target-directory $(LOCAL_INSTALL_LOCATION) $(INSTALL_LOCATION)
|
||||
$(VERBOSE)sudo cp $(LOCAL_BOOTSTRAP_INSTALL_LOCATION)/bin/gnatmake $(INSTALL_LOCATION)/bin/genode-$(PLATFORM)-gnatmake
|
||||
$(VERBOSE)$(INSTALL_ADA)
|
||||
$(VERBOSE)$(LIB_GCC)
|
||||
|
Loading…
Reference in New Issue
Block a user