This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: OpenBSD configurations for gcc 3.3.x


Marc Espie wrote:-

> + /* TARGET_OS_CPP_BUILTINS() common to all OpenBSD ELF targets.  */
> + #define OPENBSD_OS_CPP_BUILTINS_ELF()		\
> +   do						\
> +     {						\
> +       OPENBSD_OS_CPP_BUILTINS_COMMON();		\
> +       builtin_define ("__ELF__");		\
> +     }						\
> +   while (0)

This is not needed.  Everything that is ELF automatically
defines __ELF__; see config/elfos.h.

> + /* TARGET_OS_CPP_BUILTINS() common to all LP64 OpenBSD targets.  */
> + #define OPENBSD_OS_CPP_BUILTINS_LP64()		\
> +   do						\
> +     {						\
> +       builtin_define ("_LP64");			\
> +       builtin_define ("__LP64__");		\
> +     }						\
> +   while (0)
> + 

The same is true I think of at least one of these.  See
c-cpp-builtins.c.

>   /* Run-time target specifications.  */
> ! #define TARGET_OS_CPP_BUILTINS()			\
> !   do							\
> !     {							\
> !       OPENBSD_OS_CPP_BUILTINS_ELF();			\
> !       builtin_define ("__sparc");			\
> !       builtin_define ("__sparc__");			\
> !     }							\
> !   while (0)

The two sparc defines are unnecessary as they are part of
TARGET_CPU_CPP_BUILTINS in sparc.h.  This may be true of
other similar CPU defns in your patch.

> !     {							\
> !       OPENBSD_OS_CPP_BUILTINS_ELF();			\
> !       OPENBSD_OS_CPP_BUILTINS_LP64();			\
> !       builtin_define ("__sparc64__");			\
> !       builtin_define ("__sparc_v9__");			\
> !       builtin_define ("__sparcv9__");			\
> !       builtin_define ("__arch64__");			\
> !       builtin_define ("__sparc");			\
> !       builtin_define ("__sparc__");			\
> !     }							\
> !   while (0)

Similarly, some of these are not needed.

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]