033355874a
rs6000 is special, as it incorporates everything into one file...
214 lines
8.2 KiB
Plaintext
214 lines
8.2 KiB
Plaintext
--- gcc/config/rs6000/sysv4.h.orig Tue Feb 2 01:33:16 1999
|
|
+++ gcc/config/rs6000/sysv4.h Tue Feb 2 01:56:32 1999
|
|
@@ -161,6 +161,8 @@
|
|
rs6000_current_abi = ABI_NT; \
|
|
else if (!strcmp (rs6000_abi_name, "linux")) \
|
|
rs6000_current_abi = ABI_V4; \
|
|
+ else if (!strcmp (rs6000_abi_name, "openbsd")) \
|
|
+ rs6000_current_abi = ABI_V4; \
|
|
else if (!strcmp (rs6000_abi_name, "solaris")) \
|
|
rs6000_current_abi = ABI_SOLARIS; \
|
|
else \
|
|
@@ -973,6 +975,7 @@
|
|
%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian} \
|
|
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
|
|
%{mcall-solaris: -mlittle -msolaris} \
|
|
+ %{mcall-openbsd: -mbig} \
|
|
%{mcall-linux: -mbig} }}}}"
|
|
|
|
#ifndef CC1_ENDIAN_BIG_SPEC
|
|
@@ -999,6 +1002,7 @@
|
|
%{mcall-aixdesc: -mbig %{cc1_endian_big} } \
|
|
%{mcall-solaris: -mlittle %{cc1_endian_little} } \
|
|
%{mcall-linux: -mbig %{cc1_endian_big} } \
|
|
+ %{mcall-openbsd: -mbig %{cc1_endian_big} } \
|
|
%{!mcall-nt: %{!mcall-aixdesc: %{!mcall-solaris: %{!mcall-linux: \
|
|
%(cc1_endian_default) \
|
|
}}}} \
|
|
@@ -1008,7 +1012,8 @@
|
|
%{!meabi: %{!mno-eabi: \
|
|
%{mrelocatable: -meabi } \
|
|
%{mcall-solaris: -mno-eabi } \
|
|
- %{mcall-linux: -mno-eabi }}} \
|
|
+ %{mcall-linux: -mno-eabi } \
|
|
+ %{mcall-openbsd: -mno-eabi }}} \
|
|
%{msdata: -msdata=default} \
|
|
%{mno-sdata: -msdata=none}"
|
|
|
|
@@ -1038,8 +1043,9 @@
|
|
%{mmvme: %(link_start_mvme) } \
|
|
%{msim: %(link_start_sim) } \
|
|
%{mcall-linux: %(link_start_linux) } \
|
|
+%{mcall-openbsd: %(link_start_openbsd) } \
|
|
%{mcall-solaris: %(link_start_solaris) } \
|
|
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_start_default) }}}}}}"
|
|
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-solaris: %(link_start_default) }}}}}}}"
|
|
#endif
|
|
|
|
#ifndef LINK_START_DEFAULT_SPEC
|
|
@@ -1095,8 +1101,9 @@
|
|
%{mmvme: %(link_os_mvme) } \
|
|
%{msim: %(link_os_sim) } \
|
|
%{mcall-linux: %(link_os_linux) } \
|
|
+%{mcall-openbsd: %(link_os_openbsd) } \
|
|
%{mcall-solaris: %(link_os_solaris) } \
|
|
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_os_default) }}}}}}"
|
|
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-solaris: %(link_os_default) }}}}}}}"
|
|
#endif
|
|
|
|
#ifndef LINK_OS_DEFAULT_SPEC
|
|
@@ -1139,8 +1146,9 @@
|
|
%{mcall-solaris: %(cpp_endian_solaris) } \
|
|
%{mcall-nt: %(cpp_endian_little) } \
|
|
%{mcall-linux: %(cpp_endian_big) } \
|
|
+ %{mcall-openbsd: %(cpp_endian_big) } \
|
|
%{mcall-aixdesc: %(cpp_endian_big) } \
|
|
- %{!mcall-solaris: %{!mcall-linux: %{!mcall-nt: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}}"
|
|
+ %{!mcall-solaris: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-nt: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}}}"
|
|
|
|
#undef CPP_ENDIAN_DEFAULT_SPEC
|
|
#define CPP_ENDIAN_DEFAULT_SPEC "%(cpp_endian_big)"
|
|
@@ -1152,8 +1160,9 @@
|
|
%{mmvme: %(cpp_os_mvme) } \
|
|
%{msim: %(cpp_os_sim) } \
|
|
%{mcall-linux: %(cpp_os_linux) } \
|
|
+%{mcall-openbsd: %(cpp_os_linux) } \
|
|
%{mcall-solaris: %(cpp_os_solaris) } \
|
|
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(cpp_os_default) }}}}}}"
|
|
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-solaris: %(cpp_os_default) }}}}}}}"
|
|
|
|
#ifndef CPP_OS_DEFAULT_SPEC
|
|
#define CPP_OS_DEFAULT_SPEC ""
|
|
@@ -1166,8 +1175,9 @@
|
|
%{mmvme: %(startfile_mvme) } \
|
|
%{msim: %(startfile_sim) } \
|
|
%{mcall-linux: %(startfile_linux) } \
|
|
+%{mcall-openbsd: %(startfile_openbsd) } \
|
|
%{mcall-solaris: %(startfile_solaris) } \
|
|
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(startfile_default) }}}}}}"
|
|
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-solaris: %(startfile_default) }}}}}}}"
|
|
|
|
#undef STARTFILE_DEFAULT_SPEC
|
|
#define STARTFILE_DEFAULT_SPEC ""
|
|
@@ -1179,8 +1189,9 @@
|
|
%{mmvme: %(lib_mvme) } \
|
|
%{msim: %(lib_sim) } \
|
|
%{mcall-linux: %(lib_linux) } \
|
|
+%{mcall-openbsd: %(lib_openbsd) } \
|
|
%{mcall-solaris: %(lib_solaris) } \
|
|
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(lib_default) }}}}}}"
|
|
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-solaris: %(lib_default) }}}}}}}"
|
|
|
|
#undef LIBGCC_SPEC
|
|
#define LIBGCC_SPEC "libgcc.a%s"
|
|
@@ -1196,8 +1207,9 @@
|
|
%{mmvme: ecrtn.o%s} \
|
|
%{msim: ecrtn.o%s} \
|
|
%{mcall-linux: %(endfile_linux) } \
|
|
+%{mcall-openbsd: %(endfile_openbsd) } \
|
|
%{mcall-solaris: scrtn.o%s} \
|
|
-%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(endfile_default) }}}}}}"
|
|
+%{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-openbsd: %{!mcall-solaris: %(endfile_default) }}}}}}}"
|
|
|
|
#undef ENDFILE_DEFAULT_SPEC
|
|
#define ENDFILE_DEFAULT_SPEC ""
|
|
@@ -1334,8 +1346,47 @@
|
|
-Asystem(unix) -Asystem(linux)"
|
|
#endif
|
|
|
|
-#ifndef CPP_OS_LINUX_SPEC
|
|
-#define CPP_OS_LINUX_SPEC ""
|
|
+/* OpenBSD support. */
|
|
+#ifndef LIB_OPENBSD_SPEC
|
|
+#define LIB_OPENBSD_SPEC "%{mnewlib: --start-group -lopenbsd %(libc_openbsd) --end-group } %{!mnewlib: %(libc_openbsd) }"
|
|
+#endif
|
|
+
|
|
+#ifndef LIBC_OPENBSD_SPEC
|
|
+#define LIBC_OPENBSD_SPEC "-lc%{pthread_r}%{p:_p}%{!p:%{pg:_p}}"
|
|
+#endif
|
|
+
|
|
+#ifndef STARTFILE_OPENBSD_SPEC
|
|
+#define STARTFILE_OPENBSD_SPEC "\
|
|
+%{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
|
|
+%{mnewlib: ecrti.o%s} \
|
|
+%{!mnewlib: %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
|
|
+#endif
|
|
+/*
|
|
+%{!mnewlib: crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
|
|
+*/
|
|
+
|
|
+#ifndef ENDFILE_OPENBSD_SPEC
|
|
+#define ENDFILE_OPENBSD_SPEC "\
|
|
+%{mnewlib: ecrtn.o%s} \
|
|
+%{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s}}"
|
|
+#endif
|
|
+/*
|
|
+%{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
|
|
+*/
|
|
+
|
|
+#ifndef LINK_START_OPENBSD_SPEC
|
|
+#define LINK_START_OPENBSD_SPEC "-Ttext 0x400074"
|
|
+#endif
|
|
+
|
|
+#ifndef LINK_OS_OPENBSD_SPEC
|
|
+#define LINK_OS_OPENBSD_SPEC ""
|
|
+#endif
|
|
+
|
|
+#ifndef CPP_OS_OPENBSD_SPEC
|
|
+#define CPP_OS_OPENBSD_SPEC "-D__unix__ -D__OpenBSD__ \
|
|
+%{!ansi: -Dunix } \
|
|
+%{pthread:-D_POSIX_THREADS} \
|
|
+-Asystem(unix) -Asystem(OpenBSD)"
|
|
#endif
|
|
|
|
/* Solaris support. */
|
|
@@ -1401,6 +1452,8 @@
|
|
{ "lib_mvme", LIB_MVME_SPEC }, \
|
|
{ "lib_sim", LIB_SIM_SPEC }, \
|
|
{ "lib_linux", LIB_LINUX_SPEC }, \
|
|
+ { "lib_openbsd", LIB_OPENBSD_SPEC }, \
|
|
+ { "libc_openbsd", LIBC_OPENBSD_SPEC }, \
|
|
{ "lib_solaris", LIB_SOLARIS_SPEC }, \
|
|
{ "lib_default", LIB_DEFAULT_SPEC }, \
|
|
{ "startfile_ads", STARTFILE_ADS_SPEC }, \
|
|
@@ -1408,6 +1461,7 @@
|
|
{ "startfile_mvme", STARTFILE_MVME_SPEC }, \
|
|
{ "startfile_sim", STARTFILE_SIM_SPEC }, \
|
|
{ "startfile_linux", STARTFILE_LINUX_SPEC }, \
|
|
+ { "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
|
|
{ "startfile_solaris", STARTFILE_SOLARIS_SPEC }, \
|
|
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \
|
|
{ "endfile_ads", ENDFILE_ADS_SPEC }, \
|
|
@@ -1415,6 +1469,7 @@
|
|
{ "endfile_mvme", ENDFILE_MVME_SPEC }, \
|
|
{ "endfile_sim", ENDFILE_SIM_SPEC }, \
|
|
{ "endfile_linux", ENDFILE_LINUX_SPEC }, \
|
|
+ { "endfile_openbsd", ENDFILE_OPENBSD_SPEC }, \
|
|
{ "endfile_solaris", ENDFILE_SOLARIS_SPEC }, \
|
|
{ "endfile_default", ENDFILE_DEFAULT_SPEC }, \
|
|
{ "link_path", LINK_PATH_SPEC }, \
|
|
@@ -1426,6 +1481,7 @@
|
|
{ "link_start_mvme", LINK_START_MVME_SPEC }, \
|
|
{ "link_start_sim", LINK_START_SIM_SPEC }, \
|
|
{ "link_start_linux", LINK_START_LINUX_SPEC }, \
|
|
+ { "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
|
|
{ "link_start_solaris", LINK_START_SOLARIS_SPEC }, \
|
|
{ "link_start_default", LINK_START_DEFAULT_SPEC }, \
|
|
{ "link_os", LINK_OS_SPEC }, \
|
|
@@ -1434,6 +1490,7 @@
|
|
{ "link_os_mvme", LINK_OS_MVME_SPEC }, \
|
|
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
|
|
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
|
|
+ { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
|
|
{ "link_os_solaris", LINK_OS_SOLARIS_SPEC }, \
|
|
{ "link_os_default", LINK_OS_DEFAULT_SPEC }, \
|
|
{ "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \
|
|
@@ -1447,6 +1504,7 @@
|
|
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
|
{ "cpp_os_sim", CPP_OS_SIM_SPEC }, \
|
|
{ "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
|
|
+ { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \
|
|
{ "cpp_os_solaris", CPP_OS_SOLARIS_SPEC }, \
|
|
{ "cpp_os_default", CPP_OS_DEFAULT_SPEC },
|
|
|