diff options
author | Kevin Lo <kevlo@cvs.openbsd.org> | 2003-06-11 01:54:17 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@cvs.openbsd.org> | 2003-06-11 01:54:17 +0000 |
commit | 7ea94b99c24b51b034e1a8f6c7f29fa713eb9c17 (patch) | |
tree | 064c92464b65d267c6b3dd875b41e01d7b7e307a /gnu/egcs/gcc | |
parent | f65ddfd7f79269e91297d03c69c08c3b6144f668 (diff) |
support to arm. ok deraadt@
Diffstat (limited to 'gnu/egcs/gcc')
-rw-r--r-- | gnu/egcs/gcc/config.gcc | 6 | ||||
-rw-r--r-- | gnu/egcs/gcc/config/arm/openbsd.h | 67 | ||||
-rw-r--r-- | gnu/egcs/gcc/config/arm/t-openbsd | 5 | ||||
-rw-r--r-- | gnu/egcs/gcc/config/arm/xm-openbsd.h | 23 |
4 files changed, 101 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/config.gcc b/gnu/egcs/gcc/config.gcc index 5267fe28ad0..d5558f9fa6e 100644 --- a/gnu/egcs/gcc/config.gcc +++ b/gnu/egcs/gcc/config.gcc @@ -319,6 +319,12 @@ arm*-*-netbsd*) tmake_file="t-netbsd arm/t-netbsd" use_collect2=yes ;; +arm*-*-openbsd*) + tm_file="${tm_file} exec-stack.h" + xm_file="arm/xm-openbsd.h ${xm_file}" + tmake_file="t-libc-ok t-openbsd arm/t-openbsd" + use_collect2=yes + ;; arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out cpu_type=arm xmake_file=x-linux diff --git a/gnu/egcs/gcc/config/arm/openbsd.h b/gnu/egcs/gcc/config/arm/openbsd.h new file mode 100644 index 00000000000..7ed276b150e --- /dev/null +++ b/gnu/egcs/gcc/config/arm/openbsd.h @@ -0,0 +1,67 @@ +/* Configuration file for arm OpenBSD target. + Copyright (C) 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +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 <arm/elf.h> + +/* Get generic OpenBSD definitions. */ +#include <openbsd.h> + +/* Run-time target specifications. */ +#define CPP_PREDEFINES "-D__unix__ -D__arm32__ -D__arm__ -D__OpenBSD__ -D__ELF__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(arm) -Amachine(arm)" + +#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 */ + +/* This must agree with <machine/ansi.h> */ +#undef SIZE_TYPE +#define SIZE_TYPE "unsigned int" + +#undef PTRDIFF_TYPE +#define PTRDIFF_TYPE "int" + +#undef WCHAR_TYPE +#define WCHAR_TYPE "int" + +#undef WCHAR_TYPE_SIZE +#define WCHAR_TYPE_SIZE 32 + +/* Stack & calling: aggregate returns. */ + +/* Don't default to pcc-struct-return, because gcc is the only compiler, and + we want to retain compatibility with older gcc versions. */ +#undef DEFAULT_PCC_STRUCT_RETURN +#define DEFAULT_PCC_STRUCT_RETURN 0 + diff --git a/gnu/egcs/gcc/config/arm/t-openbsd b/gnu/egcs/gcc/config/arm/t-openbsd new file mode 100644 index 00000000000..24f9a43b000 --- /dev/null +++ b/gnu/egcs/gcc/config/arm/t-openbsd @@ -0,0 +1,5 @@ +# gdb gets confused if pic code is linked with non pic +# We cope by building all variants of libgcc. +MULTILIB_OPTIONS = fpic/fPIC +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib diff --git a/gnu/egcs/gcc/config/arm/xm-openbsd.h b/gnu/egcs/gcc/config/arm/xm-openbsd.h new file mode 100644 index 00000000000..d409633baed --- /dev/null +++ b/gnu/egcs/gcc/config/arm/xm-openbsd.h @@ -0,0 +1,23 @@ +/* Configuration file for an host running sparc OpenBSD. + Copyright (C) 1999 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +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 <xm-openbsd.h> +#include <arm/xm-arm.h> + |