diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-08-11 22:55:56 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-08-11 22:55:56 +0000 |
commit | d0a15acf993ad0b1cfe959dfd6e56c6a3300e543 (patch) | |
tree | dff91bb14f5f21c2b7a595d6e0e039bc6009faa6 | |
parent | a3173771c7a01fa09e5ed87291ec7403d4a48daf (diff) |
Switch sparc to ELF.
XXX - we might want to improve the logic of selection of ELF vs. a.out
when we bump our version to 3.2, before feeding those changes to FSF.
-rw-r--r-- | gnu/egcs/gcc/config.gcc | 4 | ||||
-rw-r--r-- | gnu/egcs/gcc/config/sparc/openbsd.h | 39 |
2 files changed, 21 insertions, 22 deletions
diff --git a/gnu/egcs/gcc/config.gcc b/gnu/egcs/gcc/config.gcc index c173d018b24..501d4e996b5 100644 --- a/gnu/egcs/gcc/config.gcc +++ b/gnu/egcs/gcc/config.gcc @@ -2493,9 +2493,9 @@ sparc-*-netbsd*) use_collect2=yes ;; sparc-*-openbsd*) - # we need collect2 until our bug is fixed... - use_collect2=yes tmake_file="t-libc-ok t-openbsd sparc/t-openbsd" + gas=yes gnu_ld=yes + use_collect2=no ;; sparc64-*-openbsd*) tm_file=sparc/openbsd64.h diff --git a/gnu/egcs/gcc/config/sparc/openbsd.h b/gnu/egcs/gcc/config/sparc/openbsd.h index 19ece975e99..5cb2ab90018 100644 --- a/gnu/egcs/gcc/config/sparc/openbsd.h +++ b/gnu/egcs/gcc/config/sparc/openbsd.h @@ -18,14 +18,30 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <sparc/sparc.h> +#include <sparc/elf.h> /* Get generic OpenBSD definitions. */ -#define OBSD_OLD_GAS #include <openbsd.h> /* Run-time target specifications. */ -#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)" +#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__OpenBSD__ -D__ELF__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)" + +#undef LINK_SPEC +#define LINK_SPEC \ + "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \ + %{shared:-shared} %{R*} \ + %{static:-Bstatic} \ + %{!static:-Bdynamic} \ + %{assert*} \ + %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}" + +/* As an elf system, we need crtbegin/crtend stuff. */ +#undef STARTFILE_SPEC +#define STARTFILE_SPEC "\ + %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \ + crtbegin%O%s} %{shared:crtbeginS%O%s}" +#undef ENDFILE_SPEC +#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" /* Layout of source language data types */ @@ -42,14 +58,6 @@ Boston, MA 02111-1307, USA. */ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 -/* Specific options for DBX Output. */ - -/* This is BSD, so it wants DBX format. */ -#define DBX_DEBUGGING_INFO - -/* This is the char to use for continuation */ -#define DBX_CONTIN_CHAR '?' - /* Stack & calling: aggregate returns. */ /* Don't default to pcc-struct-return, because gcc is the only compiler, and @@ -57,12 +65,3 @@ Boston, MA 02111-1307, USA. */ #undef DEFAULT_PCC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 0 -/* Assembler format: exception region output. */ - -/* All configurations that don't use elf must be explicit about not using - dwarf unwind information. egcs doesn't try too hard to check internal - configuration files... */ -#define DWARF2_UNWIND_INFO 0 - -/* Default sparc.h does already define ASM_OUTPUT_MI_THUNK */ - |