diff options
author | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-14 00:29:52 +0000 |
---|---|---|
committer | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-14 00:29:52 +0000 |
commit | 1ad38120b5aafd9fdfd7862770d58b8d0d4aeb4e (patch) | |
tree | d6fb6aef5ef320b0b983ada9172b0305d4a4669b /gcc/config/arm/uclinux-eabi.h | |
parent | 6c05758d382b3c0f142d2ddd9fd1d4706a77bf6b (diff) | |
download | gcc-1ad38120b5aafd9fdfd7862770d58b8d0d4aeb4e.tar.gz |
2007-02-13 Paul Brook <paul@codesourcery.com>
gcc/
* config.gcc: Add arm*-*-uclinux-*eabi.
* config/arm/uclinux-elf.h (TARGET_OS_CPP_BUILTINS): Define.
(SUBTARGET_EXTRA_LINK_SPEC): Define.
(STARTFILE_SPEC, ENDFILE_SPEC): Remove broken -shared handling.
(LINK_GCC_C_SEQUENCE_SPEC): Undef.
(LINK_SPEC): Define.
(LIB_SPEC): Define.
* config/arm/arm.c (arm_override_options): Use r9 as EABI PIC
register.
* config/arm/uclinux-eabi.h: New file.
* config/arm/linux-eabi.h (WCHAR_TYPE): Remove.
* config/arm/linux-gas.h (WCHAR_TYPE): Use unsigned long on AAPCS
based targets.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121902 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/uclinux-eabi.h')
-rw-r--r-- | gcc/config/arm/uclinux-eabi.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/gcc/config/arm/uclinux-eabi.h b/gcc/config/arm/uclinux-eabi.h new file mode 100644 index 00000000000..3806bf9bac5 --- /dev/null +++ b/gcc/config/arm/uclinux-eabi.h @@ -0,0 +1,66 @@ +/* Definitions for ARM EABI ucLinux + Copyright (C) 2006 Free Software Foundation, Inc. + Contributed by Paul Brook <paul@codesourcery.com> + + This file is part of GCC. + + GCC 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. + + GCC 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 this program; see the file COPYING. If not, write to + the Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* Override settings that are different to the uclinux-elf or + bpabi defaults. */ + +#undef TARGET_DEFAULT +#define TARGET_DEFAULT (MASK_SINGLE_PIC_BASE | MASK_INTERWORK) + +/* On EABI GNU/Linux, we want both the BPABI builtins and the + GNU/Linux builtins. */ +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + TARGET_BPABI_CPP_BUILTINS(); \ + builtin_define ("__uClinux__"); \ + builtin_define ("__gnu_linux__"); \ + builtin_define_std ("linux"); \ + builtin_define_std ("unix"); \ + builtin_assert ("system=linux"); \ + builtin_assert ("system=unix"); \ + builtin_assert ("system=posix"); \ + } \ + while (false) + +#undef SUBTARGET_EXTRA_LINK_SPEC +#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" + +/* We default to the "aapcs-linux" ABI so that enums are int-sized by + default. */ +#undef ARM_DEFAULT_ABI +#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX + +/* Clear the instruction cache from `beg' to `end'. This makes an + inline system call to SYS_cacheflush. */ +#undef CLEAR_INSN_CACHE +#define CLEAR_INSN_CACHE(BEG, END) \ +{ \ + register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ + register unsigned long _end __asm ("a2") = (unsigned long) (END); \ + register unsigned long _flg __asm ("a3") = 0; \ + register unsigned long _scno __asm ("r7") = 0xf0002; \ + __asm __volatile ("swi 0x0 @ sys_cacheflush" \ + : "=r" (_beg) \ + : "0" (_beg), "r" (_end), "r" (_flg), "r" (_scno)); \ +} + |