* defaults.h (TARGET_CPU_CPP_BUILTINS, CPP_PREDEFINES): Remove.
* gcc.c (cpp_predefines): Remove.
(cpp_unique_options, do_spec_1): Remove handling of CPP_PREDEFINES.
(static_specs): Remove predefines.
* system.h: Poison CPP_PREDEFINES.
* config/freebsd.h, config/openbsd.h, config/ptx4.h, config/svr3.h,
config/svr4.h, doc/tm.texi: Remove references to CPP_PREDEFINES.
From-SVN: r66917
+2003-05-17 Neil Booth <neil@daikokuya.co.uk>
+
+ * defaults.h (TARGET_CPU_CPP_BUILTINS, CPP_PREDEFINES): Remove.
+ * gcc.c (cpp_predefines): Remove.
+ (cpp_unique_options, do_spec_1): Remove handling of CPP_PREDEFINES.
+ (static_specs): Remove predefines.
+ * system.h: Poison CPP_PREDEFINES.
+ * config/freebsd.h, config/openbsd.h, config/ptx4.h, config/svr3.h,
+ config/svr4.h, doc/tm.texi: Remove references to CPP_PREDEFINES.
+
2003-05-17 Neil Booth <neil@daikokuya.co.uk>
* config/m68k/hp320.h, config/m68k/linux.h, config/m68k/m68k-none.h,
#undef WORD_SWITCH_TAKES_ARG
#define WORD_SWITCH_TAKES_ARG(STR) (FBSD_WORD_SWITCH_TAKES_ARG(STR))
-#undef CPP_PREDEFINES
-/* Obsolete, do not define it. */
-
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS()
\f
/* Runtime target specification. */
-/* You must redefine CPP_PREDEFINES in any arch specific file. */
-#undef CPP_PREDEFINES
-
/* Implicit calls to library routines. */
/* Use memcpy and memset instead of bcopy and bzero. */
&& strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \
&& strcmp (STR, "Tbss"))
-/* You should redefine CPP_PREDEFINES in any file which includes this one.
- The definition should be appropriate for the type of target system
- involved, and it should include any -A (assertion) options which are
- appropriate for the given target system. */
-#undef CPP_PREDEFINES
-
/* Provide an ASM_SPEC appropriate for svr4. Here we try to support as
many of the specialized svr4 assembler options as seems reasonable,
given that there are certain options which we can't (or shouldn't)
#include "?????.h"
#include "svr3.h"
-
- followed by any really system-specific defines (or overrides of
- defines) which you find that you need. For example, CPP_PREDEFINES
- is defined here with only the defined -Dunix and -DSVR3. You should
- probably override that in your target-specific ?????svr3.h file
- with a set of defines that includes these, but also contains an
- appropriate define for the type of hardware that you are targeting.
*/
/* Define a symbol indicating that we are using svr3.h. */
environment and assembler syntax we are targeting for. */
#define SVR3_target
-/* Cpp, assembler, linker, library, and startfile spec's. */
-
-/* You should redefine CPP_PREDEFINES in any file which includes this one.
- The definition should be appropriate for the type of target system
- involved, and it should include any -A (assertion) options which are
- appropriate for the given target system. */
-
-#undef CPP_PREDEFINES
+/* Assembler, linker, library, and startfile spec's. */
/* Output at beginning of assembler file. */
/* The .file command should always begin the output. */
where MACHINE is replaced by the name of the basic hardware that you
are targeting for. Then, in the file MACHINE/svr4.h, put any really
system-specific defines (or overrides of defines) which you find that
- you need. For example, CPP_PREDEFINES is defined here with only the
- defined -Dunix and -DSVR4. You should probably override that in your
- target-specific MACHINE/svr4.h file with a set of defines that
- includes these, but also contains an appropriate define for the type
- of hardware that you are targeting.
+ you need.
*/
/* Define a symbol indicating that we are using svr4.h. */
&& strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \
&& strcmp (STR, "Tbss"))
-/* You should redefine CPP_PREDEFINES in any file which includes this one.
- The definition should be appropriate for the type of target system
- involved, and it should include any -A (assertion) options which are
- appropriate for the given target system. */
-#undef CPP_PREDEFINES
-
/* Provide an ASM_SPEC appropriate for svr4. Here we try to support as
many of the specialized svr4 assembler options as seems reasonable,
given that there are certain options which we can't (or shouldn't)
# define TARGET_ESC 033
#endif
-/* When removal of CPP_PREDEFINES is complete, TARGET_CPU_CPP_BULITINS
- can also be removed from here. */
#ifndef TARGET_OS_CPP_BUILTINS
# define TARGET_OS_CPP_BUILTINS()
#endif
-#ifndef TARGET_CPU_CPP_BUILTINS
-# define TARGET_CPU_CPP_BUILTINS()
-#endif
-#ifndef CPP_PREDEFINES
-# define CPP_PREDEFINES ""
-#endif
/* Store in OUTPUT a string (made with alloca) containing an
assembler-name for a local static variable or function named NAME.
@code{preprocessing_trad_p()} can be used to check for traditional
preprocessing.
-With @code{TARGET_OS_CPP_BUILTINS} this macro obsoletes the
-@code{CPP_PREDEFINES} target macro.
-
@findex TARGET_OS_CPP_BUILTINS
@item TARGET_OS_CPP_BUILTINS()
Similarly to @code{TARGET_CPU_CPP_BUILTINS} but this macro is optional
and is used for the target operating system instead.
-With @code{TARGET_CPU_CPP_BUILTINS} this macro obsoletes the
-@code{CPP_PREDEFINES} target macro.
-
-@findex CPP_PREDEFINES
-@item CPP_PREDEFINES
-Define this to be a string constant containing @option{-D} options to
-define the predefined macros that identify this machine and system.
-These macros will be predefined unless the @option{-ansi} option (or a
-@option{-std} option for strict ISO C conformance) is specified.
-
-In addition, a parallel set of macros are predefined, whose names are
-made by appending @samp{__} at the beginning and at the end. These
-@samp{__} macros are permitted by the ISO standard, so they are
-predefined regardless of whether @option{-ansi} or a @option{-std} option
-is specified.
-
-For example, on the Sun, one can use the following value:
-
-@smallexample
-"-Dmc68000 -Dsun -Dunix"
-@end smallexample
-
-The result is to define the macros @code{__mc68000__}, @code{__sun__}
-and @code{__unix__} unconditionally, and the macros @code{mc68000},
-@code{sun} and @code{unix} provided @option{-ansi} is not specified.
-
@findex extern int target_flags
@item extern int target_flags;
This declaration should be present.
except that %g, %u, and %U do not currently support additional
SUFFIX characters following %O as they would following, for
example, `.o'.
- %p substitutes the standard macro predefinitions for the
- current target machine. Use this when running cpp.
- %P like %p, but puts `__' before and after the name of each macro.
- (Except macros that already have __.)
- This is for ANSI C.
%I Substitute any of -iprefix (made from GCC_EXEC_PREFIX), -isysroot
(made from TARGET_SYSTEM_ROOT), and -isystem (made from COMPILER_PATH
and -B options) as necessary.
static const char *asm_debug;
static const char *cpp_spec = CPP_SPEC;
-static const char *cpp_predefines = CPP_PREDEFINES;
static const char *cc1_spec = CC1_SPEC;
static const char *cc1plus_spec = CC1PLUS_SPEC;
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
%{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\
%{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
%{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\
- %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
- %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\
+ %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\
%{E|M|MM:%W{o*}}";
/* This contains cpp options which are common with cc1_options and are passed
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
INIT_STATIC_SPEC ("startfile", &startfile_spec),
INIT_STATIC_SPEC ("switches_need_spaces", &switches_need_spaces),
- INIT_STATIC_SPEC ("predefines", &cpp_predefines),
INIT_STATIC_SPEC ("cross_compile", &cross_compile),
INIT_STATIC_SPEC ("version", &compiler_version),
INIT_STATIC_SPEC ("multilib", &multilib_select),
}
break;
- case 'p':
- {
- char *x = (char *) alloca (strlen (cpp_predefines) + 1);
- char *buf = x;
- const char *y;
-
- /* Copy all of the -D options in CPP_PREDEFINES into BUF. */
- y = cpp_predefines;
- while (*y != 0)
- {
- if (! strncmp (y, "-D", 2))
- /* Copy the whole option. */
- while (*y && *y != ' ' && *y != '\t')
- *x++ = *y++;
- else if (*y == ' ' || *y == '\t')
- /* Copy whitespace to the result. */
- *x++ = *y++;
- /* Don't copy other options. */
- else
- y++;
- }
-
- *x = 0;
-
- value = do_spec_1 (buf, 0, NULL);
- if (value != 0)
- return value;
- }
- break;
-
- case 'P':
- {
- char *x = (char *) alloca (strlen (cpp_predefines) * 4 + 1);
- char *buf = x;
- const char *y;
-
- /* Copy all of CPP_PREDEFINES into BUF,
- but force them all into the reserved name space if they
- aren't already there. The reserved name space is all
- identifiers beginning with two underscores or with one
- underscore and a capital letter. We do the forcing by
- adding up to two underscores to the beginning and end
- of each symbol. e.g. mips, _mips, mips_, and _mips_ all
- become __mips__. */
- y = cpp_predefines;
- while (*y != 0)
- {
- if (! strncmp (y, "-D", 2))
- {
- int flag = 0;
-
- *x++ = *y++;
- *x++ = *y++;
-
- if (*y != '_'
- || (*(y + 1) != '_'
- && ! ISUPPER ((unsigned char) *(y + 1))))
- {
- /* Stick __ at front of macro name. */
- if (*y != '_')
- *x++ = '_';
- *x++ = '_';
- /* Arrange to stick __ at the end as well. */
- flag = 1;
- }
-
- /* Copy the macro name. */
- while (*y && *y != '=' && *y != ' ' && *y != '\t')
- *x++ = *y++;
-
- if (flag)
- {
- if (x[-1] != '_')
- {
- if (x[-2] != '_')
- *x++ = '_';
- *x++ = '_';
- }
- }
-
- /* Copy the value given, if any. */
- while (*y && *y != ' ' && *y != '\t')
- *x++ = *y++;
- }
- else if (*y == ' ' || *y == '\t')
- /* Copy whitespace to the result. */
- *x++ = *y++;
- /* Don't copy -A options */
- else
- y++;
- }
- *x++ = ' ';
-
- /* Copy all of CPP_PREDEFINES into BUF,
- but put __ after every -D. */
- y = cpp_predefines;
- while (*y != 0)
- {
- if (! strncmp (y, "-D", 2))
- {
- y += 2;
-
- if (*y != '_'
- || (*(y + 1) != '_'
- && ! ISUPPER ((unsigned char) *(y + 1))))
- {
- /* Stick -D__ at front of macro name. */
- *x++ = '-';
- *x++ = 'D';
- if (*y != '_')
- *x++ = '_';
- *x++ = '_';
-
- /* Copy the macro name. */
- while (*y && *y != '=' && *y != ' ' && *y != '\t')
- *x++ = *y++;
-
- /* Copy the value given, if any. */
- while (*y && *y != ' ' && *y != '\t')
- *x++ = *y++;
- }
- else
- {
- /* Do not copy this macro - we have just done it before */
- while (*y && *y != ' ' && *y != '\t')
- y++;
- }
- }
- else if (*y == ' ' || *y == '\t')
- /* Copy whitespace to the result. */
- *x++ = *y++;
- /* Don't copy -A options. */
- else
- y++;
- }
- *x++ = ' ';
-
- /* Copy all of the -A options in CPP_PREDEFINES into BUF. */
- y = cpp_predefines;
- while (*y != 0)
- {
- if (! strncmp (y, "-A", 2))
- /* Copy the whole option. */
- while (*y && *y != ' ' && *y != '\t')
- *x++ = *y++;
- else if (*y == ' ' || *y == '\t')
- /* Copy whitespace to the result. */
- *x++ = *y++;
- /* Don't copy other options. */
- else
- y++;
- }
-
- *x = 0;
-
- value = do_spec_1 (buf, 0, NULL);
- if (value != 0)
- return value;
- }
- break;
-
case 'R':
/* We assume there is a directory
separator at the end of this string. */
/* Other obsolete target macros, or macros that used to be in target
headers and were not used, and may be obsolete or may never have
been used. */
- #pragma GCC poison INT_ASM_OP ASM_OUTPUT_EH_REGION_BEG \
+ #pragma GCC poison INT_ASM_OP ASM_OUTPUT_EH_REGION_BEG CPP_PREDEFINES \
ASM_OUTPUT_EH_REGION_END ASM_OUTPUT_LABELREF_AS_INT \
DOESNT_NEED_UNWINDER EH_TABLE_LOOKUP OBJC_SELECTORS_WITHOUT_LABELS \
OMIT_EH_TABLE EASY_DIV_EXPR IMPLICIT_FIX_EXPR \