aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1998-07-13 22:38:51 +0000
committerJeff Law <law@gcc.gnu.org>1998-07-13 16:38:51 -0600
commit1228a9bd1efee6b102f64c45ad3e97a3dc630a43 (patch)
tree5bf47887fc7b63496f3d8cf8e0ba4617d488c9f1 /gcc
parent4a8c52e0487bb8afe279f041ac113ed4e2895ddb (diff)
downloadgcc-1228a9bd1efee6b102f64c45ad3e97a3dc630a43.zip
gcc-1228a9bd1efee6b102f64c45ad3e97a3dc630a43.tar.gz
gcc-1228a9bd1efee6b102f64c45ad3e97a3dc630a43.tar.bz2
i386.h (CPP_486_SPEC, [...]): New specs.
* i386/i386.h (CPP_486_SPEC, CPP_586_SPEC, CPP_686_SPEC): New specs. (CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Use them. (EXTRA_SPECS): Support them. * gcc.c: Delete %[spec] support. (do_spec_1, case '('): Likewise. (do_spec_1, case '['): Call error. * i386/aix386ng.h, cygwin32.h, freebsd-elf.h, gas.h, isc.h, linux-aout.h, linux-oldld.h, linux.h, osfelf.h, osfrose.h, sco.h, sco4.h, sco4dbx.h, sco5.h, sol2.h, sysv3.h (CPP_SPEC): Delete %[cpp_cpu]. From-SVN: r21120
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/i386/aix386ng.h2
-rw-r--r--gcc/config/i386/cygwin32.h2
-rw-r--r--gcc/config/i386/freebsd-elf.h2
-rw-r--r--gcc/config/i386/gas.h2
-rw-r--r--gcc/config/i386/i386.h26
-rw-r--r--gcc/config/i386/isc.h6
-rw-r--r--gcc/config/i386/linux-aout.h2
-rw-r--r--gcc/config/i386/linux-oldld.h2
-rw-r--r--gcc/config/i386/linux.h4
-rw-r--r--gcc/config/i386/osfelf.h2
-rw-r--r--gcc/config/i386/osfrose.h2
-rw-r--r--gcc/config/i386/sco.h2
-rw-r--r--gcc/config/i386/sco4.h2
-rw-r--r--gcc/config/i386/sco4dbx.h2
-rw-r--r--gcc/config/i386/sco5.h2
-rw-r--r--gcc/config/i386/sol2.h19
-rw-r--r--gcc/config/i386/sysv3.h2
-rw-r--r--gcc/gcc.c72
19 files changed, 78 insertions, 88 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1a86cbe..ae87f3c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+Mon Jul 13 23:36:08 1998 Jim Wilson <wilson@cygnus.com>
+
+ * i386/i386.h (CPP_486_SPEC, CPP_586_SPEC, CPP_686_SPEC): New specs.
+ (CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Use them.
+ (EXTRA_SPECS): Support them.
+ * gcc.c: Delete %[spec] support.
+ (do_spec_1, case '('): Likewise.
+ (do_spec_1, case '['): Call error.
+ * i386/aix386ng.h, cygwin32.h, freebsd-elf.h, gas.h, isc.h,
+ linux-aout.h, linux-oldld.h, linux.h, osfelf.h, osfrose.h, sco.h,
+ sco4.h, sco4dbx.h, sco5.h, sol2.h, sysv3.h (CPP_SPEC): Delete
+ %[cpp_cpu].
+
Mon Jul 13 23:31:04 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* m68k.c (output_scc_di): Use cmpw #0 only for address registers.
diff --git a/gcc/config/i386/aix386ng.h b/gcc/config/i386/aix386ng.h
index 7ced3cf..a177b69 100644
--- a/gcc/config/i386/aix386ng.h
+++ b/gcc/config/i386/aix386ng.h
@@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dps2 -Dunix -Asystem(aix)"
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
+#define CPP_SPEC "%(cpp_cpu) \
%{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS"
/* special flags for the aix assembler to generate the short form for all
diff --git a/gcc/config/i386/cygwin32.h b/gcc/config/i386/cygwin32.h
index 1849980..db13d3f 100644
--- a/gcc/config/i386/cygwin32.h
+++ b/gcc/config/i386/cygwin32.h
@@ -50,7 +50,7 @@ Boston, MA 02111-1307, USA. */
-Asystem(winnt) -Acpu(i386) -Amachine(i386)"
#undef CPP_SPEC
-#define CPP_SPEC "-remap %(cpp_cpu) %[cpp_cpu] %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
/* We have to dynamic link to get to the system DLLs. All of libc, libm and
the Unix stuff is in cygwin.dll. The import library is called
diff --git a/gcc/config/i386/freebsd-elf.h b/gcc/config/i386/freebsd-elf.h
index bb6e16c..3c1934b 100644
--- a/gcc/config/i386/freebsd-elf.h
+++ b/gcc/config/i386/freebsd-elf.h
@@ -143,7 +143,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
#undef LIB_SPEC
#if 1
diff --git a/gcc/config/i386/gas.h b/gcc/config/i386/gas.h
index 52c5cc4..173bf19 100644
--- a/gcc/config/i386/gas.h
+++ b/gcc/config/i386/gas.h
@@ -57,7 +57,7 @@ Boston, MA 02111-1307, USA. */
/* Specify predefined symbols in preprocessor. */
#define CPP_PREDEFINES "-Dunix"
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
/* Allow #sccs in preprocessor. */
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 87eaf86..a575611 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -304,15 +304,21 @@ extern int ix86_arch;
%{mpentiumpro:-mcpu=pentiumpro}}"
#endif
+#define CPP_486_SPEC "%{!ansi:-Di486} -D__i486 -D__i486__"
+#define CPP_586_SPEC "%{!ansi:-Di586 -Dpentium} \
+ -D__i586 -D__i586__ -D__pentium -D__pentium__"
+#define CPP_686_SPEC "%{!ansi:-Di686 -Dpentiumpro} \
+ -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__"
+
#ifndef CPP_CPU_DEFAULT_SPEC
#if TARGET_CPU_DEFAULT == 1
-#define CPP_CPU_DEFAULT_SPEC "-Di486"
+#define CPP_CPU_DEFAULT_SPEC "%(cpp_486)"
#else
#if TARGET_CPU_DEFAULT == 2
-#define CPP_CPU_DEFAULT_SPEC "-Dpentium -Di586"
+#define CPP_CPU_DEFAULT_SPEC "%(cpp_586)"
#else
#if TARGET_CPU_DEFAULT == 3
-#define CPP_CPU_DEFAULT_SPEC "-Dpentiumpro -Di686"
+#define CPP_CPU_DEFAULT_SPEC "%(cpp_686)"
#else
#define CPP_CPU_DEFAULT_SPEC ""
#endif
@@ -322,11 +328,12 @@ extern int ix86_arch;
#ifndef CPP_CPU_SPEC
#define CPP_CPU_SPEC "\
--Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386) \
-%{mcpu=i486:-Di486} %{m486:-Di486} \
-%{mpentium:-Dpentium -Di586} %{mcpu=pentium:-Dpentium -Di586} \
-%{mpentiumpro:-Dpentiumpro -Di686} %{mcpu=pentiumpro:-Dpentiumpro -Di686} \
-%{!mcpu*:%{!m486:%{!mpentium*: %[cpp_cpu_default]}}}"
+-Asystem(unix) -Acpu(i386) -Amachine(i386) \
+%{!ansi:-Di386} -D__i386 -D__i386__ \
+%{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} \
+%{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} \
+%{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} \
+%{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}"
#endif
#ifndef CC1_SPEC
@@ -348,6 +355,9 @@ extern int ix86_arch;
#endif
#define EXTRA_SPECS \
+ { "cpp_486", CPP_486_SPEC}, \
+ { "cpp_586", CPP_586_SPEC}, \
+ { "cpp_686", CPP_686_SPEC}, \
{ "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \
{ "cpp_cpu", CPP_CPU_SPEC }, \
{ "cc1_cpu", CC1_CPU_SPEC }, \
diff --git a/gcc/config/i386/isc.h b/gcc/config/i386/isc.h
index c0a5150..5c39896 100644
--- a/gcc/config/i386/isc.h
+++ b/gcc/config/i386/isc.h
@@ -19,7 +19,7 @@
#define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} %{Xp:-lcposix} -lc -lg"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}"
/* ISC 2.2 uses `char' for `wchar_t'. */
#undef WCHAR_TYPE
@@ -87,3 +87,7 @@
} \
fputs ("\"\n", FILE); \
} while (0)
+
+/* Work around assembler forward label references generated in exception
+ handling code. */
+#define DWARF2_UNWIND_INFO 0
diff --git a/gcc/config/i386/linux-aout.h b/gcc/config/i386/linux-aout.h
index 98cf55e..de81d87 100644
--- a/gcc/config/i386/linux-aout.h
+++ b/gcc/config/i386/linux-aout.h
@@ -34,7 +34,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dunix -Dlinux -Asystem(posix)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
diff --git a/gcc/config/i386/linux-oldld.h b/gcc/config/i386/linux-oldld.h
index a67fd0f..4e3085b 100644
--- a/gcc/config/i386/linux-oldld.h
+++ b/gcc/config/i386/linux-oldld.h
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dunix -Dlinux -Asystem(posix)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
index ed50b01..373c804 100644
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
@@ -155,9 +155,9 @@ Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
#ifdef USE_GNULIBC_1
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
#else
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+#define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#endif
#undef CC1_SPEC
diff --git a/gcc/config/i386/osfelf.h b/gcc/config/i386/osfelf.h
index 4604a34..381ffc2 100644
--- a/gcc/config/i386/osfelf.h
+++ b/gcc/config/i386/osfelf.h
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem(xpg4)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
+#define CPP_SPEC "%(cpp_cpu) \
%{mrose: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
%{!mrose: -D__ELF__ %{fpic: -D__SHARED__}} \
%{mno-underscores: -D__NO_UNDERSCORES__} \
diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h
index e2e6231..9cfe187 100644
--- a/gcc/config/i386/osfrose.h
+++ b/gcc/config/i386/osfrose.h
@@ -93,7 +93,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem(xpg4)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
+#define CPP_SPEC "%(cpp_cpu) \
%{!melf: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
%{melf: -D__ELF__ %{fpic: -D__SHARED__}} \
%{mno-underscores: -D__NO_UNDERSCORES__} \
diff --git a/gcc/config/i386/sco.h b/gcc/config/i386/sco.h
index 9c94a76..016e0a0 100644
--- a/gcc/config/i386/sco.h
+++ b/gcc/config/i386/sco.h
@@ -58,7 +58,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dunix -DM_UNIX -DM_I386 -DM_COFF -DM_WORDSWAP -Asystem(svr3)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{scointl:-DM_INTERNAT}"
+#define CPP_SPEC "%(cpp_cpu) %{scointl:-DM_INTERNAT}"
/* This spec is used for telling cpp whether char is signed or not. */
diff --git a/gcc/config/i386/sco4.h b/gcc/config/i386/sco4.h
index 1b17d67..5d1ea47 100644
--- a/gcc/config/i386/sco4.h
+++ b/gcc/config/i386/sco4.h
@@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA. */
"-Asystem(svr3)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
+#define CPP_SPEC "%(cpp_cpu) \
-D_i386 -D_M_I386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \
-D_unix -D_M_UNIX -D_M_XENIX \
-D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \
diff --git a/gcc/config/i386/sco4dbx.h b/gcc/config/i386/sco4dbx.h
index 6ff5714..3d075b6 100644
--- a/gcc/config/i386/sco4dbx.h
+++ b/gcc/config/i386/sco4dbx.h
@@ -64,7 +64,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dunix -Asystem(svr3)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
+#define CPP_SPEC "%(cpp_cpu) \
-D_M_I386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \
-D_M_UNIX -D_M_XENIX \
-D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \
diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h
index d656eb9..62156dd 100644
--- a/gcc/config/i386/sco5.h
+++ b/gcc/config/i386/sco5.h
@@ -832,7 +832,7 @@ dtors_section () \
/* You are in a maze of GCC specs ... all alike */
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
+#define CPP_SPEC "%(cpp_cpu) \
%{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \
%{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \
-D__i386 -D__unix -D_SCO_DS=1 -D_M_I386 -D_M_XENIX -D_M_UNIX \
diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h
index 55fe5f7..8fc3e61 100644
--- a/gcc/config/i386/sol2.h
+++ b/gcc/config/i386/sol2.h
@@ -1,5 +1,5 @@
/* Target definitions for GNU compiler for Intel 80386 running Solaris 2
- Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Fred Fish (fnf@cygnus.com).
This file is part of GNU CC.
@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
executed. This macro forces the assembler to do the padding, since
it knows what it is doing. */
-#define FORCE_INIT_SECTION_ALIGN do { asm (ALIGN_ASM_OP ## " 16"); } while (0)
+#define FORCE_INIT_SECTION_ALIGN asm (ALIGN_ASM_OP ## " 16")
#define FORCE_FINI_SECTION_ALIGN FORCE_INIT_SECTION_ALIGN
/* Add "sun" to the list of symbols defined for SVR4. */
@@ -39,7 +39,7 @@ Boston, MA 02111-1307, USA. */
"-Dunix -D__svr4__ -D__SVR4 -Dsun -Asystem(svr4)"
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
+#define CPP_SPEC "%(cpp_cpu) \
%{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
#undef LIB_SPEC
@@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA. */
#define STARTFILE_SPEC "%{!shared: \
%{!symbolic: \
%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
- %{pg:gmon.o%s}%{!pg:crti.o%s} \
+ %{pg:gmon.o%s} crti.o%s \
%{ansi:values-Xc.o%s} \
%{!ansi: \
%{traditional:values-Xt.o%s} \
@@ -72,12 +72,14 @@ Boston, MA 02111-1307, USA. */
%{YP,*} \
%{R*} \
%{compat-bsd: \
- %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
- %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
+ %{!YP,*:%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!pg:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
-R /usr/ucblib} \
%{!compat-bsd: \
- %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
- %{!p:-Y P,/usr/ccs/lib:/usr/lib}}} \
+ %{!YP,*:%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!pg:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}} \
%{Qy:} %{!Qn:-Qy}"
/* This defines which switch letters take arguments.
@@ -90,3 +92,4 @@ Boston, MA 02111-1307, USA. */
|| (CHAR) == 'h' \
|| (CHAR) == 'z')
+#define STDC_0_IN_SYSTEM_HEADERS
diff --git a/gcc/config/i386/sysv3.h b/gcc/config/i386/sysv3.h
index b6a1fcc..ce89889 100644
--- a/gcc/config/i386/sysv3.h
+++ b/gcc/config/i386/sysv3.h
@@ -44,7 +44,7 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES "-Dunix -Asystem(svr3)"
-#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
/* Writing `int' for a bitfield forces int alignment for the structure. */
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 48b94fc..17978f7 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -365,7 +365,6 @@ or with constant text in a single argument.
%{S|P:X} substitutes X if either -S or -P was given to CC. This may be
combined with ! and . as above binding stronger than the OR.
%(Spec) processes a specification defined in a specs file as *Spec:
- %[Spec] as above, but put __ around -D arguments
The conditional text X in a %{S:X} or %{!S:X} construct may contain
other nested % constructs or spaces, or even newlines. They are
@@ -1111,8 +1110,7 @@ skip_whitespace (p)
}
/* Structure to keep track of the specs that have been defined so far.
- These are accessed using %(specname) or %[specname] in a compiler
- or link spec. */
+ These are accessed using %(specname) in a compiler or link spec. */
struct spec_list
{
@@ -3994,11 +3992,8 @@ do_spec_1 (spec, inswitch, soft_matched_part)
/* Process a string found as the value of a spec given by name.
This feature allows individual machine descriptions
- to add and use their own specs.
- %[...] modifies -D options the way %P does;
- %(...) uses the spec unmodified. */
+ to add and use their own specs. */
case '(':
- case '[':
{
char *name = p;
struct spec_list *sl;
@@ -4006,7 +4001,7 @@ do_spec_1 (spec, inswitch, soft_matched_part)
/* The string after the S/P is the name of a spec that is to be
processed. */
- while (*p && *p != ')' && *p != ']')
+ while (*p && *p != ')')
p++;
/* See if it's in the list */
@@ -4015,67 +4010,32 @@ do_spec_1 (spec, inswitch, soft_matched_part)
{
name = *(sl->ptr_spec);
#ifdef DEBUG_SPECS
- fprintf (stderr, "Processing spec %c%s%c, which is '%s'\n",
- c, sl->name, (c == '(') ? ')' : ']', name);
+ fprintf (stderr, "Processing spec %s, which is '%s'\n",
+ sl->name, name);
#endif
break;
}
if (sl)
{
- if (c == '(')
- {
- value = do_spec_1 (name, 0, NULL_PTR);
- if (value != 0)
- return value;
- }
- else
- {
- char *x = (char *) alloca (strlen (name) * 2 + 1);
- char *buf = x;
- char *y = name;
- int flag = 0;
-
- /* Copy all of NAME into BUF, but put __ after
- every -D and at the end of each arg, */
- while (1)
- {
- if (! strncmp (y, "-D", 2))
- {
- *x++ = '-';
- *x++ = 'D';
- *x++ = '_';
- *x++ = '_';
- y += 2;
- flag = 1;
- continue;
- }
- else if (flag && (*y == ' ' || *y == '\t' || *y == '='
- || *y == '}' || *y == 0))
- {
- *x++ = '_';
- *x++ = '_';
- flag = 0;
- }
- if (*y == 0)
- break;
- else
- *x++ = *y++;
- }
- *x = 0;
-
- value = do_spec_1 (buf, 0, NULL_PTR);
- if (value != 0)
- return value;
- }
+ value = do_spec_1 (name, 0, NULL_PTR);
+ if (value != 0)
+ return value;
}
- /* Discard the closing paren or bracket. */
+ /* Discard the closing paren. */
if (*p)
p++;
}
break;
+ /* This used to be like %(, except that it modified -D options
+ the same way as %P. This has been obsoleted, as it was not
+ useful for obtaining correct ISO C semantics for defines. */
+ case '[':
+ error ("use of obsolete %[ operator in specs");
+ return -1;
+
case 'v':
{
int c1 = *p++; /* Select first or second version number. */