source: mainline/tools/toolchain-gcc-4.8.1-headers.patch@ 476ac3b

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 476ac3b was 5a65d29, checked in by Vojtech Horky <vojtechhorky@…>, 12 years ago

Add HelenOS-specific toolchain patches

It is possible to build '*-helenos-*' toolchain, that is the triplet
would contain the word 'helenos' instead of 'linux' and GCC would
provide some HelenOS-specific macros.

The toolchain can be built with the toolchain.sh script, just provide
—helenos-target as a parameter.

Changes to the autotool/configuration scripts would be added later.

  • Property mode set to 100644
File size: 10.6 KB
  • gcc-4.8.1/gcc/config/arm/helenos-arm32.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/arm/helenos-arm32.h gcc-4.8.1/gcc/config/arm/helenos-arm32.h
     
     1/* Definitions for HelenOS compiled for arm32. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "arm32", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/arm/helenos.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/arm/helenos.h gcc-4.8.1/gcc/config/arm/helenos.h
     
     1/* Definitions for HelenOS compiled for arm32.
     2 *
     3 * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/arm/linux-eabi.h)
     4 */
     5
     6#undef TARGET_OS_CPP_BUILTINS
     7#define TARGET_OS_CPP_BUILTINS()                \
     8  do                                            \
     9    {                                           \
     10      TARGET_BPABI_CPP_BUILTINS();              \
     11      GNU_USER_TARGET_OS_CPP_BUILTINS();        \
     12      ANDROID_TARGET_OS_CPP_BUILTINS();         \
     13      HELENOS_CPP_BUILTINS();                   \
     14      HELENOS_ARCH_CPP_BUILTINS();              \
     15    }                                           \
     16  while (0)
  • gcc-4.8.1/gcc/config/helenos.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/helenos.h gcc-4.8.1/gcc/config/helenos.h
     
     1/* Common definitions for HelenOS. */
     2
     3#define HELENOS_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_std("__helenos__"); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/ia64/helenos.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/ia64/helenos.h gcc-4.8.1/gcc/config/ia64/helenos.h
     
     1/* Definitions for HelenOS compiled for ia64.
     2 *
     3 * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/ia64/linux.h)
     4 */
     5
     6#undef TARGET_OS_CPP_BUILTINS
     7#define TARGET_OS_CPP_BUILTINS()                \
     8do {                                            \
     9        GNU_USER_TARGET_OS_CPP_BUILTINS();      \
     10        builtin_define("_LONGLONG");            \
     11        HELENOS_CPP_BUILTINS();                 \
     12        HELENOS_ARCH_CPP_BUILTINS();            \
     13} while (0)
  • gcc-4.8.1/gcc/config/ia64/helenos-ia64.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/ia64/helenos-ia64.h gcc-4.8.1/gcc/config/ia64/helenos-ia64.h
     
     1/* Definitions for HelenOS compiled for ia64. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "ia64", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/i386/helenos-amd64.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/i386/helenos-amd64.h gcc-4.8.1/gcc/config/i386/helenos-amd64.h
     
     1/* Definitions for HelenOS compiled for amd64. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "amd64", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/i386/helenos.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/i386/helenos.h gcc-4.8.1/gcc/config/i386/helenos.h
     
     1/* Definitions for HelenOS compiled for ia32/amd64.
     2 *
     3 * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/i386/linux-common.h)
     4 */
     5
     6#undef TARGET_OS_CPP_BUILTINS
     7#define TARGET_OS_CPP_BUILTINS()               \
     8  do                                           \
     9    {                                          \
     10      GNU_USER_TARGET_OS_CPP_BUILTINS();       \
     11      ANDROID_TARGET_OS_CPP_BUILTINS();        \
     12      HELENOS_CPP_BUILTINS();                  \
     13      HELENOS_ARCH_CPP_BUILTINS();             \
     14    }                                          \
     15  while (0)
  • gcc-4.8.1/gcc/config/i386/helenos-ia32.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/i386/helenos-ia32.h gcc-4.8.1/gcc/config/i386/helenos-ia32.h
     
     1/* Definitions for HelenOS compiled for ia32. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "ia32", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/mips/helenos.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/mips/helenos.h gcc-4.8.1/gcc/config/mips/helenos.h
     
     1/* Definitions for HelenOS compiled for mips32/mips64.
     2 *
     3 * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/mips/linux-common.h)
     4 */
     5
     6#undef TARGET_OS_CPP_BUILTINS
     7#define TARGET_OS_CPP_BUILTINS()                                \
     8  do {                                                          \
     9    GNU_USER_TARGET_OS_CPP_BUILTINS();                          \
     10    /* The GNU C++ standard library requires this.  */          \
     11    if (c_dialect_cxx ())                                       \
     12      builtin_define ("_GNU_SOURCE");                           \
     13    ANDROID_TARGET_OS_CPP_BUILTINS();                           \
     14    HELENOS_CPP_BUILTINS();                                     \
     15    HELENOS_ARCH_CPP_BUILTINS();                                \
     16  } while (0)
  • gcc-4.8.1/gcc/config/mips/helenos-mips32eb.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/mips/helenos-mips32eb.h gcc-4.8.1/gcc/config/mips/helenos-mips32eb.h
     
     1/* Definitions for HelenOS compiled for mips32eb. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "mips32eb", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/mips/helenos-mips32el.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/mips/helenos-mips32el.h gcc-4.8.1/gcc/config/mips/helenos-mips32el.h
     
     1/* Definitions for HelenOS compiled for mips32el. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "mips32", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/mips/helenos-mips64el.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/mips/helenos-mips64el.h gcc-4.8.1/gcc/config/mips/helenos-mips64el.h
     
     1/* Definitions for HelenOS compiled for mips64. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "mips64", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/rs6000/helenos.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/rs6000/helenos.h gcc-4.8.1/gcc/config/rs6000/helenos.h
     
     1/* Definitions for HelenOS compiled for ppc32.
     2 *
     3 * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/rs6000/linux.h)
     4 */
     5
     6#undef TARGET_OS_CPP_BUILTINS
     7#define TARGET_OS_CPP_BUILTINS()                \
     8  do                                            \
     9    {                                           \
     10      builtin_define_std ("PPC");               \
     11      builtin_define_std ("powerpc");           \
     12      builtin_assert ("cpu=powerpc");           \
     13      builtin_assert ("machine=powerpc");       \
     14      TARGET_OS_SYSV_CPP_BUILTINS ();           \
     15      HELENOS_CPP_BUILTINS();                   \
     16      HELENOS_ARCH_CPP_BUILTINS();              \
     17    }                                           \
     18  while (0)
  • gcc-4.8.1/gcc/config/rs6000/helenos-ppc32.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/rs6000/helenos-ppc32.h gcc-4.8.1/gcc/config/rs6000/helenos-ppc32.h
     
     1/* Definitions for HelenOS compiled for ppc32. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "ppc32", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/rs6000/helenos-ppc64.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/rs6000/helenos-ppc64.h gcc-4.8.1/gcc/config/rs6000/helenos-ppc64.h
     
     1/* Definitions for HelenOS compiled for ppc64. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "ppc64", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/rs6000/helenos64.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/rs6000/helenos64.h gcc-4.8.1/gcc/config/rs6000/helenos64.h
     
     1/* Definitions for HelenOS compiled for ppc64.
     2 *
     3 * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/rs6000/linux64.h)
     4 */
     5
     6#undef TARGET_OS_CPP_BUILTINS
     7#define TARGET_OS_CPP_BUILTINS()                        \
     8  do                                                    \
     9    {                                                   \
     10      if (TARGET_64BIT)                                 \
     11        {                                               \
     12          builtin_define ("__PPC__");                   \
     13          builtin_define ("__PPC64__");                 \
     14          builtin_define ("__powerpc__");               \
     15          builtin_define ("__powerpc64__");             \
     16          if (!DOT_SYMBOLS)                             \
     17            builtin_define ("_CALL_LINUX");             \
     18          builtin_assert ("cpu=powerpc64");             \
     19          builtin_assert ("machine=powerpc64");         \
     20        }                                               \
     21      else                                              \
     22        {                                               \
     23          builtin_define_std ("PPC");                   \
     24          builtin_define_std ("powerpc");               \
     25          builtin_assert ("cpu=powerpc");               \
     26          builtin_assert ("machine=powerpc");           \
     27          TARGET_OS_SYSV_CPP_BUILTINS ();               \
     28        }                                               \
     29      HELENOS_CPP_BUILTINS();                           \
     30      HELENOS_ARCH_CPP_BUILTINS();                      \
     31    }                                                   \
     32  while (0)
  • gcc-4.8.1/gcc/config/sparc/helenos-sparc64.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/sparc/helenos-sparc64.h gcc-4.8.1/gcc/config/sparc/helenos-sparc64.h
     
     1/* Definitions for HelenOS compiled for sparc64. */
     2
     3#define HELENOS_ARCH_CPP_BUILTINS() \
     4        do { \
     5                builtin_define_with_value("helenos_uarch", "sparc64", 0); \
     6        } while (0)
  • gcc-4.8.1/gcc/config/sparc/helenos64.h

    diff -ud -Nrud gcc-4.8.1/gcc/config/sparc/helenos64.h gcc-4.8.1/gcc/config/sparc/helenos64.h
     
     1/* Definitions for HelenOS compiled for sparc64.
     2 *
     3 * (TARGET_OS_CPP_BUILTINS copied from $GCC_ROOT/gcc/config/sparc/linux64.h)
     4 */
     5
     6#undef TARGET_OS_CPP_BUILTINS
     7#define TARGET_OS_CPP_BUILTINS()                \
     8  do                                            \
     9    {                                           \
     10      GNU_USER_TARGET_OS_CPP_BUILTINS();        \
     11      if (TARGET_ARCH64)                        \
     12        builtin_define ("_LONGLONG");           \
     13      if (TARGET_ARCH32                         \
     14          && TARGET_LONG_DOUBLE_128)            \
     15        builtin_define ("__LONG_DOUBLE_128__"); \
     16      HELENOS_CPP_BUILTINS();                   \
     17      HELENOS_ARCH_CPP_BUILTINS();              \
     18    }                                           \
     19  while (0)
Note: See TracBrowser for help on using the repository browser.