mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
parent
9f9271783e
commit
58f2088d3e
@ -67,9 +67,12 @@ endif
|
||||
#
|
||||
# Compiling Ada source codes
|
||||
#
|
||||
# The mandatory runtime directories 'adainclude' and 'adalib' are expected in
|
||||
# the program directory.
|
||||
#
|
||||
%.o: %.adb
|
||||
$(MSG_COMP)$@
|
||||
$(VERBOSE)gnatmake -q -c $(CC_ADA_OPT) $(INCLUDES) $<
|
||||
$(VERBOSE)$(GNATMAKE) -q -c --GCC=$(CC) --RTS=$(PRG_DIR) $< -cargs $(CC_ADA_OPT) $(INCLUDES)
|
||||
|
||||
#
|
||||
# Compiling Rust sources
|
||||
|
@ -11,17 +11,18 @@
|
||||
#
|
||||
# Set undefined CUSTOM_ tools to their default values
|
||||
#
|
||||
CUSTOM_CC ?= $(CROSS_DEV_PREFIX)gcc
|
||||
CUSTOM_CXX ?= $(CROSS_DEV_PREFIX)g++
|
||||
CUSTOM_CXX_LIB ?= $(CUSTOM_CXX)
|
||||
CUSTOM_LD ?= $(CROSS_DEV_PREFIX)ld
|
||||
CUSTOM_AS ?= $(CROSS_DEV_PREFIX)as
|
||||
CUSTOM_AR ?= $(CROSS_DEV_PREFIX)ar
|
||||
CUSTOM_NM ?= $(CROSS_DEV_PREFIX)nm
|
||||
CUSTOM_OBJCOPY ?= $(CROSS_DEV_PREFIX)objcopy
|
||||
CUSTOM_RANLIB ?= $(CROSS_DEV_PREFIX)ranlib
|
||||
CUSTOM_STRIP ?= $(CROSS_DEV_PREFIX)strip
|
||||
CUSTOM_HOST_CC ?= gcc
|
||||
CUSTOM_CC ?= $(CROSS_DEV_PREFIX)gcc
|
||||
CUSTOM_CXX ?= $(CROSS_DEV_PREFIX)g++
|
||||
CUSTOM_CXX_LIB ?= $(CUSTOM_CXX)
|
||||
CUSTOM_LD ?= $(CROSS_DEV_PREFIX)ld
|
||||
CUSTOM_AS ?= $(CROSS_DEV_PREFIX)as
|
||||
CUSTOM_AR ?= $(CROSS_DEV_PREFIX)ar
|
||||
CUSTOM_NM ?= $(CROSS_DEV_PREFIX)nm
|
||||
CUSTOM_OBJCOPY ?= $(CROSS_DEV_PREFIX)objcopy
|
||||
CUSTOM_RANLIB ?= $(CROSS_DEV_PREFIX)ranlib
|
||||
CUSTOM_STRIP ?= $(CROSS_DEV_PREFIX)strip
|
||||
CUSTOM_GNATMAKE ?= $(CROSS_DEV_PREFIX)gnatmake
|
||||
CUSTOM_HOST_CC ?= gcc
|
||||
|
||||
#
|
||||
# GNU utilities
|
||||
@ -37,16 +38,17 @@ ECHO ?= echo -e
|
||||
#
|
||||
# Build tools
|
||||
#
|
||||
CC = $(CUSTOM_CC)
|
||||
CXX = $(CUSTOM_CXX)
|
||||
LD = $(CUSTOM_LD)
|
||||
AS = $(CUSTOM_AS)
|
||||
AR = $(CUSTOM_AR)
|
||||
NM = $(CUSTOM_NM)
|
||||
OBJCOPY = $(CUSTOM_OBJCOPY)
|
||||
RANLIB = $(CUSTOM_RANLIB)
|
||||
STRIP = $(CUSTOM_STRIP)
|
||||
HOST_CC = $(CUSTOM_HOST_CC)
|
||||
CC = $(CUSTOM_CC)
|
||||
CXX = $(CUSTOM_CXX)
|
||||
LD = $(CUSTOM_LD)
|
||||
AS = $(CUSTOM_AS)
|
||||
AR = $(CUSTOM_AR)
|
||||
NM = $(CUSTOM_NM)
|
||||
OBJCOPY = $(CUSTOM_OBJCOPY)
|
||||
RANLIB = $(CUSTOM_RANLIB)
|
||||
STRIP = $(CUSTOM_STRIP)
|
||||
GNATMAKE = $(CUSTOM_GNATMAKE)
|
||||
HOST_CC = $(CUSTOM_HOST_CC)
|
||||
|
||||
#
|
||||
# Compiler and Linker options
|
||||
@ -121,7 +123,7 @@ CC_OPT += $(CC_OPT_PIC)
|
||||
#
|
||||
CC_CXX_OPT += $(CC_OPT)
|
||||
CC_C_OPT += $(CC_OPT)
|
||||
CC_ADA_OPT += $(CC_OLEVEL) $(CC_WARN)
|
||||
CC_ADA_OPT += $(CC_OPT)
|
||||
|
||||
#
|
||||
# Rust-specific arguments
|
||||
|
@ -9,6 +9,7 @@ SPECS += 32bit
|
||||
# Prevent compiler message
|
||||
# "note: the mangling of 'va_list' has changed in GCC 4.4"
|
||||
#
|
||||
CC_OPT += -Wno-psabi
|
||||
CC_C_OPT += -Wno-psabi
|
||||
CC_CXX_OPT += -Wno-psabi
|
||||
|
||||
include $(BASE_DIR)/mk/spec/32bit.mk
|
||||
|
36
repos/base/run/ada.run
Normal file
36
repos/base/run/ada.run
Normal file
@ -0,0 +1,36 @@
|
||||
build "core init test/ada"
|
||||
|
||||
create_boot_directory
|
||||
|
||||
install_config {
|
||||
<config>
|
||||
<parent-provides>
|
||||
<service name="LOG"/>
|
||||
<service name="PD"/>
|
||||
<service name="CPU"/>
|
||||
<service name="ROM"/>
|
||||
<service name="RAM"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service> <parent/> </any-service>
|
||||
</default-route>
|
||||
<start name="test-ada">
|
||||
<resource name="RAM" quantum="10M"/>
|
||||
</start>
|
||||
</config>
|
||||
}
|
||||
|
||||
build_boot_image "core ld.lib.so init test-ada"
|
||||
|
||||
append qemu_args "-nographic -m 64"
|
||||
|
||||
run_genode_until {child "test-ada" exited with exit value 0.*} 10
|
||||
|
||||
grep_output {init -> test-ada}
|
||||
unify_output {0x[0-9a-f]+} "UNIFIED"
|
||||
|
||||
compare_output_to {
|
||||
[init -> test-ada] Warning: using legacy main function, please convert to 'Component::construct'
|
||||
[init -> test-ada] add called with a=13, b=14, result at address UNIFIED
|
||||
[init -> test-ada] print_int called with argument 27
|
||||
}
|
@ -9,12 +9,5 @@ this example calls the Ada main procedure. The test further exercises the call
|
||||
of C functions from Ada code. So the integration of Ada and C code is almost
|
||||
seamless.
|
||||
|
||||
For building the Ada test program, you must have installed the GNU GNAT Ada
|
||||
compiler. Right now, we are using the host version of this compiler, which
|
||||
is save as long as we do not use advanced Ada features such as exceptions.
|
||||
To enable building the test program, add 'gnat' to the 'SPECS' declaration
|
||||
of your '<builddir>/etc/specs.conf'. Otherwise, the Genode build system
|
||||
will skip the target.
|
||||
|
||||
Please note that the current version of this program does not use 'gnatbind'.
|
||||
Therefore, package elaboration is not executed.
|
||||
|
2
repos/base/src/test/ada/adainclude/system.ads
Normal file
2
repos/base/src/test/ada/adainclude/system.ads
Normal file
@ -0,0 +1,2 @@
|
||||
Package System is
|
||||
end System;
|
0
repos/base/src/test/ada/adalib/system.ali
Normal file
0
repos/base/src/test/ada/adalib/system.ali
Normal file
@ -1,5 +1,4 @@
|
||||
TARGET = test-ada
|
||||
REQUIRES = gnat
|
||||
SRC_ADA = main.adb
|
||||
SRC_CC = add.cc startup.cc
|
||||
LIBS = base
|
||||
|
@ -85,6 +85,9 @@ binary_$(ICU_DAT).o : $(ICU_DAT)
|
||||
|
||||
CC_OPT += -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION
|
||||
|
||||
# prevent redefinition of the 'uintptr_t' type
|
||||
CC_OPT += -D__intptr_t_defined
|
||||
|
||||
CC_WARN += -Wno-deprecated-declarations
|
||||
|
||||
LIBS = stdcxx pthread
|
||||
|
@ -960,7 +960,7 @@ _ZN4Libc6Plugin11getaddrinfoEPKcS2_PK8addrinfoPPS3_ T
|
||||
_ZN4Libc6Plugin11getpeernameEPNS_15File_descriptorEP8sockaddrPj T
|
||||
_ZN4Libc6Plugin11getsocknameEPNS_15File_descriptorEP8sockaddrPj T
|
||||
_ZN4Libc6Plugin12freeaddrinfoEP8addrinfo T
|
||||
_ZN4Libc6Plugin13getdirentriesEPNS_15File_descriptorEPcjPx T
|
||||
_ZN4Libc6Plugin13getdirentriesEPNS_15File_descriptorEPcmPx T
|
||||
_ZN4Libc6Plugin13getdirentriesEPNS_15File_descriptorEPcmPl T
|
||||
_ZN4Libc6Plugin13supports_mmapEv T
|
||||
_ZN4Libc6Plugin13supports_openEPKci T
|
||||
@ -982,7 +982,7 @@ _ZN4Libc6Plugin21supports_freeaddrinfoEP8addrinfo T
|
||||
_ZN4Libc6Plugin3dupEPNS_15File_descriptorE T
|
||||
_ZN4Libc6Plugin4bindEPNS_15File_descriptorEPK8sockaddrj T
|
||||
_ZN4Libc6Plugin4dup2EPNS_15File_descriptorES2_ T
|
||||
_ZN4Libc6Plugin4mmapEPvjiiPNS_15File_descriptorEx T
|
||||
_ZN4Libc6Plugin4mmapEPvmiiPNS_15File_descriptorEx T
|
||||
_ZN4Libc6Plugin4mmapEPvmiiPNS_15File_descriptorEl T
|
||||
_ZN4Libc6Plugin4openEPKci T
|
||||
_ZN4Libc6Plugin4pipeEPPNS_15File_descriptorE T
|
||||
|
@ -1 +1 @@
|
||||
4a2b060f31752d9adcdc7ecb7e3c425a14cfd072
|
||||
0885f819fb527fb3930cf56b7bc118f364c6f074
|
||||
|
32
repos/libports/src/lib/libc/patches/types.patch
Normal file
32
repos/libports/src/lib/libc/patches/types.patch
Normal file
@ -0,0 +1,32 @@
|
||||
+++ src/lib/libc/sys/i386/include/_types.h
|
||||
@@ -89,11 +89,11 @@ typedef __int8_t __int_least8_t;
|
||||
typedef __int16_t __int_least16_t;
|
||||
typedef __int32_t __int_least32_t;
|
||||
typedef __int64_t __int_least64_t;
|
||||
-typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
|
||||
+typedef __PTRDIFF_TYPE__ __ptrdiff_t; /* ptr1 - ptr2 */
|
||||
typedef __int32_t __register_t;
|
||||
typedef __int32_t __segsz_t; /* segment size (in pages) */
|
||||
-typedef __uint32_t __size_t; /* sizeof() */
|
||||
-typedef __int32_t __ssize_t; /* byte count or error */
|
||||
+typedef __SIZE_TYPE__ __size_t; /* sizeof() */
|
||||
+typedef __PTRDIFF_TYPE__ __ssize_t; /* byte count or error */
|
||||
typedef __int32_t __time_t; /* time()... */
|
||||
typedef __uint32_t __uintfptr_t;
|
||||
typedef __uint64_t __uintmax_t;
|
||||
+++ src/lib/libc/sys/arm/include/_types.h
|
||||
@@ -82,11 +82,11 @@
|
||||
typedef __int16_t __int_least16_t;
|
||||
typedef __int32_t __int_least32_t;
|
||||
typedef __int64_t __int_least64_t;
|
||||
-typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
|
||||
+typedef __PTRDIFF_TYPE__ __ptrdiff_t; /* ptr1 - ptr2 */
|
||||
typedef __int32_t __register_t;
|
||||
typedef __int32_t __segsz_t; /* segment size (in pages) */
|
||||
-typedef __uint32_t __size_t; /* sizeof() */
|
||||
-typedef __int32_t __ssize_t; /* byte count or error */
|
||||
+typedef __SIZE_TYPE__ __size_t; /* sizeof() */
|
||||
+typedef __PTRDIFF_TYPE__ __ssize_t; /* byte count or error */
|
||||
typedef __int64_t __time_t; /* time()... */
|
||||
typedef __uint32_t __uintfptr_t;
|
||||
typedef __uint64_t __uintmax_t;
|
@ -1 +1 @@
|
||||
252baf48de6641bad2af9ea82c716a4e50c1e74d
|
||||
8943c53d0247a0a69fb62be66a224348170af9be
|
||||
|
@ -1,9 +1,9 @@
|
||||
LICENSE := GPLv3
|
||||
VERSION := 4.9.2
|
||||
VERSION := 6.3.0
|
||||
DOWNLOADS := gcc.archive
|
||||
|
||||
URL(gcc) := ftp://ftp.fu-berlin.de/gnu/gcc/gcc-$(VERSION)/gcc-$(VERSION).tar.bz2
|
||||
SHA(gcc) := 79dbcb09f44232822460d80b033c962c0237c6d8
|
||||
SHA(gcc) := 928ab552666ee08eed645ff20ceb49d139205dea
|
||||
SIG(gcc) := ${URL(gcc)}.sig
|
||||
KEY(gcc) := GNU
|
||||
DIR(gcc) := src/noux-pkg/gcc
|
||||
|
@ -695,7 +695,7 @@ extern "C" void sync(void)
|
||||
}
|
||||
|
||||
|
||||
extern "C" int kill(int pid, int sig)
|
||||
extern "C" int kill(__pid_t pid, int sig)
|
||||
{
|
||||
if (verbose_signals)
|
||||
log(__func__, ": pid=", pid, ", sig=", sig);
|
||||
|
@ -4,14 +4,24 @@ From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
gcc/config/arm/arm.h | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
gcc/config/arm/arm.h | 3 +--
|
||||
libgcc/config/arm/unwind-arm.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
|
||||
index c60d9a4..fefa7d4 100644
|
||||
index ad123dd..31ccb95 100644
|
||||
--- a/gcc/config/arm/arm.h
|
||||
+++ b/gcc/config/arm/arm.h
|
||||
@@ -2381,7 +2381,6 @@ extern const char *arm_rewrite_mcpu (int argc, const char **argv);
|
||||
@@ -865,7 +865,7 @@ extern int arm_arch_crc;
|
||||
#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, ARM_EH_STACKADJ_REGNUM)
|
||||
|
||||
#ifndef ARM_TARGET2_DWARF_FORMAT
|
||||
-#define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_pcrel
|
||||
+#define ARM_TARGET2_DWARF_FORMAT (DW_EH_PE_pcrel | DW_EH_PE_indirect)
|
||||
#endif
|
||||
|
||||
/* ttype entries (the only interesting data references used)
|
||||
@@ -2250,7 +2250,6 @@ extern const char *arm_rewrite_mcpu (int argc, const char **argv);
|
||||
#if defined(__arm__)
|
||||
extern const char *host_detect_local_cpu (int argc, const char **argv);
|
||||
# define EXTRA_SPEC_FUNCTIONS \
|
||||
@ -19,3 +29,16 @@ index c60d9a4..fefa7d4 100644
|
||||
BIG_LITTLE_CPU_SPEC_FUNCTIONS
|
||||
|
||||
# define MCPU_MTUNE_NATIVE_SPECS \
|
||||
diff --git a/libgcc/config/arm/unwind-arm.h b/libgcc/config/arm/unwind-arm.h
|
||||
index d67383f..9812a47 100644
|
||||
--- a/libgcc/config/arm/unwind-arm.h
|
||||
+++ b/libgcc/config/arm/unwind-arm.h
|
||||
@@ -49,7 +49,7 @@ extern "C" {
|
||||
return 0;
|
||||
|
||||
#if (defined(linux) && !defined(__uClinux__)) || defined(__NetBSD__) \
|
||||
- || defined(__FreeBSD__)
|
||||
+ || defined(__FreeBSD__) || 1
|
||||
/* Pc-relative indirect. */
|
||||
#define _GLIBCXX_OVERRIDE_TTYPE_ENCODING (DW_EH_PE_pcrel | DW_EH_PE_indirect)
|
||||
tmp += ptr;
|
||||
|
@ -1,8 +1,20 @@
|
||||
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(-)
|
||||
|
||||
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||
index b7ebc07..5acf469 100644
|
||||
index 1d5b23f..1840148 100644
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -1060,7 +1060,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
|
||||
@@ -1119,7 +1119,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
|
||||
case ${target} in
|
||||
arm*-*-eabi*)
|
||||
tm_file="$tm_file newlib-stdint.h"
|
||||
@ -11,29 +23,27 @@ index b7ebc07..5acf469 100644
|
||||
use_gcc_stdint=wrap
|
||||
;;
|
||||
arm*-*-rtems*)
|
||||
@@ -1969,7 +1969,7 @@ riscv*-*-linux*) # Linux RISC-V
|
||||
;;
|
||||
riscv*-*-elf*) # Linux RISC-V
|
||||
tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
|
||||
- tmake_file="${tmake_file} riscv/t-elf"
|
||||
+ tmake_file="${tmake_file} riscv/t-elf t-slibgcc"
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
gcc_cv_initfini_array=yes
|
||||
@@ -2915,7 +2915,7 @@ i[34567]86-*-linux* | x86_64-*-linux*)
|
||||
tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
|
||||
;;
|
||||
i[34567]86-*-* | x86_64-*-*)
|
||||
- tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
|
||||
+ tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386 t-slibgcc"
|
||||
;;
|
||||
powerpc*-*-* | rs6000-*-*)
|
||||
tm_file="${tm_file} rs6000/option-defaults.h"
|
||||
--- a/gcc/config/arm/arm.h
|
||||
+++ b/gcc/config/arm/arm.h
|
||||
@@ -671,11 +671,11 @@
|
||||
#define MAX_FIXED_MODE_SIZE 64
|
||||
|
||||
#ifndef SIZE_TYPE
|
||||
-#define SIZE_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "long unsigned int")
|
||||
+#define SIZE_TYPE (TARGET_AAPCS_BASED ? "long unsigned int" : "long unsigned int")
|
||||
#endif
|
||||
|
||||
#ifndef PTRDIFF_TYPE
|
||||
-#define PTRDIFF_TYPE (TARGET_AAPCS_BASED ? "int" : "long int")
|
||||
+#define PTRDIFF_TYPE (TARGET_AAPCS_BASED ? "long int" : "long int")
|
||||
#endif
|
||||
|
||||
/* AAPCS requires that structure alignment is affected by bitfields. */
|
||||
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
|
||||
index ec6f9a4..579172d 100644
|
||||
index fafe057..8bd23e0 100644
|
||||
--- a/gcc/config/arm/unknown-elf.h
|
||||
+++ b/gcc/config/arm/unknown-elf.h
|
||||
@@ -94,3 +94,19 @@
|
||||
@@ -98,3 +98,19 @@
|
||||
which will depend on abort, which is defined in libc. */
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
|
||||
@ -54,9 +64,22 @@ index ec6f9a4..579172d 100644
|
||||
+/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57699 */
|
||||
+#define NO_IMPLICIT_EXTERN_C
|
||||
diff --git a/gcc/config/i386/x86-64.h b/gcc/config/i386/x86-64.h
|
||||
index 16fc685..85b07bb 100644
|
||||
index 204f128..8f590fe 100644
|
||||
--- a/gcc/config/i386/x86-64.h
|
||||
+++ b/gcc/config/i386/x86-64.h
|
||||
@@ -37,10 +37,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
#define MCOUNT_NAME "mcount"
|
||||
|
||||
#undef SIZE_TYPE
|
||||
-#define SIZE_TYPE (TARGET_LP64 ? "long unsigned int" : "unsigned int")
|
||||
+#define SIZE_TYPE (TARGET_LP64 ? "long unsigned int" : "long unsigned int")
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
-#define PTRDIFF_TYPE (TARGET_LP64 ? "long int" : "int")
|
||||
+#define PTRDIFF_TYPE (TARGET_LP64 ? "long int" : "long int")
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "int"
|
||||
@@ -106,3 +106,22 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
|
||||
#undef TARGET_SECTION_TYPE_FLAGS
|
||||
@ -80,34 +103,11 @@ index 16fc685..85b07bb 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/riscv.h b/gcc/config/riscv/riscv.h
|
||||
index 4533cff..1f78497 100644
|
||||
--- a/gcc/config/riscv/riscv.h
|
||||
+++ b/gcc/config/riscv/riscv.h
|
||||
@@ -171,14 +171,11 @@ along with GCC; see the file COPYING3. If not see
|
||||
%(subtarget_asm_spec)"
|
||||
|
||||
/* Extra switches sometimes passed to the linker. */
|
||||
-
|
||||
-#ifndef LINK_SPEC
|
||||
+#undef LINK_SPEC
|
||||
#define LINK_SPEC "\
|
||||
-%{!T:-dT riscv.ld} \
|
||||
-%{m64:-melf64lriscv} \
|
||||
-%{m32:-melf32lriscv} \
|
||||
-%{shared}"
|
||||
-#endif /* LINK_SPEC defined */
|
||||
+-melf64lriscv \
|
||||
+%{shared:-shared} \
|
||||
+%{!static:--eh-frame-hdr}"
|
||||
|
||||
/* This macro defines names of additional specifications to put in the specs
|
||||
that can be used in various specifications like CC1_SPEC. Its definition
|
||||
diff --git a/libgcc/config.host b/libgcc/config.host
|
||||
index 8a30368..83b5dba 100644
|
||||
index 124f2ce..7b25b79 100644
|
||||
--- a/libgcc/config.host
|
||||
+++ b/libgcc/config.host
|
||||
@@ -300,7 +300,7 @@ case ${host} in
|
||||
@@ -309,7 +309,7 @@ case ${host} in
|
||||
tmake_file=t-vxworks
|
||||
;;
|
||||
*-*-elf)
|
||||
@ -116,7 +116,7 @@ index 8a30368..83b5dba 100644
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -387,8 +387,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
|
||||
@@ -414,8 +414,12 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
|
||||
tm_file="$tm_file arm/bpabi-lib.h"
|
||||
case ${host} in
|
||||
arm*-*-eabi* | arm*-*-rtems*)
|
||||
@ -124,31 +124,20 @@ index 8a30368..83b5dba 100644
|
||||
+ # The 't-eh-dw2-dip' tmake file is needed to let the tool chain use 'unwind-dw2-fde-dip.c',
|
||||
+ # needed for the exception handling on Genode in the presence of shared libraries.
|
||||
+ tmake_file="${tmake_file} t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
|
||||
tmake_file="${tmake_file} arm/t-bpabi"
|
||||
tmake_file="${tmake_file} arm/t-bpabi t-crtfm"
|
||||
- extra_parts="crtbegin.o crtend.o crti.o crtn.o"
|
||||
+ extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
|
||||
;;
|
||||
arm*-*-symbianelf*)
|
||||
tmake_file="${tmake_file} arm/t-symbian t-slibgcc-nolc-override"
|
||||
@@ -546,6 +550,10 @@ i[34567]86-*-elf*)
|
||||
@@ -585,6 +589,10 @@ i[34567]86-*-elf*)
|
||||
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
|
||||
;;
|
||||
x86_64-*-elf*)
|
||||
x86_64-*-elf* | x86_64-*-rtems*)
|
||||
+ # The 't-slibgcc' tmake file is needed to have libgcc_eh.a built.
|
||||
+ # The 't-eh-dw2-dip' tmake file is needed to let the tool chain use 'unwind-dw2-fde-dip.c',
|
||||
+ # needed for the exception handling on Genode in the presence of shared libraries.
|
||||
+ tmake_file="$tmake_file t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
|
||||
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
|
||||
;;
|
||||
i[34567]86-*-freebsd*)
|
||||
@@ -1014,8 +1022,8 @@ riscv*-*-linux*)
|
||||
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
|
||||
;;
|
||||
riscv*-*-*)
|
||||
- tmake_file="${tmake_file} riscv/t-fpbit riscv/t-dpbit riscv/t-elf"
|
||||
- extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
|
||||
+ tmake_file="${tmake_file} riscv/t-fpbit riscv/t-dpbit riscv/t-elf 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
|
||||
i[34567]86-*-dragonfly*)
|
||||
|
@ -1,33 +0,0 @@
|
||||
Required for building with newer gcc
|
||||
|
||||
See https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00375.html
|
||||
|
||||
--
|
||||
diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
|
||||
index 68acd3d..953262f 100644
|
||||
--- a/gcc/cp/cfns.gperf
|
||||
+++ b/gcc/cp/cfns.gperf
|
||||
@@ -22,6 +22,9 @@ __inline
|
||||
static unsigned int hash (const char *, unsigned int);
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
+#ifdef __GNUC_STDC_INLINE__
|
||||
+__attribute__ ((__gnu_inline__))
|
||||
+#endif
|
||||
#endif
|
||||
const char * libc_name_p (const char *, unsigned int);
|
||||
%}
|
||||
diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
|
||||
index 1c6665d..6d00c0e 100644
|
||||
--- a/gcc/cp/cfns.h
|
||||
+++ b/gcc/cp/cfns.h
|
||||
@@ -53,6 +53,9 @@ __inline
|
||||
static unsigned int hash (const char *, unsigned int);
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
+#ifdef __GNUC_STDC_INLINE__
|
||||
+__attribute__ ((__gnu_inline__))
|
||||
+#endif
|
||||
#endif
|
||||
const char * libc_name_p (const char *, unsigned int);
|
||||
/* maximum key range = 391, duplicates = 0 */
|
@ -8,7 +8,7 @@ Remove the dependency on libbacktrace, which needs a libc.
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/go/config-lang.in b/gcc/go/config-lang.in
|
||||
index c33e218..ca2b3b1 100644
|
||||
index 8e27ade..b326557 100644
|
||||
--- a/gcc/go/config-lang.in
|
||||
+++ b/gcc/go/config-lang.in
|
||||
@@ -28,7 +28,7 @@ language="go"
|
||||
@ -17,6 +17,6 @@ index c33e218..ca2b3b1 100644
|
||||
|
||||
-target_libs="target-libgo target-libffi target-libbacktrace"
|
||||
+target_libs="target-libgo target-libffi"
|
||||
lang_dirs="gotools"
|
||||
|
||||
# The Go frontend is written in C++, so we need to build the C++
|
||||
# compiler during stage 1.
|
||||
|
@ -14,10 +14,10 @@ compiler as much as possible.
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
|
||||
index 15d876e..e026e9a 100644
|
||||
index ece1256..a73ce57 100644
|
||||
--- a/libstdc++-v3/crossconfig.m4
|
||||
+++ b/libstdc++-v3/crossconfig.m4
|
||||
@@ -278,7 +278,6 @@ case "${host}" in
|
||||
@@ -271,7 +271,6 @@ case "${host}" in
|
||||
AC_DEFINE(HAVE_TANHF)
|
||||
;;
|
||||
*)
|
||||
|
@ -4,30 +4,34 @@ From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
libgcc/Makefile.in | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
libgcc/Makefile.in | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
|
||||
index e86e98d..ca2275d 100644
|
||||
index f09b39b..cabc562 100644
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -907,7 +907,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
|
||||
@@ -913,7 +913,11 @@ all: libunwind.a
|
||||
endif
|
||||
|
||||
ifeq ($(enable_shared),yes)
|
||||
-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
|
||||
+ifeq ($(GENODE),yes)
|
||||
+all: libgcc_eh.a
|
||||
+else
|
||||
all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
|
||||
+endif
|
||||
ifneq ($(LIBUNWIND),)
|
||||
all: libunwind$(SHLIB_EXT)
|
||||
endif
|
||||
@@ -1090,10 +1090,6 @@ install-shared:
|
||||
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
|
||||
@@ -1115,9 +1119,11 @@ install-shared:
|
||||
chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
|
||||
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
|
||||
|
||||
- $(subst @multilib_dir@,$(MULTIDIR),$(subst \
|
||||
- @shlib_base_name@,libgcc_s,$(subst \
|
||||
- @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
|
||||
-
|
||||
+ifneq ($(GENODE),yes)
|
||||
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
|
||||
@shlib_base_name@,libgcc_s,$(subst \
|
||||
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
|
||||
+endif
|
||||
|
||||
install-leaf: $(install-shared) $(install-libunwind)
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
|
||||
|
||||
|
@ -4,41 +4,42 @@ From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
libstdc++-v3/configure.ac | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
libstdc++-v3/configure.ac | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
|
||||
index 3e8b9c5..1543c25 100644
|
||||
index fdc4622..ed8a338 100644
|
||||
--- a/libstdc++-v3/configure.ac
|
||||
+++ b/libstdc++-v3/configure.ac
|
||||
@@ -89,9 +89,9 @@ CXXFLAGS="$save_CXXFLAGS"
|
||||
@@ -89,9 +89,11 @@ CXXFLAGS="$save_CXXFLAGS"
|
||||
GLIBCXX_CONFIGURE
|
||||
|
||||
# Libtool setup.
|
||||
-if test "x${with_newlib}" != "xyes"; then
|
||||
- AC_LIBTOOL_DLOPEN
|
||||
-fi
|
||||
+#if test "x${with_newlib}" != "xyes"; then
|
||||
+# AC_LIBTOOL_DLOPEN
|
||||
+#fi
|
||||
+if test "$is_hosted" = yes; then
|
||||
if test "x${with_newlib}" != "xyes"; then
|
||||
AC_LIBTOOL_DLOPEN
|
||||
fi
|
||||
+fi
|
||||
AM_PROG_LIBTOOL
|
||||
ACX_LT_HOST_FLAGS
|
||||
AC_SUBST(enable_shared)
|
||||
@@ -205,7 +205,7 @@ AC_CHECK_HEADERS(fenv.h complex.h)
|
||||
@@ -209,7 +211,9 @@ AC_CHECK_HEADERS(fenv.h complex.h)
|
||||
GLIBCXX_CHECK_C99_TR1
|
||||
|
||||
# For the EOF, SEEK_CUR, and SEEK_END integer constants.
|
||||
-GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS
|
||||
+#GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS
|
||||
+if test "$is_hosted" = yes; then
|
||||
GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS
|
||||
+fi
|
||||
|
||||
# For gettimeofday support.
|
||||
GLIBCXX_CHECK_GETTIMEOFDAY
|
||||
@@ -358,7 +358,7 @@ GCC_CHECK_UNWIND_GETIPINFO
|
||||
@@ -362,7 +366,9 @@ GCC_CHECK_UNWIND_GETIPINFO
|
||||
|
||||
GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall is available.])])
|
||||
|
||||
-GCC_HEADER_STDINT(include/gstdint.h)
|
||||
+#GCC_HEADER_STDINT(include/gstdint.h)
|
||||
+if test "$is_hosted" = yes; then
|
||||
GCC_HEADER_STDINT(include/gstdint.h)
|
||||
+fi
|
||||
|
||||
GLIBCXX_ENABLE_SYMVERS([yes])
|
||||
AC_SUBST(libtool_VERSION)
|
||||
|
@ -6,14 +6,14 @@ From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
---
|
||||
include/libiberty.h | 4 ++++
|
||||
libiberty/cp-demangle.c | 4 +++-
|
||||
libstdc++-v3/libsupc++/Makefile.in | 10 +++++-----
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
libstdc++-v3/libsupc++/Makefile.in | 19 ++++++++++++++++++-
|
||||
3 files changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/libiberty.h b/include/libiberty.h
|
||||
index 78c42eb..4fcf284 100644
|
||||
index a9c885f..a1479af 100644
|
||||
--- a/include/libiberty.h
|
||||
+++ b/include/libiberty.h
|
||||
@@ -47,7 +47,11 @@ extern "C" {
|
||||
@@ -46,7 +46,11 @@ extern "C" {
|
||||
/* Get a definition for va_list. */
|
||||
#include <stdarg.h>
|
||||
|
||||
@ -26,10 +26,10 @@ index 78c42eb..4fcf284 100644
|
||||
/* If the OS supports it, ensure that the supplied stream is setup to
|
||||
avoid any multi-threaded locking. Otherwise leave the FILE pointer
|
||||
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
|
||||
index 3d5d33e..e5f542f 100644
|
||||
index 78e5978..d9da7a4 100644
|
||||
--- a/libiberty/cp-demangle.c
|
||||
+++ b/libiberty/cp-demangle.c
|
||||
@@ -103,7 +103,9 @@
|
||||
@@ -107,7 +107,9 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
@ -39,7 +39,7 @@ index 3d5d33e..e5f542f 100644
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
@@ -5875,7 +5877,7 @@ d_demangle (const char *mangled, int options, size_t *palc)
|
||||
@@ -6187,7 +6189,7 @@ d_demangle (const char *mangled, int options, size_t *palc)
|
||||
return dgs.buf;
|
||||
}
|
||||
|
||||
@ -49,38 +49,52 @@ index 3d5d33e..e5f542f 100644
|
||||
extern char *__cxa_demangle (const char *, char *, size_t *, int *);
|
||||
|
||||
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
|
||||
index 88b237e..f861d29 100644
|
||||
index f3648ac..169b927 100644
|
||||
--- a/libstdc++-v3/libsupc++/Makefile.in
|
||||
+++ b/libstdc++-v3/libsupc++/Makefile.in
|
||||
@@ -104,7 +104,7 @@ am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo \
|
||||
new_opv.lo new_opvnt.lo pbase_type_info.lo pmem_type_info.lo \
|
||||
pointer_type_info.lo pure.lo si_class_type_info.lo tinfo.lo \
|
||||
tinfo2.lo vec.lo vmi_class_type_info.lo vterminate.lo
|
||||
-@GLIBCXX_HOSTED_TRUE@am__objects_2 = cp-demangle.lo
|
||||
@@ -128,7 +128,11 @@ am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo \
|
||||
pbase_type_info.lo pmem_type_info.lo pointer_type_info.lo \
|
||||
pure.lo si_class_type_info.lo tinfo.lo tinfo2.lo vec.lo \
|
||||
vmi_class_type_info.lo vterminate.lo
|
||||
+ifeq ($(GENODE),yes)
|
||||
+am__objects_2 = cp-demangle.lo
|
||||
@ENABLE_VTABLE_VERIFY_TRUE@am__objects_3 = vtv_stubs.lo
|
||||
+else
|
||||
@GLIBCXX_HOSTED_TRUE@am__objects_2 = cp-demangle.lo
|
||||
+endif
|
||||
@ENABLE_VTABLE_VERIFY_TRUE@@VTV_CYGMIN_FALSE@am__objects_3 = \
|
||||
@ENABLE_VTABLE_VERIFY_TRUE@@VTV_CYGMIN_FALSE@ vtv_stubs.lo
|
||||
am_libsupc___la_OBJECTS = $(am__objects_1) $(am__objects_2) \
|
||||
$(am__objects_3)
|
||||
@@ -367,8 +367,8 @@ bits_HEADERS = \
|
||||
@@ -398,8 +402,14 @@ bits_HEADERS = \
|
||||
exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h
|
||||
|
||||
headers = $(std_HEADERS) $(bits_HEADERS)
|
||||
-@GLIBCXX_HOSTED_TRUE@c_sources = \
|
||||
-@GLIBCXX_HOSTED_TRUE@ cp-demangle.c
|
||||
+
|
||||
+ifeq ($(GENODE),yes)
|
||||
+c_sources = \
|
||||
+ cp-demangle.c
|
||||
+ cp-demangle.c
|
||||
+else
|
||||
@GLIBCXX_HOSTED_TRUE@c_sources = \
|
||||
-@GLIBCXX_HOSTED_TRUE@ cp-demangle.c
|
||||
+@GLIBCXX_HOSTED_TRUE@ cp-demangle.c
|
||||
+endif
|
||||
|
||||
sources = \
|
||||
array_type_info.cc \
|
||||
@@ -801,9 +801,9 @@ cp-demangle.c:
|
||||
@@ -840,10 +850,17 @@ uninstall-am: uninstall-bitsHEADERS uninstall-stdHEADERS \
|
||||
cp-demangle.c:
|
||||
rm -f $@
|
||||
$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
|
||||
cp-demangle.lo: cp-demangle.c
|
||||
- $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
|
||||
+ifeq ($(GENODE),yes)
|
||||
+cp-demangle.lo: cp-demangle.c
|
||||
+ $(LTCOMPILE) -DGENODE -Wno-error -c $<
|
||||
cp-demangle.o: cp-demangle.c
|
||||
- $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
|
||||
+cp-demangle.o: cp-demangle.c
|
||||
+ $(C_COMPILE) -DGENODE -Wno-error -c $<
|
||||
+else
|
||||
cp-demangle.lo: cp-demangle.c
|
||||
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
|
||||
cp-demangle.o: cp-demangle.c
|
||||
$(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
|
||||
+endif
|
||||
|
||||
# Use special rules for the C++11 sources so that the proper flags are passed.
|
||||
bad_array_length.lo: bad_array_length.cc
|
||||
|
@ -9,7 +9,7 @@ Changes lacking documentation
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libgcc/config/t-libunwind-elf b/libgcc/config/t-libunwind-elf
|
||||
index beacf04..4556eb1 100644
|
||||
index cfde66e..aacf57c 100644
|
||||
--- a/libgcc/config/t-libunwind-elf
|
||||
+++ b/libgcc/config/t-libunwind-elf
|
||||
@@ -32,7 +32,7 @@ SHLIBUNWIND_SONAME = @shlib_base_name@.so.$(SHLIBUNWIND_SOVERSION)
|
||||
@ -22,7 +22,7 @@ index beacf04..4556eb1 100644
|
||||
if [ -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) ]; then \
|
||||
mv -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \
|
||||
diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
|
||||
index 1696fe8..0beb525 100644
|
||||
index 8c5f890..f2285a3 100644
|
||||
--- a/libgcc/config/t-slibgcc
|
||||
+++ b/libgcc/config/t-slibgcc
|
||||
@@ -26,7 +26,7 @@ SHLIB_MAP = @shlib_map_file@
|
||||
|
@ -8,10 +8,10 @@ Ensure -fno-short-enums as default.
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
|
||||
index 439a4de..948a369 100644
|
||||
index f0fde72..4442c66 100644
|
||||
--- a/gcc/config/arm/arm.c
|
||||
+++ b/gcc/config/arm/arm.c
|
||||
@@ -28348,7 +28348,7 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
|
||||
@@ -26418,7 +26418,7 @@ arm_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
|
||||
static bool
|
||||
arm_default_short_enums (void)
|
||||
{
|
||||
|
@ -1,24 +1,23 @@
|
||||
build.patch
|
||||
noux_build.patch
|
||||
|
||||
From: Christian Prochaska <christian.prochaska@genode-labs.com>
|
||||
|
||||
|
||||
---
|
||||
Makefile.def | 1 +
|
||||
Makefile.tpl | 6 ++++++
|
||||
Makefile.tpl | 7 +++++++
|
||||
fixincludes/Makefile.in | 5 +++--
|
||||
gcc/Makefile.in | 6 +++---
|
||||
gcc/config.host | 2 +-
|
||||
gcc/configure.ac | 4 ++--
|
||||
gcc/gengtype-lex.c | 1 -
|
||||
libgcc/Makefile.in | 2 +-
|
||||
8 files changed, 17 insertions(+), 10 deletions(-)
|
||||
7 files changed, 17 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/Makefile.def b/Makefile.def
|
||||
index 90d9653..642f637 100644
|
||||
index ea8453e..201480f 100644
|
||||
--- a/Makefile.def
|
||||
+++ b/Makefile.def
|
||||
@@ -263,6 +263,7 @@ flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
|
||||
@@ -288,6 +288,7 @@ flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= LD_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= LIPO_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
|
||||
@ -27,7 +26,7 @@ index 90d9653..642f637 100644
|
||||
flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= NM_FOR_TARGET ; };
|
||||
diff --git a/Makefile.tpl b/Makefile.tpl
|
||||
index e81c095..92c10b8 100644
|
||||
index 6b2eb6a..a89f815 100644
|
||||
--- a/Makefile.tpl
|
||||
+++ b/Makefile.tpl
|
||||
@@ -156,6 +156,8 @@ BUILD_EXPORTS = \
|
||||
@ -39,7 +38,15 @@ index e81c095..92c10b8 100644
|
||||
GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
|
||||
GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \
|
||||
GOC="$(GOC_FOR_BUILD)"; export GOC; \
|
||||
@@ -194,6 +196,8 @@ HOST_EXPORTS = \
|
||||
@@ -172,6 +174,7 @@ BUILD_EXPORTS = \
|
||||
# built for the build system to override those in BASE_FLAGS_TO_PASS.
|
||||
EXTRA_BUILD_FLAGS = \
|
||||
CFLAGS="$(CFLAGS_FOR_BUILD)" \
|
||||
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
|
||||
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
|
||||
|
||||
# This is the list of directories to built for the host system.
|
||||
@@ -194,6 +197,8 @@ HOST_EXPORTS = \
|
||||
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
||||
CXX="$(CXX)"; export CXX; \
|
||||
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
|
||||
@ -48,7 +55,7 @@ index e81c095..92c10b8 100644
|
||||
GCJ="$(GCJ)"; export GCJ; \
|
||||
GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
|
||||
GOC="$(GOC)"; export GOC; \
|
||||
@@ -278,6 +282,7 @@ BASE_TARGET_EXPORTS = \
|
||||
@@ -281,6 +286,7 @@ BASE_TARGET_EXPORTS = \
|
||||
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
|
||||
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
|
||||
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
|
||||
@ -56,16 +63,16 @@ index e81c095..92c10b8 100644
|
||||
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
|
||||
GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
|
||||
GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
|
||||
@@ -644,6 +649,7 @@ EXTRA_TARGET_FLAGS = \
|
||||
'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
|
||||
'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
|
||||
@@ -660,6 +666,7 @@ EXTRA_TARGET_FLAGS = \
|
||||
-B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
|
||||
$$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
|
||||
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
|
||||
+ 'CPPFLAGS=$$(CPPFLAGS_FOR_TARGET)' \
|
||||
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
|
||||
'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
|
||||
'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
|
||||
diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in
|
||||
index ce850ff..437d3f4 100644
|
||||
index 5dc1b23..57e6afa 100644
|
||||
--- a/fixincludes/Makefile.in
|
||||
+++ b/fixincludes/Makefile.in
|
||||
@@ -28,6 +28,7 @@ STAMP = echo timestamp >
|
||||
@ -91,19 +98,19 @@ index ce850ff..437d3f4 100644
|
||||
|
||||
$(AF): $(FIXOBJ) $(LIBIBERTY)
|
||||
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
|
||||
index 2a4475b..98c6235 100644
|
||||
index 13d0d1b..88f3ef5 100644
|
||||
--- a/gcc/Makefile.in
|
||||
+++ b/gcc/Makefile.in
|
||||
@@ -748,7 +748,7 @@ BUILD_LINKERFLAGS = $(BUILD_CXXFLAGS)
|
||||
# Native linker and preprocessor flags. For x-fragment overrides.
|
||||
BUILD_LDFLAGS=@BUILD_LDFLAGS@
|
||||
@@ -779,7 +779,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
|
||||
BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
|
||||
BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
|
||||
BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
|
||||
- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
|
||||
+ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(INCLUDES) $(CPPFLAGS_FOR_BUILD)
|
||||
|
||||
# Actual name to use when installing a native compiler.
|
||||
GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
|
||||
@@ -1019,8 +1019,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
|
||||
@@ -1031,8 +1031,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
|
||||
|
||||
# How to link with both our special library facilities
|
||||
# and the system's installed libraries.
|
||||
@ -111,27 +118,27 @@ index 2a4475b..98c6235 100644
|
||||
- $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
|
||||
+LIBS = libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
|
||||
+ $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) @LIBS@
|
||||
BACKENDLIBS = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
|
||||
BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
|
||||
$(ZLIB)
|
||||
# Any system libraries needed just for GNAT.
|
||||
diff --git a/gcc/config.host b/gcc/config.host
|
||||
index 1196ec5..414d5ff 100644
|
||||
index 44f2f56..961dc0f 100644
|
||||
--- a/gcc/config.host
|
||||
+++ b/gcc/config.host
|
||||
@@ -99,7 +99,7 @@ case ${host} in
|
||||
esac
|
||||
|
||||
case ${host} in
|
||||
- arm*-*-linux*)
|
||||
@@ -107,7 +107,7 @@ case ${host} in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
- arm*-*-freebsd* | arm*-*-linux*)
|
||||
+ arm*-*-*)
|
||||
case ${target} in
|
||||
arm*-*-*)
|
||||
host_extra_gcc_objs="driver-arm.o"
|
||||
diff --git a/gcc/configure.ac b/gcc/configure.ac
|
||||
index 3ee1d67..004a185 100644
|
||||
index 4c65d44..8a9a93c 100644
|
||||
--- a/gcc/configure.ac
|
||||
+++ b/gcc/configure.ac
|
||||
@@ -1521,8 +1521,8 @@ else
|
||||
@@ -1688,8 +1688,8 @@ else
|
||||
# system.h from including gmp.h.
|
||||
CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
|
||||
CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
|
||||
@ -143,7 +150,7 @@ index 3ee1d67..004a185 100644
|
||||
--enable-languages=${enable_languages-all} \
|
||||
--target=$target_alias --host=$build_alias --build=$build_alias
|
||||
diff --git a/gcc/gengtype-lex.c b/gcc/gengtype-lex.c
|
||||
index 244dd0d..ee29879 100644
|
||||
index dcf6983..7a96f93 100644
|
||||
--- a/gcc/gengtype-lex.c
|
||||
+++ b/gcc/gengtype-lex.c
|
||||
@@ -1,4 +1,3 @@
|
||||
@ -151,16 +158,3 @@ index 244dd0d..ee29879 100644
|
||||
#line 2 "gengtype-lex.c"
|
||||
|
||||
#line 4 "gengtype-lex.c"
|
||||
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
|
||||
index db9b1b2..594fc6d 100644
|
||||
--- a/libgcc/Makefile.in
|
||||
+++ b/libgcc/Makefile.in
|
||||
@@ -225,7 +225,7 @@ endif
|
||||
LIBGCC2_DEBUG_CFLAGS = -g
|
||||
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
|
||||
$(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
|
||||
- -fbuilding-libgcc -fno-stack-protector \
|
||||
+ -fno-stack-protector \
|
||||
$(INHIBIT_LIBC_CFLAGS)
|
||||
|
||||
# Additional options to use when compiling libgcc2.a.
|
||||
|
@ -13,7 +13,7 @@ nothing rather than '-prefer-pic'.
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
|
||||
index 1de0f6c..3e8b9c5 100644
|
||||
index 9e19e99..fdc4622 100644
|
||||
--- a/libstdc++-v3/configure.ac
|
||||
+++ b/libstdc++-v3/configure.ac
|
||||
@@ -115,16 +115,16 @@ fi
|
||||
|
@ -1,5 +1,3 @@
|
||||
riscv_files.patch
|
||||
riscv.patch
|
||||
config.patch
|
||||
misc.patch
|
||||
no_short_enums.patch
|
||||
@ -10,6 +8,5 @@ libsupcxx_demangle.patch
|
||||
libgcc_s.patch
|
||||
go_libbacktrace.patch
|
||||
target_libbacktrace.patch
|
||||
gnu_inline_mismatch.patch
|
||||
noux_build.patch
|
||||
arm.patch
|
||||
|
@ -8,10 +8,10 @@ Don't build libbacktrace, which needs a libc.
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 27ee905..8174460 100644
|
||||
index 74bf58a..dbfaf4d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -152,7 +152,6 @@ libgcj="target-libffi \
|
||||
@@ -151,7 +151,6 @@ libgcj="target-libffi \
|
||||
# the host libraries and the host tools (which may be a cross compiler)
|
||||
# Note that libiberty is not a target library.
|
||||
target_libraries="target-libgcc \
|
||||
|
@ -31,7 +31,7 @@ ENV += CFLAGS_FOR_TARGET='-I$(BASE_DIR)/../../tool -DUSE_PT_GNU_EH_FRAME -Dinhib
|
||||
# libsupc++
|
||||
ENV += CXXFLAGS_FOR_TARGET='-fPIC'
|
||||
|
||||
MAKE_ENV += MULTILIB_OPTIONS="m64/m32" MULTILIB_DIRNAMES="64 32"
|
||||
MAKE_ENV += GENODE="yes"
|
||||
|
||||
#
|
||||
# We link libraries to the final binaries using the 'LIBS' variable. But
|
||||
|
@ -4,4 +4,6 @@ GCC_TARGET = x86_64-pc-elf
|
||||
# cross-compiling does not work yet
|
||||
REQUIRES = x86
|
||||
|
||||
MAKE_ENV += MULTILIB_OPTIONS="m64/m32" MULTILIB_DIRNAMES="64 32"
|
||||
|
||||
include $(PRG_DIR)/../gcc/target.inc
|
||||
|
@ -91,3 +91,4 @@ input_filter
|
||||
init
|
||||
nic_dump
|
||||
slab
|
||||
ada
|
||||
|
@ -122,7 +122,7 @@ endif
|
||||
# Empty DST_DIRS is interpreted as a tool-chain agnostic target, e.g., clean.
|
||||
#
|
||||
ifneq ($(DST_DIRS),)
|
||||
REQUIRED_GCC_VERSION ?= 4.9.2
|
||||
REQUIRED_GCC_VERSION ?= 6.3.0
|
||||
GCC_VERSION := $(filter $(REQUIRED_GCC_VERSION) ,$(shell $(CUSTOM_CXX) --version))
|
||||
ifneq ($(GCC_VERSION), $(REQUIRED_GCC_VERSION))
|
||||
$(error "$(CUSTOM_CXX) version $(REQUIRED_GCC_VERSION) is required")
|
||||
|
139
tool/tool_chain
139
tool/tool_chain
@ -13,11 +13,14 @@ help:
|
||||
$(ECHO) "and will be created at '$(LOCAL_INSTALL_LOCATION)'."
|
||||
$(ECHO)
|
||||
$(ECHO) "--- available commands ---"
|
||||
$(ECHO) "x86 - create tool chain for x86"
|
||||
$(ECHO) "arm - create tool chain for arm"
|
||||
$(ECHO) "riscv - create tool chain for riscv"
|
||||
$(ECHO) "clean - clean everything except downloaded archives"
|
||||
$(ECHO) "cleanall - clean everything including downloaded archives"
|
||||
$(ECHO) "x86 - create tool chain for x86"
|
||||
$(ECHO) "arm - create tool chain for arm"
|
||||
$(ECHO) "riscv - create tool chain for riscv"
|
||||
$(ECHO) "clean - clean everything except downloaded archives"
|
||||
$(ECHO) "cleanall - clean everything including downloaded archives"
|
||||
$(ECHO)
|
||||
$(ECHO) "--- available command line options ---"
|
||||
$(ECHO) "MAKE_JOBS=4 - number of parallel make jobs (default: 4)"
|
||||
$(ECHO)
|
||||
|
||||
#
|
||||
@ -34,7 +37,7 @@ $(SUPPORTED_PLATFORMS): install
|
||||
# Enable parallel build for 2nd-level $(MAKE) by default
|
||||
#
|
||||
|
||||
MAKE_OPT ?= -j4
|
||||
MAKE_JOBS ?= 4
|
||||
|
||||
#
|
||||
# Determine Genode base directory based on the known location of the
|
||||
@ -47,7 +50,7 @@ GENODE_DIR ?= $(realpath $(dir $(firstword $(MAKEFILE_LIST)))/..)
|
||||
# Tool versions and install location
|
||||
#
|
||||
|
||||
GCC_VERSION = 4.9.2
|
||||
GCC_VERSION = 6.3.0
|
||||
BINUTILS_VERSION = 2.28
|
||||
INSTALL_LOCATION = /usr/local/genode-gcc
|
||||
|
||||
@ -75,13 +78,7 @@ VERBOSE = @
|
||||
#
|
||||
# Check if 'autoconf' is installed
|
||||
#
|
||||
AUTOCONF_VERSION_gcc_4.9.2 = 2.64
|
||||
|
||||
AUTOCONF_VERSION = $(AUTOCONF_VERSION_gcc_$(GCC_VERSION))
|
||||
|
||||
ifeq ($(AUTOCONF_VERSION),)
|
||||
$(error Unknown autoconf version for GCC $(GCC_VERSION).)
|
||||
endif
|
||||
AUTOCONF_VERSION = 2.64
|
||||
|
||||
AUTOCONF_VERSION_STRING = "autoconf (GNU Autoconf) $(AUTOCONF_VERSION)"
|
||||
ifeq ($(shell autoconf -V | grep $(AUTOCONF_VERSION_STRING)),)
|
||||
@ -143,9 +140,16 @@ EXPAT_OK = $(call check_equal_f,\
|
||||
$(shell pkg-config --exists expat && echo ok),ok,\
|
||||
Need to have 'libexpat' installed.)
|
||||
|
||||
#
|
||||
# Check if 'GNAT' is installed
|
||||
#
|
||||
HOST_GCC_VERSION := $(shell gcc -dumpversion)
|
||||
GNAT_OK = $(call check_equal_f,$(shell gnatmake --version | sed -n -e 's/GNATMAKE //p'),$(HOST_GCC_VERSION),\
|
||||
Need to have GNAT installed and the GNAT version must match the GCC version (found GCC $(HOST_GCC_VERSION)).)
|
||||
|
||||
TOOLS_OK = $(AUTOCONF_OK) $(AUTOCONFINST_OK) $(PKG_CONFIG_OK) $(CURSES_OK) \
|
||||
$(TEXINFO_OK) $(WGET_OK) $(AUTOGEN_OK) $(GPG_OK) $(EXPAT_OK)
|
||||
$(TEXINFO_OK) $(WGET_OK) $(AUTOGEN_OK) $(GPG_OK) $(EXPAT_OK) \
|
||||
$(GNAT_OK)
|
||||
|
||||
ifneq ($(strip $(TOOLS_OK)),)
|
||||
$(error Please install missing tools.)
|
||||
@ -155,6 +159,9 @@ endif
|
||||
# 'configure' parameters for binutils, gcc and gdb
|
||||
#
|
||||
|
||||
LOCAL_BOOTSTRAP_INSTALL_LOCATION = $(shell pwd)/build/bootstrap/install
|
||||
export PATH := $(LOCAL_BOOTSTRAP_INSTALL_LOCATION)/bin:$(PATH)
|
||||
|
||||
LOCAL_INSTALL_LOCATION = $(shell pwd)/build/install
|
||||
|
||||
#
|
||||
@ -176,6 +183,27 @@ MAKEFLAGS += --quiet
|
||||
export MAKEFLAGS
|
||||
endif
|
||||
|
||||
COMMON_BOOTSTRAP_CONFIG = $(CONFIG_QUIET) \
|
||||
--prefix=$(LOCAL_BOOTSTRAP_INSTALL_LOCATION) \
|
||||
--disable-multilib
|
||||
|
||||
BINUTILS_BOOTSTRAP_CONFIG += $(COMMON_BOOTSTRAP_CONFIG)
|
||||
|
||||
GCC_BOOTSTRAP_CONFIG += $(COMMON_BOOTSTRAP_CONFIG) \
|
||||
--enable-languages=c,c++,ada \
|
||||
--disable-bootstrap \
|
||||
--disable-libatomic \
|
||||
--disable-libcilkrts \
|
||||
--disable-libgomp \
|
||||
--disable-libitm \
|
||||
--disable-libmpx \
|
||||
--disable-libsanitizer \
|
||||
--disable-libquadmath \
|
||||
--disable-libssp \
|
||||
--with-gmp=$(LOCAL_LIB_INSTALL_LOCATION) \
|
||||
--with-mpfr=$(LOCAL_LIB_INSTALL_LOCATION) \
|
||||
--with-mpc=$(LOCAL_LIB_INSTALL_LOCATION)
|
||||
|
||||
COMMON_CONFIG = $(CONFIG_QUIET) \
|
||||
--prefix=$(LOCAL_INSTALL_LOCATION) \
|
||||
--program-prefix=genode-$(PLATFORM)- \
|
||||
@ -209,11 +237,13 @@ BINUTILS_CONFIG += $(BINUTILS_CONFIG_$(PLATFORM))
|
||||
GDB_CONFIG += $(COMMON_CONFIG) --disable-werror
|
||||
|
||||
GCC_CONFIG += $(COMMON_CONFIG) \
|
||||
--enable-languages=c,c++,go \
|
||||
--enable-languages=c,c++,go,ada \
|
||||
--disable-libgo \
|
||||
--disable-gotools \
|
||||
--disable-libssp \
|
||||
--disable-libquadmath \
|
||||
--disable-libffi \
|
||||
--disable-libada \
|
||||
--enable-targets=all \
|
||||
--with-gnu-as \
|
||||
--with-gnu-ld \
|
||||
@ -243,12 +273,14 @@ TARGET_CONFIG_ARGS = $(CONFIG_QUIET)
|
||||
|
||||
GCC_INSTALL_RULE = install-strip
|
||||
|
||||
MAKE_OPT += GENODE="yes"
|
||||
|
||||
#
|
||||
# Platform-specific multilib support
|
||||
#
|
||||
|
||||
MAKE_OPT_x86 := MULTILIB_OPTIONS="m64/m32" MULTILIB_DIRNAMES="64 32"
|
||||
MAKE_OPT += $(MAKE_OPT_$(PLATFORM))
|
||||
GCC_MAKE_OPT_x86 := MULTILIB_OPTIONS="m64/m32" MULTILIB_DIRNAMES="64 32"
|
||||
GCC_MAKE_OPT += $(MAKE_OPT) $(GCC_MAKE_OPT_$(PLATFORM))
|
||||
|
||||
#
|
||||
# Build rules and dependencies between build steps
|
||||
@ -257,9 +289,14 @@ MAKE_OPT += $(MAKE_OPT_$(PLATFORM))
|
||||
# dependencies. All other programs will be generated as side effect.
|
||||
#
|
||||
|
||||
BINUTILS_BOOTSTRAP_BINARIES = build/bootstrap/binutils/binutils/objdump
|
||||
BINUTILS_BOOTSTRAP_INSTALLED_BINARIES = $(LOCAL_BOOTSTRAP_INSTALL_LOCATION)/bin/objdump
|
||||
GCC_BOOTSTRAP_BINARIES = build/bootstrap/gcc/gcc/xg++
|
||||
GCC_BOOTSTRAP_INSTALLED_BINARIES = $(LOCAL_BOOTSTRAP_INSTALL_LOCATION)/bin/g++
|
||||
|
||||
BINUTILS_BINARIES = build/$(PLATFORM)/binutils/binutils/objdump
|
||||
BINUTILS_INSTALLED_BINARIES = $(LOCAL_INSTALL_LOCATION)/bin/genode-$(PLATFORM)-objdump
|
||||
GCC_BINARIES = build/$(PLATFORM)/gcc/gcc/g++
|
||||
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
|
||||
|
||||
@ -301,20 +338,36 @@ $(BINUTILS_CONTRIB_DIR)/configure:
|
||||
$(ECHO) "$(BRIGHT_COL)preparing binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(GENODE_DIR)/tool/ports/prepare_port binutils
|
||||
|
||||
build/$(PLATFORM)/binutils/Makefile: $(BINUTILS_CONTRIB_DIR)/configure
|
||||
build/bootstrap/binutils/Makefile: $(BINUTILS_CONTRIB_DIR)/configure
|
||||
$(ECHO) "$(BRIGHT_COL)configuring bootstrap binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)mkdir -p $(dir $@)
|
||||
$(VERBOSE)cd $(dir $@); $(BINUTILS_CONTRIB_DIR)/configure $(BINUTILS_BOOTSTRAP_CONFIG)
|
||||
|
||||
$(BINUTILS_BOOTSTRAP_BINARIES): build/bootstrap/binutils/Makefile
|
||||
$(ECHO) "$(BRIGHT_COL)building bootstrap binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C $(dir $<) -j$(MAKE_JOBS)
|
||||
|
||||
$(BINUTILS_BOOTSTRAP_INSTALLED_BINARIES): $(BINUTILS_BOOTSTRAP_BINARIES)
|
||||
$(ECHO) "$(BRIGHT_COL)installing bootstrap binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)for i in binutils gas ld intl opcodes; do \
|
||||
$(MAKE) -C build/bootstrap/binutils/$$i install-strip; done
|
||||
$(VERBOSE)$(MAKE) -C build/bootstrap/binutils/libiberty install
|
||||
|
||||
build/$(PLATFORM)/binutils/Makefile: $(BINUTILS_CONTRIB_DIR)/configure \
|
||||
$(GCC_BOOTSTRAP_INSTALLED_BINARIES)
|
||||
$(ECHO) "$(BRIGHT_COL)configuring binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)mkdir -p $(dir $@)
|
||||
$(VERBOSE)cd $(dir $@); $(BINUTILS_CONTRIB_DIR)/configure $(BINUTILS_CONFIG)
|
||||
|
||||
$(BINUTILS_BINARIES): build/$(PLATFORM)/binutils/Makefile
|
||||
$(ECHO) "$(BRIGHT_COL)builing binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C $(dir $<) $(MAKE_OPT)
|
||||
$(ECHO) "$(BRIGHT_COL)building binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C $(dir $<) $(MAKE_OPT) -j$(MAKE_JOBS)
|
||||
|
||||
$(BINUTILS_INSTALLED_BINARIES): $(BINUTILS_BINARIES)
|
||||
$(ECHO) "$(BRIGHT_COL)installing binutils...$(DEFAULT_COL)"
|
||||
$(VERBOSE)for i in binutils gas ld intl opcodes; do \
|
||||
$(MAKE) -C build/$(PLATFORM)/binutils/$$i install-strip; done
|
||||
$(VERBOSE)$(MAKE) -C build/$(PLATFORM)/binutils/libiberty install
|
||||
$(MAKE) -C build/$(PLATFORM)/binutils/$$i install-strip $(MAKE_OPT); done
|
||||
$(VERBOSE)$(MAKE) -C build/$(PLATFORM)/binutils/libiberty install $(MAKE_OPT)
|
||||
|
||||
COMMON_LIB_CONFIG = --prefix=$(LOCAL_LIB_INSTALL_LOCATION) \
|
||||
--disable-shared --enable-static
|
||||
@ -360,6 +413,25 @@ build/mpc/Makefile:
|
||||
$(VERBOSE)cd $(dir $@); \
|
||||
$(MPC_CONTRIB_DIR)/configure $(MPC_CONFIG)
|
||||
|
||||
build/bootstrap/gcc/Makefile: $(GCC_CONTRIB_DIR)/configure \
|
||||
$(BINUTILS_BOOTSTRAP_INSTALLED_BINARIES) \
|
||||
$(LOCAL_LIB_INSTALL_LOCATION)/lib/libgmp.a \
|
||||
$(LOCAL_LIB_INSTALL_LOCATION)/lib/libmpfr.a \
|
||||
$(LOCAL_LIB_INSTALL_LOCATION)/lib/libmpc.a
|
||||
|
||||
build/bootstrap/gcc/Makefile:
|
||||
$(ECHO) "$(BRIGHT_COL)configuring bootstrap gcc...$(DEFAULT_COL)"
|
||||
$(VERBOSE)mkdir -p $(dir $@)
|
||||
$(VERBOSE)cd $(dir $@); $(GCC_CONTRIB_DIR)/configure $(GCC_BOOTSTRAP_CONFIG)
|
||||
|
||||
$(GCC_BOOTSTRAP_BINARIES): build/bootstrap/gcc/Makefile
|
||||
$(ECHO) "$(BRIGHT_COL)building bootstrap gcc...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C $(dir $<) -j$(MAKE_JOBS)
|
||||
|
||||
$(GCC_BOOTSTRAP_INSTALLED_BINARIES): $(GCC_BOOTSTRAP_BINARIES)
|
||||
$(ECHO) "$(BRIGHT_COL)installing bootstrap gcc...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C build/bootstrap/gcc $(GCC_INSTALL_RULE)
|
||||
|
||||
build/$(PLATFORM)/gcc/Makefile: $(GCC_CONTRIB_DIR)/configure \
|
||||
$(BINUTILS_INSTALLED_BINARIES) \
|
||||
$(LOCAL_LIB_INSTALL_LOCATION)/lib/libgmp.a \
|
||||
@ -374,16 +446,15 @@ build/$(PLATFORM)/gcc/Makefile:
|
||||
target_configargs="$(TARGET_CONFIG_ARGS)" \
|
||||
$(GCC_CONTRIB_DIR)/configure $(GCC_CONFIG)
|
||||
|
||||
$(GCC_BINARIES): build/$(PLATFORM)/gcc/Makefile \
|
||||
$(LIBC)
|
||||
|
||||
$(GCC_BINARIES): build/$(PLATFORM)/gcc/Makefile
|
||||
$(ECHO) "$(BRIGHT_COL)builing gcc...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C $(dir $<) $(MAKE_OPT)
|
||||
|
||||
$(GCC_BINARIES):
|
||||
$(ECHO) "$(BRIGHT_COL)building gcc...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C $(dir $<) $(GCC_MAKE_OPT) -j$(MAKE_JOBS)
|
||||
|
||||
$(GCC_INSTALLED_BINARIES): $(GCC_BINARIES)
|
||||
$(ECHO) "$(BRIGHT_COL)installing gcc...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C build/$(PLATFORM)/gcc $(GCC_INSTALL_RULE)
|
||||
$(VERBOSE)$(MAKE) -C build/$(PLATFORM)/gcc $(GCC_INSTALL_RULE) $(GCC_MAKE_OPT)
|
||||
|
||||
GDB_CONTRIB_DIR = $(shell $(GENODE_DIR)/tool/ports/current gdb)/src/noux-pkg/gdb
|
||||
|
||||
@ -398,12 +469,12 @@ build/$(PLATFORM)/gdb/Makefile: $(GDB_CONTRIB_DIR)/configure
|
||||
$(GDB_CONTRIB_DIR)/configure $(GDB_CONFIG)
|
||||
|
||||
$(GDB_BINARIES): build/$(PLATFORM)/gdb/Makefile
|
||||
$(ECHO) "$(BRIGHT_COL)builing gdb...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C $(dir $<) $(MAKE_OPT)
|
||||
$(ECHO) "$(BRIGHT_COL)building gdb...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C $(dir $<) $(MAKE_OPT) -j$(MAKE_JOBS)
|
||||
|
||||
$(GDB_INSTALLED_BINARIES): $(GDB_BINARIES)
|
||||
$(ECHO) "$(BRIGHT_COL)installing gdb...$(DEFAULT_COL)"
|
||||
$(VERBOSE)$(MAKE) -C build/$(PLATFORM)/gdb install MAKEINFO=true
|
||||
$(VERBOSE)$(MAKE) -C build/$(PLATFORM)/gdb install $(MAKE_OPT) MAKEINFO=true
|
||||
|
||||
#
|
||||
# Clean rules
|
||||
@ -421,4 +492,4 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user