devtools/cross/patch/gcc.patch

90 lines
2.9 KiB
Diff

diff --git a/src/gcc/gcc/config.gcc b/src/gcc/gcc/config.gcc
index ddd3b8f..702aa59 100644
--- a/src/gcc/gcc/config.gcc
+++ b/src/gcc/gcc/config.gcc
@@ -947,6 +947,17 @@ case ${target} in
tmake_file="$tmake_file vms/t-vmsnative"
fi
;;
+*-*-jehanne*)
+ gas=yes
+ gnu_ld=yes
+ default_use_cxa_atexit=yes
+ extra_options="$extra_options jehanne.opt"
+ case $target in
+ x86_64-*)
+ native_system_header_dir="/arch/amd64/include"
+ ;;
+ esac
+ ;;
*-*-vxworks*)
tmake_file=t-vxworks
xm_defines=POSIX
@@ -1635,6 +1647,9 @@ i[34567]86-*-elfiamcu)
i[34567]86-*-elf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
;;
+x86_64-*-jehanne*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h jehanne.h"
+ ;;
x86_64-*-elf*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
;;
diff --git a/src/gcc/config.sub b/src/gcc/config.sub
index 75bb6a3..1905540 100755
--- a/src/gcc/config.sub
+++ b/src/gcc/config.sub
@@ -1363,7 +1363,7 @@ case $os in
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd* | amdhsa* | unleashed* | emscripten*)
+ | jehanne* | midnightbsd* | amdhsa* | unleashed* | emscripten*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
qnx*)
diff --git a/src/gcc/fixincludes/mkfixinc.sh b/src/gcc/fixincludes/mkfixinc.sh
index 0f96486..9f0ee74 100755
--- a/src/gcc/fixincludes/mkfixinc.sh
+++ b/src/gcc/fixincludes/mkfixinc.sh
@@ -14,6 +14,7 @@ case $machine in
i?86-*-cygwin* | \
i?86-*-mingw32* | \
x86_64-*-mingw32* | \
+ *-jehanne* | \
powerpc-*-eabisim* | \
powerpc-*-eabi* | \
powerpc-*-rtems* | \
diff --git a/src/gcc/libgcc/config.host b/src/gcc/libgcc/config.host
index 91abc84..a994e3a 100644
--- a/src/gcc/libgcc/config.host
+++ b/src/gcc/libgcc/config.host
@@ -1414,6 +1414,10 @@ nvptx-*)
tmake_file="$tmake_file nvptx/t-nvptx"
extra_parts="crt0.o"
;;
+x86_64-*-jehanne*)
+ extra_parts="$extra_parts crtbegin.o crtend.o"
+ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
+ ;;
*)
echo "*** Configuration ${host} not supported" 1>&2
exit 1
diff --git a/src/gcc/libstdc++-v3/crossconfig.m4 b/src/gcc/libstdc++-v3/crossconfig.m4
index 344eec0..cc6eafe 100644
--- a/src/gcc/libstdc++-v3/crossconfig.m4
+++ b/src/gcc/libstdc++-v3/crossconfig.m4
@@ -186,6 +186,12 @@ case "${host}" in
;;
esac
;;
+ *-jehanne*)
+ GLIBCXX_CHECK_COMPILER_FEATURES
+ GLIBCXX_CHECK_LINKER_FEATURES
+ GLIBCXX_CHECK_MATH_SUPPORT
+ GLIBCXX_CHECK_STDLIB_SUPPORT
+ ;;
*-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-cygwin* | *-solaris*)
GLIBCXX_CHECK_COMPILER_FEATURES
GLIBCXX_CHECK_LINKER_FEATURES