Fix gcc 9.2.0 patch
This commit is contained in:
parent
1eb09d1923
commit
f5e010b160
@ -1,20 +1,125 @@
|
||||
diff --git a/config.sub b/config.sub
|
||||
index 75bb6a313..8b9d9df39 100755
|
||||
--- a/config.sub
|
||||
+++ b/config.sub
|
||||
@@ -1336,7 +1336,7 @@ case $os in
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
# sysv* is not here because it comes later, after sysvr4.
|
||||
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
|
||||
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* | myos* \
|
||||
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | kopensolaris* | plan9* \
|
||||
diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
|
||||
index 0f9648608..7e152d0ae 100755
|
||||
--- a/fixincludes/mkfixinc.sh
|
||||
+++ b/fixincludes/mkfixinc.sh
|
||||
@@ -11,6 +11,7 @@ target=fixinc.sh
|
||||
|
||||
# Check for special fix rules for particular targets
|
||||
case $machine in
|
||||
+ *-myos* | \
|
||||
i?86-*-cygwin* | \
|
||||
i?86-*-mingw32* | \
|
||||
x86_64-*-mingw32* | \
|
||||
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||
index ddd3b8f4d..a65f675f2 100644
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -675,6 +675,12 @@ x86_cpus="generic intel"
|
||||
|
||||
# Common parts for widely ported systems.
|
||||
case ${target} in
|
||||
+*-*-myos*)
|
||||
+ gas=yes
|
||||
+ gnu_ld=yes
|
||||
+ default_use_cxa_atexit=yes
|
||||
+ use_gcc_stdint=wrap
|
||||
+ ;;
|
||||
*-*-darwin*)
|
||||
tmake_file="t-darwin "
|
||||
tm_file="${tm_file} darwin.h"
|
||||
@@ -978,6 +984,12 @@ case ${target} in
|
||||
esac
|
||||
|
||||
case ${target} in
|
||||
+i[34567]86-*-myos*)
|
||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h myos.h"
|
||||
+ ;;
|
||||
+x86_64-*-myos*)
|
||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h myos.h"
|
||||
+ ;;
|
||||
aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
|
||||
tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
|
||||
diff --git a/gcc/config/myos.h b/gcc/config/myos.h
|
||||
new file mode 100644
|
||||
index 000000000..4930cc299
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/myos.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Useful if you wish to make target-specific GCC changes. */
|
||||
+#undef TARGET_MYOS
|
||||
+#define TARGET_MYOS 1
|
||||
+
|
||||
+/* Default arguments you want when running your
|
||||
+ i686-myos-gcc/x86_64-myos-gcc toolchain */
|
||||
+#undef LIB_SPEC
|
||||
+#define LIB_SPEC "-lc" /* link against C standard library */
|
||||
+
|
||||
+/* Files that are linked before user code.
|
||||
+ The %s tells GCC to look for these files in the library directory. */
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
|
||||
+
|
||||
+/* Files that are linked after user code. */
|
||||
+#undef ENDFILE_SPEC
|
||||
+#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
||||
+
|
||||
+/* Additional predefined macros. */
|
||||
+#undef TARGET_OS_CPP_BUILTINS
|
||||
+#define TARGET_OS_CPP_BUILTINS() \
|
||||
+ do { \
|
||||
+ builtin_define ("__myos__"); \
|
||||
+ builtin_define ("__unix__"); \
|
||||
+ builtin_assert ("system=myos"); \
|
||||
+ builtin_assert ("system=unix"); \
|
||||
+ builtin_assert ("system=posix"); \
|
||||
+ } while(0);
|
||||
diff --git a/libgcc/config.host b/libgcc/config.host
|
||||
index 0a6b66af0..e55623cf8 100644
|
||||
index 91abc84da..d2941a089 100644
|
||||
--- a/libgcc/config.host
|
||||
+++ b/libgcc/config.host
|
||||
@@ -343,7 +343,6 @@ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
|
||||
@@ -343,6 +343,14 @@ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
|
||||
esac
|
||||
|
||||
case ${host} in
|
||||
-aarch64*-*-elf | aarch64*-*-rtems*)
|
||||
i[34567]86-*-myos*)
|
||||
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"
|
||||
@@ -352,6 +351,7 @@ x86_64-*-myos*)
|
||||
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"
|
||||
;;
|
||||
+aarch64*-*-elf | aarch64*-*-rtems*)
|
||||
+i[34567]86-*-myos*)
|
||||
+ 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-*-myos*)
|
||||
+ 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"
|
||||
+ ;;
|
||||
aarch64*-*-elf | aarch64*-*-rtems*)
|
||||
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
|
||||
extra_parts="$extra_parts crtfastmath.o"
|
||||
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
|
||||
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
|
||||
index 344eec09d..eb7030daa 100644
|
||||
--- a/libstdc++-v3/crossconfig.m4
|
||||
+++ b/libstdc++-v3/crossconfig.m4
|
||||
@@ -5,6 +5,12 @@ dnl
|
||||
AC_DEFUN([GLIBCXX_CROSSCONFIG],[
|
||||
# Base decisions on target environment.
|
||||
case "${host}" in
|
||||
+ *-myos*)
|
||||
+ GLIBCXX_CHECK_COMPILER_FEATURES
|
||||
+ GLIBCXX_CHECK_LINKER_FEATURES
|
||||
+ GLIBCXX_CHECK_MATH_SUPPORT
|
||||
+ GLIBCXX_CHECK_STDLIB_SUPPORT
|
||||
+ ;;
|
||||
arm*-*-symbianelf*)
|
||||
# This is a freestanding configuration; there is nothing to do here.
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user