OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [config/] [mips/] [linux.h] - Diff between revs 282 and 338

Only display areas with differences | Details | Blame | View Log

Rev 282 Rev 338
/* Definitions for MIPS running Linux-based GNU systems with ELF format.
/* Definitions for MIPS running Linux-based GNU systems with ELF format.
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
   2007, 2008 Free Software Foundation, Inc.
   2007, 2008 Free Software Foundation, Inc.
 
 
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
the Free Software Foundation; either version 3, or (at your option)
the Free Software Foundation; either version 3, or (at your option)
any later version.
any later version.
 
 
GCC is distributed in the hope that it will be useful,
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
GNU General Public License for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */
<http://www.gnu.org/licenses/>.  */
 
 
#undef WCHAR_TYPE
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#define WCHAR_TYPE "int"
 
 
#undef WCHAR_TYPE_SIZE
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
#define WCHAR_TYPE_SIZE 32
 
 
#undef ASM_DECLARE_OBJECT_NAME
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
 
 
#undef TARGET_VERSION
#undef TARGET_VERSION
#if TARGET_ENDIAN_DEFAULT == 0
#if TARGET_ENDIAN_DEFAULT == 0
#define TARGET_VERSION fprintf (stderr, " (MIPSel GNU/Linux with ELF)");
#define TARGET_VERSION fprintf (stderr, " (MIPSel GNU/Linux with ELF)");
#else
#else
#define TARGET_VERSION fprintf (stderr, " (MIPS GNU/Linux with ELF)");
#define TARGET_VERSION fprintf (stderr, " (MIPS GNU/Linux with ELF)");
#endif
#endif
 
 
#undef MD_EXEC_PREFIX
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
#undef MD_STARTFILE_PREFIX
 
 
/* If we don't set MASK_ABICALLS, we can't default to PIC.  */
/* If we don't set MASK_ABICALLS, we can't default to PIC.  */
#undef TARGET_DEFAULT
#undef TARGET_DEFAULT
#define TARGET_DEFAULT MASK_ABICALLS
#define TARGET_DEFAULT MASK_ABICALLS
 
 
#define TARGET_OS_CPP_BUILTINS()                                \
#define TARGET_OS_CPP_BUILTINS()                                \
  do {                                                          \
  do {                                                          \
    LINUX_TARGET_OS_CPP_BUILTINS();                             \
    LINUX_TARGET_OS_CPP_BUILTINS();                             \
    /* The GNU C++ standard library requires this.  */          \
    /* The GNU C++ standard library requires this.  */          \
    if (c_dialect_cxx ())                                       \
    if (c_dialect_cxx ())                                       \
      builtin_define ("_GNU_SOURCE");                           \
      builtin_define ("_GNU_SOURCE");                           \
  } while (0)
  } while (0)
 
 
#undef SUBTARGET_CPP_SPEC
#undef SUBTARGET_CPP_SPEC
#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
 
 
/* A standard GNU/Linux mapping.  On most targets, it is included in
/* A standard GNU/Linux mapping.  On most targets, it is included in
   CC1_SPEC itself by config/linux.h, but mips.h overrides CC1_SPEC
   CC1_SPEC itself by config/linux.h, but mips.h overrides CC1_SPEC
   and provides this hook instead.  */
   and provides this hook instead.  */
#undef SUBTARGET_CC1_SPEC
#undef SUBTARGET_CC1_SPEC
#define SUBTARGET_CC1_SPEC "%{profile:-p}"
#define SUBTARGET_CC1_SPEC "%{profile:-p}"
 
 
/* From iris5.h */
/* From iris5.h */
/* -G is incompatible with -KPIC which is the default, so only allow objects
/* -G is incompatible with -KPIC which is the default, so only allow objects
   in the small data section if the user explicitly asks for it.  */
   in the small data section if the user explicitly asks for it.  */
#undef MIPS_DEFAULT_GVALUE
#undef MIPS_DEFAULT_GVALUE
#define MIPS_DEFAULT_GVALUE 0
#define MIPS_DEFAULT_GVALUE 0
 
 
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
 
 
/* Borrowed from sparc/linux.h */
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
#undef LINK_SPEC
#define LINK_SPEC \
#define LINK_SPEC \
 "%(endian_spec) \
 "%(endian_spec) \
  %{shared:-shared} \
  %{shared:-shared} \
  %{!shared: \
  %{!shared: \
    %{!ibcs: \
    %{!ibcs: \
      %{!static: \
      %{!static: \
        %{rdynamic:-export-dynamic} \
        %{rdynamic:-export-dynamic} \
        %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
        %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
        %{static:-static}}}"
        %{static:-static}}}"
 
 
#undef SUBTARGET_ASM_SPEC
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC \
#define SUBTARGET_ASM_SPEC \
  "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}"
  "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}"
 
 
/* The MIPS assembler has different syntax for .set. We set it to
/* The MIPS assembler has different syntax for .set. We set it to
   .dummy to trap any errors.  */
   .dummy to trap any errors.  */
#undef SET_ASM_OP
#undef SET_ASM_OP
#define SET_ASM_OP "\t.dummy\t"
#define SET_ASM_OP "\t.dummy\t"
 
 
#undef ASM_OUTPUT_DEF
#undef ASM_OUTPUT_DEF
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                              \
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                              \
 do {                                                                   \
 do {                                                                   \
        fputc ( '\t', FILE);                                            \
        fputc ( '\t', FILE);                                            \
        assemble_name (FILE, LABEL1);                                   \
        assemble_name (FILE, LABEL1);                                   \
        fputs ( " = ", FILE);                                           \
        fputs ( " = ", FILE);                                           \
        assemble_name (FILE, LABEL2);                                   \
        assemble_name (FILE, LABEL2);                                   \
        fputc ( '\n', FILE);                                            \
        fputc ( '\n', FILE);                                            \
 } while (0)
 } while (0)
 
 
/* The glibc _mcount stub will save $v0 for us.  Don't mess with saving
/* The glibc _mcount stub will save $v0 for us.  Don't mess with saving
   it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
   it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
   presence of $gp-relative calls.  */
   presence of $gp-relative calls.  */
#undef ASM_OUTPUT_REG_PUSH
#undef ASM_OUTPUT_REG_PUSH
#undef ASM_OUTPUT_REG_POP
#undef ASM_OUTPUT_REG_POP
 
 
#undef LIB_SPEC
#undef LIB_SPEC
#define LIB_SPEC "\
#define LIB_SPEC "\
%{pthread:-lpthread} \
%{pthread:-lpthread} \
%{shared:-lc} \
%{shared:-lc} \
%{!shared: \
%{!shared: \
  %{profile:-lc_p} %{!profile:-lc}}"
  %{profile:-lc_p} %{!profile:-lc}}"
 
 
#define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h"
#define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h"
 
 
#ifdef HAVE_AS_NO_SHARED
#ifdef HAVE_AS_NO_SHARED
/* Default to -mno-shared for non-PIC.  */
/* Default to -mno-shared for non-PIC.  */
# define NO_SHARED_SPECS \
# define NO_SHARED_SPECS \
  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;:-mno-shared}"
  "%{mshared|mno-shared|fpic|fPIC|fpie|fPIE:;:-mno-shared}"
#else
#else
# define NO_SHARED_SPECS ""
# define NO_SHARED_SPECS ""
#endif
#endif
 
 
/* -march=native handling only makes sense with compiler running on
/* -march=native handling only makes sense with compiler running on
   a MIPS chip.  */
   a MIPS chip.  */
#if defined(__mips__)
#if defined(__mips__)
extern const char *host_detect_local_cpu (int argc, const char **argv);
extern const char *host_detect_local_cpu (int argc, const char **argv);
# define EXTRA_SPEC_FUNCTIONS \
# define EXTRA_SPEC_FUNCTIONS \
  { "local_cpu_detect", host_detect_local_cpu },
  { "local_cpu_detect", host_detect_local_cpu },
 
 
# define MARCH_MTUNE_NATIVE_SPECS                               \
# define MARCH_MTUNE_NATIVE_SPECS                               \
  " %{march=native:%<march=native %:local_cpu_detect(arch)}"    \
  " %{march=native:%<march=native %:local_cpu_detect(arch)}"    \
  " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
  " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
#else
#else
# define MARCH_MTUNE_NATIVE_SPECS ""
# define MARCH_MTUNE_NATIVE_SPECS ""
#endif
#endif
 
 
#define LINUX_DRIVER_SELF_SPECS \
#define LINUX_DRIVER_SELF_SPECS \
  NO_SHARED_SPECS                                                       \
  NO_SHARED_SPECS                                                       \
  MARCH_MTUNE_NATIVE_SPECS,                                             \
  MARCH_MTUNE_NATIVE_SPECS,                                             \
  /* -mplt has no effect without -mno-shared.  Simplify later           \
  /* -mplt has no effect without -mno-shared.  Simplify later           \
     specs handling by removing a redundant option.  */                 \
     specs handling by removing a redundant option.  */                 \
  "%{!mno-shared:%<mplt}",                                              \
  "%{!mno-shared:%<mplt}",                                              \
  /* -mplt likewise has no effect for -mabi=64 without -msym32.  */     \
  /* -mplt likewise has no effect for -mabi=64 without -msym32.  */     \
  "%{mabi=64:%{!msym32:%<mplt}}"
  "%{mabi=64:%{!msym32:%<mplt}}"
 
 
#undef DRIVER_SELF_SPECS
#undef DRIVER_SELF_SPECS
#define DRIVER_SELF_SPECS \
#define DRIVER_SELF_SPECS \
  BASE_DRIVER_SELF_SPECS, \
  BASE_DRIVER_SELF_SPECS, \
  LINUX_DRIVER_SELF_SPECS
  LINUX_DRIVER_SELF_SPECS
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.