Changeset View
Changeset View
Standalone View
Standalone View
head/devel/powerpc64-gcc/files/patch-gcc-freebsd-mips
diff --git a/gcc/config.gcc b/gcc/config.gcc | diff --git a/gcc/config.gcc b/gcc/config.gcc | ||||
index 90d4f71..5a05e22 100644 | index 90d4f71..5a05e22 100644 | ||||
--- gcc/config.gcc | --- gcc/config.gcc | ||||
+++ gcc/config.gcc | +++ gcc/config.gcc | ||||
@@ -1949,6 +1949,26 @@ microblaze*-*-elf) | @@ -1949,6 +1949,26 @@ microblaze*-*-elf) | ||||
cxx_target_objs="${cxx_target_objs} microblaze-c.o" | cxx_target_objs="${cxx_target_objs} microblaze-c.o" | ||||
tmake_file="${tmake_file} microblaze/t-microblaze" | tmake_file="${tmake_file} microblaze/t-microblaze" | ||||
;; | ;; | ||||
+mips*-*-freebsd*) # FreeBSD/mips[64], either endian. | +mips*-*-freebsd*) # FreeBSD/mips[64], either endian. | ||||
+ tm_file="${tm_file} elfos.h ${fbsd_tm_file} mips/elf.h mips/freebsd.h" | + tm_file="${tm_file} elfos.h ${fbsd_tm_file} mips/elf.h mips/freebsd.h" | ||||
+ target_cpu_default=MASK_SOFT_FLOAT_ABI | + target_cpu_default="MASK_ABICALLS|MASK_SOFT_FLOAT_ABI" | ||||
+ case ${target} in | + case ${target} in | ||||
+ mips64*-*-freebsd*) | + mips64*-*-freebsd*) | ||||
+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64" | + tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64" | ||||
+ ;; | + ;; | ||||
+ mips32*-*-freebsd*) | |||||
+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32 MIPS_ISA_DEFAULT=33" | |||||
+ ;; | |||||
+ mipsn32*-*-freebsd*) | + mipsn32*-*-freebsd*) | ||||
+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32 MIPS_ISA_DEFAULT=33" | + tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" | ||||
+ ;; | + ;; | ||||
+ mips*-*-freebsd*) | |||||
+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32 MIPS_ISA_DEFAULT=3" | |||||
+ ;; | |||||
+ esac | + esac | ||||
+ case ${target} in | + case ${target} in | ||||
+ mips*el-*-freebsd*) | + mips*el-*-freebsd*) | ||||
+ tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0"; | + tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0"; | ||||
+ ;; | + ;; | ||||
+ esac | + esac | ||||
+ ;; | + ;; | ||||
mips*-*-netbsd*) # NetBSD/mips, either endian. | mips*-*-netbsd*) # NetBSD/mips, either endian. | ||||
Show All 29 Lines | |||||
/* Output the size directive for a decl in rest_of_decl_compilation | /* Output the size directive for a decl in rest_of_decl_compilation | ||||
in the case where we did not do so before the initializer. | in the case where we did not do so before the initializer. | ||||
diff --git a/gcc/config/mips/freebsd.h b/gcc/config/mips/freebsd.h | diff --git a/gcc/config/mips/freebsd.h b/gcc/config/mips/freebsd.h | ||||
new file mode 100644 | new file mode 100644 | ||||
index 0000000..56a921e | index 0000000..56a921e | ||||
--- /dev/null | --- /dev/null | ||||
+++ gcc/config/mips/freebsd.h | +++ gcc/config/mips/freebsd.h | ||||
@@ -0,0 +1,347 @@ | @@ -0,0 +1,320 @@ | ||||
+/* Definitions for MIPS varients running FreeBSD with ELF format | +/* Definitions for MIPS varients running FreeBSD with ELF format | ||||
+ Copyright (C) 2008 Free Software Foundation, Inc. | + Copyright (C) 2008 Free Software Foundation, Inc. | ||||
+ Continued by David O'Brien <obrien@freebsd.org> | + Continued by David O'Brien <obrien@freebsd.org> | ||||
+ | + | ||||
+This file is part of GCC. | +This file is part of GCC. | ||||
+ | + | ||||
+GCC is free software; you can redistribute it and/or modify | +GCC is free software; you can redistribute it and/or modify | ||||
+it under the terms of the GNU General Public License as published by | +it under the terms of the GNU General Public License as published by | ||||
▲ Show 20 Lines • Show All 229 Lines • ▼ Show 20 Lines | |||||
+ builtin_define ("__MIPSEL__"); \ | + builtin_define ("__MIPSEL__"); \ | ||||
+ \ | + \ | ||||
+ /* No language dialect defines. */ \ | + /* No language dialect defines. */ \ | ||||
+ if (TARGET_ABICALLS) \ | + if (TARGET_ABICALLS) \ | ||||
+ builtin_define ("__ABICALLS__"); \ | + builtin_define ("__ABICALLS__"); \ | ||||
+ } \ | + } \ | ||||
+ while (0) | + while (0) | ||||
+ | + | ||||
+/* Default ABI and ISA */ | +/* Always pass ISA to drivers */ | ||||
+/* | |||||
+ * XXX/juli | |||||
+ * Shouldn't this also be dependent on !mips*? | |||||
+ */ | |||||
+#ifdef MIPS_CPU_STRING_DEFAULT | |||||
+#define DRIVER_SELF_ISA_SPEC "%{!march=*: -march=" MIPS_CPU_STRING_DEFAULT "}" | |||||
+#else | |||||
+#define DRIVER_SELF_ISA_SPEC "%{!march=*: -march=from-abi}" | |||||
+#endif | |||||
+ | |||||
+#undef DRIVER_SELF_SPECS | +#undef DRIVER_SELF_SPECS | ||||
+#if MIPS_ABI_DEFAULT == ABI_N32 | |||||
+#define DRIVER_SELF_SPECS \ | +#define DRIVER_SELF_SPECS \ | ||||
+ "%{!EB:%{!EL:%(endian_spec)}}", \ | + MIPS_DEFAULT_ISA_LEVEL_SPEC, \ | ||||
+ "%{!mabi=*: -mabi=n32}", \ | + MIPS_ISA_LEVEL_SPEC, \ | ||||
+ DRIVER_SELF_ISA_SPEC | + BASE_DRIVER_SELF_SPECS | ||||
+#elif MIPS_ABI_DEFAULT == ABI_64 | |||||
+#define DRIVER_SELF_SPECS \ | |||||
+ "%{!EB:%{!EL:%(endian_spec)}}", \ | |||||
+ "%{!mabi=*: -mabi=64}", \ | |||||
+ DRIVER_SELF_ISA_SPEC | |||||
+#elif MIPS_ABI_DEFAULT == ABI_O64 | |||||
+#define DRIVER_SELF_SPECS \ | |||||
+ "%{!EB:%{!EL:%(endian_spec)}}", \ | |||||
+ "%{!mabi=*: -mabi=o64}", \ | |||||
+ DRIVER_SELF_ISA_SPEC | |||||
+#else /* default to o32 */ | |||||
+#define DRIVER_SELF_SPECS \ | |||||
+ "%{!EB:%{!EL:%(endian_spec)}}", \ | |||||
+ "%{!mabi=*: -mabi=32}", \ | |||||
+ DRIVER_SELF_ISA_SPEC | |||||
+#endif | |||||
+ | + | ||||
+#if 0 | +#if 0 | ||||
+/* Don't default to pcc-struct-return, we want to retain compatibility with | +/* Don't default to pcc-struct-return, we want to retain compatibility with | ||||
+ older gcc versions AND pcc-struct-return is nonreentrant. | + older gcc versions AND pcc-struct-return is nonreentrant. | ||||
+ (even though the SVR4 ABI for the i386 says that records and unions are | + (even though the SVR4 ABI for the i386 says that records and unions are | ||||
+ returned in memory). */ | + returned in memory). */ | ||||
+ | + | ||||
+#undef DEFAULT_PCC_STRUCT_RETURN | +#undef DEFAULT_PCC_STRUCT_RETURN | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |