diff --git a/config.sub b/config.sub index 38f3d037a78..c30fa81adf3 100755 --- a/config.sub +++ b/config.sub @@ -1719,7 +1719,7 @@ case $os in # The portable systems comes first. # Each alternative MUST end in a * to match a version number. gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ - | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* | orion* \ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh index df90720b716..6afb88c8749 100755 --- a/fixincludes/mkfixinc.sh +++ b/fixincludes/mkfixinc.sh @@ -11,6 +11,8 @@ target=fixinc.sh # Check for special fix rules for particular targets case $machine in + *-orion* | \ + *-*-orion* | \ i?86-*-cygwin* | \ i?86-*-mingw32* | \ x86_64-*-mingw32* | \ diff --git a/gcc/config.gcc b/gcc/config.gcc index 6fd1594480a..1d1a73eab51 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -690,6 +690,12 @@ x86_cpus="generic intel" # Common parts for widely ported systems. case ${target} in +*-*-orion*) + gas=yes + gnu_ld=yes + default_use_cxa_atexit=yes + use_gcc_stdint=provide + ;; *-*-darwin*) tmake_file="t-darwin " tm_file="${tm_file} darwin.h" @@ -1126,6 +1132,12 @@ case ${target} in esac case ${target} in +i[34567]86-*-orion*) + tm_file="${tm_file} i386/unix.h i386/att.h elfos.h glibc-stdint.h i386/i386elf.h orion.h" + ;; +x86_64-*-orion*) + tm_file="${tm_file} i386/unix.h i386/att.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h orion.h" + ;; aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) tm_file="${tm_file} elfos.h newlib-stdint.h" tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-elf-raw.h" diff --git a/gcc/config/orion.h b/gcc/config/orion.h new file mode 100644 index 00000000000..aebbc5fa519 --- /dev/null +++ b/gcc/config/orion.h @@ -0,0 +1,20 @@ +#undef TARGET_ORION +#define TARGET_ORION 1 + +#undef LIB_SPEC +#define LIB_SPEC "-lobject -lnucleus" + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s" + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC "crtend.o%s crtn.o%s" + +#undef LINK_SPEC +#define LINK_SPEC "-z max-page-size=4096" + +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINES() do { \ + builtin_define("__orion__"); \ + builtin_assert("system=orion"); \ +} while (0); diff --git a/libgcc/config.host b/libgcc/config.host index b9975de9023..b6eb6ad6740 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -670,6 +670,14 @@ hppa*-*-openbsd*) hppa*-*-netbsd*) tmake_file="$tmake_file pa/t-netbsd" ;; +i[34567]86-*-orion*) + extra_parts="$extra_parts crti.o crtbegin.o crtend.o crtn.o" + tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" + ;; +x86_64-*-orion*) + extra_parts="$extra_parts crti.o crtbegin.o crtend.o crtn.o" + tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" + ;; i[34567]86-*-darwin*) tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi" tm_file="$tm_file i386/darwin-lib.h" diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index b3269cb88e0..82f7153a525 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -5,6 +5,13 @@ dnl AC_DEFUN([GLIBCXX_CROSSCONFIG],[ # Base decisions on target environment. case "${host}" in + *-orion*) + GLIBCXX_CHECK_COMPILER_FEATUERS + GLIBCXX_CHECK_LINKER_FEATUERS + GLIBCXX_CHECK_MATH_SUPPORT + GLIBCXX_CHECK_STDLIB_SUPPORT + ;; + arm*-*-symbianelf*) # This is a freestanding configuration; there is nothing to do here. ;;