Commit Graph

721 Commits

Author SHA1 Message Date
Richard Kenner
5bb67e36f6 Check for and read ${libdir}/gcc-lib/specs to override the default specs.
From-SVN: r14278
1997-06-21 06:29:14 -04:00
Michael Meissner
20df0482b5 Add %include, %include_noerr, %rename support to specs
From-SVN: r13803
1997-03-25 22:03:18 +00:00
Jim Wilson
03fc162077 (init_spec): Delete parameter. Always initialize extra_specs.
(process_command, main): Change all callers.

From-SVN: r13737
1997-03-18 13:19:22 -08:00
Richard Kenner
a34259fc5b (set_spec): Fix comment-in-comment typo.
From-SVN: r13643
1997-02-15 18:26:43 -05:00
Richard Kenner
eb2be0e656 (process_command): Allocate space for terminating null.
From-SVN: r13641
1997-02-15 17:25:35 -05:00
Richard Kenner
853f1cc30f (process_command): Fix improper use of strncpy.
From-SVN: r13574
1997-02-01 18:53:54 -05:00
Michael Meissner
fcc9ad83f6 Fix typo.
From-SVN: r13504
1997-01-16 23:59:37 +00:00
Michael Meissner
79aff5ac0d Cleanup specs support
From-SVN: r13502
1997-01-16 22:15:53 +00:00
Richard Kenner
9f3c45fd62 (handle_braces): Rework last change.
From-SVN: r13241
1996-12-07 18:29:21 -05:00
Richard Kenner
1ba9a4871f (give_switch): Add new arg, INCLUDE_BLANKS.
(handle_braces): All callers changed.
Add support for new construct: %{S*^}.

From-SVN: r13223
1996-12-07 17:26:06 -05:00
Brendan Kehoe
610c62ac70 Makefile.in (DRIVER_DEFINES): New macro, with the macro definitions for the driver.
* Makefile.in (DRIVER_DEFINES): New macro, with the macro
        definitions for the driver.
        (gcc.o): Make rule use $(DRIVER_DEFINES).
        * gcc.c (process_command) [LANG_SPECIFIC_DRIVER]: Call
        lang_specific_driver, passing along the addr of FATAL for errors
        along with our ARGC and ARGV.

From-SVN: r13222
1996-12-07 11:53:42 -05:00
Richard Kenner
5a570aded7 (exit): If VMS, define as __posix_exit.
(option_map): Add define-macro and undefine-macro.

From-SVN: r13150
1996-11-12 18:24:31 -05:00
Michael Meissner
d9ac3a0784 Add -specs support
From-SVN: r13075
1996-10-29 21:21:57 +00:00
Richard Kenner
d348bc3450 (default_compilers): -ansi no longer implies -$ to cpp.
From-SVN: r12926
1996-10-09 16:18:50 -04:00
Jim Wilson
71591a1d69 (used_arg): When call xmalloc for mswitches, pass 1 if
n_switches is zero.

From-SVN: r12885
1996-10-01 11:18:44 -07:00
Stan Cox
51c0d897d4 (do_spec_1): Allow -A in %[Spec].
From-SVN: r12852
1996-09-27 16:54:10 +00:00
Richard Kenner
1a0bdd2991 (used_arg): Fix multilib_matches parsing to not corrupt entry parameter.
From-SVN: r12834
1996-09-24 08:28:52 -04:00
Jim Wilson
1bdf86c3ba (link_command_spec): Move -T options to end of link command
line.

From-SVN: r12728
1996-09-16 19:37:51 -07:00
Richard Kenner
e0040a8ede (convert_filename): Don't start looking for '.' until after last
directory separator.

From-SVN: r12724
1996-09-14 20:55:05 -04:00
Richard Kenner
853e0b2def (HAVE_EXECUTABLE_SUFFIX): New macro.
(convert_filename): New function.
(process_command, case 'o'): Call it.
(process_command, default case): Likewise; delete old code.

From-SVN: r12713
1996-09-14 20:40:31 -04:00
Doug Evans
b8a8c83b10 gcc.c: Change ifndef _WIN32 to ifndef NO_SYS_FILE_H when...
* gcc.c: Change ifndef _WIN32 to ifndef NO_SYS_FILE_H when deciding
	whether to include sys/file.h.
	(execute): -pipe is supported for cygwin32.

From-SVN: r12652
1996-08-18 01:32:53 +00:00
Michael Meissner
f7fba6aa12 mp/load version # in specs file so __GNUC_MINOR__ will be correct
From-SVN: r12635
1996-08-13 22:21:04 +00:00
Michael Meissner
c8c2dcdce1 Fix typo
From-SVN: r12629
1996-08-12 22:15:13 +00:00
Michael Meissner
961b7009ee Speed up genmultilib; Add MULTIB_EXTRA_OPTS
From-SVN: r12623
1996-08-12 16:36:42 +00:00
Richard Kenner
c26383a78b (default_compilers): Extra Fortran extensions.
From-SVN: r12513
1996-07-18 17:45:48 -04:00
Mike Stump
0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Richard Kenner
4689ad58a1 (default_compilers): Add null entries for languages we heard of.
(main): If found one of those entries, say compiler not installed.

From-SVN: r12388
1996-07-03 17:09:09 -04:00
Doug Evans
1c87477348 gcc.c (PEXECUTE_VERBOSE): Define.
* gcc.c (PEXECUTE_VERBOSE): Define.
(execute): Pass PEXECUTE_VERBOSE to pexecute if -v.

From-SVN: r12332
1996-06-26 02:35:26 +00:00
Doug Evans
fe628d0932 * gcc.c (pfatal_pexecute): Delete code to check errno < sys_nerr.
From-SVN: r12281
1996-06-13 14:45:59 +00:00
Doug Evans
c10d53dd60 gcc.c (_WIN32): Don't include process.h or declare spawnv{,p}.
* gcc.c (_WIN32): Don't include process.h or declare spawnv{,p}.
	(pexecute,pwait): Add prototypes.
	(PEXECUTE_{FIRST,LAST,SEARCH}): Define.
	(execv,execvp): Delete decls.
	(perror_exec): Delete.
	(pfatal_pexecute): New function.
	(pexecute support): Delete.
	(execute): -pipe not supported if _WIN32 or OS2.
	Update call to pexecute.  Fatal error if pexecute fails.  Call pwait.

From-SVN: r12269
1996-06-10 20:02:26 +00:00
Doug Evans
fd5e7009f6 gcc.c (do_spec_1): Allow leading text in version string.
* gcc.c (do_spec_1): Allow leading text in version string.
	Delete support for default minor number = 0.

From-SVN: r12264
1996-06-10 18:53:21 +00:00
Jim Wilson
ffd8633682 (MULTILIB_SELECT): Delete definition.
(multilib_select): Delete static initializer.
(multilib_obstack, multilib_raw): New global variables.
(multilib.h): Include inside multilib_raw definition.
(main): Set multilib_select from multilib_raw.

From-SVN: r12239
1996-06-07 19:44:31 -07:00
Doug Evans
2ff43a3340 (MSDOS pexecute): Call xmalloc, not malloc.
From-SVN: r12119
1996-05-27 00:05:23 +00:00
Doug Evans
6aa62cff4e gcc.c: #include "gansidecl.h".
* gcc.c: #include "gansidecl.h".
	(PROTO,VPROTO,PVPROTO,VPROTO,VA_START,NULL): Delete.
	(GENERIC_PTR,NULL_PTR,P_tmpdir): Delete.
	(choose_temp_base): Declare as extern, delete internal copy.
	(concat): Rewrite to take a variable number of arguments.
	(choose_temp_base_try,concat[346]): Delete.
	(translate_options,set_spec,process_command,do_spec_1,
	is_directory,main): Always use concat, not concat[346].  Pass
	NULL_PTR as trailing arg to concat.

From-SVN: r11794
1996-04-15 17:59:56 +00:00
Richard Kenner
bb9da76848 (process_command): Instead of hardcoding non-empty switches_need_spaces to turn on "o" and "L"...
(process_command): Instead of hardcoding non-empty
switches_need_spaces to turn on "o" and "L", make the string contain
the switches that need the spaces.

From-SVN: r11609
1996-03-24 07:28:21 -05:00
Richard Kenner
815cf875cb (DEFAULT_SWITCH_TAKES_ARG): New macro, from SWITCH_TAKES_ARG.
(SWITCH_TAKES_ARG): Use it.

From-SVN: r11265
1996-02-13 17:55:17 -05:00
Richard Kenner
b27804a876 (warn_std_ptr): Initialize with 0 instead of NULL_PTR.
From-SVN: r11128
1996-01-31 07:15:10 -05:00
Michael Meissner
841faeeddd EXTRA_SPECS addition
From-SVN: r11063
1996-01-18 15:19:51 +00:00
Doug Evans
3a26543176 gcc.c (process_command): New local lang_n_files, and use it in test of -c with -o.
* gcc.c (process_command): New local lang_n_files, and use
	it in test of -c with -o.  Move test of -save-temps.
	Test for trailing NUL in -c.

From-SVN: r11038
1996-01-17 14:51:41 +00:00
Doug Evans
ed846da308 (do_spec_1, case 'W'): Rename local index' to cur_index' to avoid warning
on solaris.

From-SVN: r11030
1996-01-16 17:18:36 +00:00
Richard Kenner
5fc08cad60 (process_commands): Remove inadvertant fallthrough.
From-SVN: r11004
1996-01-15 20:36:45 -05:00
Richard Kenner
47288231ca (struct compilers): Add -ax option.
From-SVN: r10847
1995-12-24 17:40:40 -05:00
Richard Kenner
5d7bb90c0f (unused_prefix_warning): Include machine_suffix if require_machine_suffix.
(warn_B, warn_std, warn_std_ptr): New variables.
(process_commands): Use them and NULL_PTR as WARN arg to add_prefix.

From-SVN: r10846
1995-12-24 08:43:10 -05:00
Richard Kenner
f2cf3e1ed9 (process_command): Give error for -c with -o and multiple compilations.
(handle_braces): Rename variable "pipe" to "pipe_p".

From-SVN: r10845
1995-12-24 08:08:29 -05:00
Richard Kenner
c6b51be9d2 (my_strerror): Return "cannot access" if errno is 0.
(perror_with_name, pfatal_with_name, perror_exec): Don't assume that
the returned value from my_strerror contains no '%'s.
(sys_nerr): Declare only if HAVE_STRERROR is not defined.

From-SVN: r10714
1995-12-13 19:12:10 -05:00
Jason Merrill
bacebbcf51 (LIBGCC_SPEC): Do link with libgcc when -shared.
From-SVN: r10677
1995-12-05 03:26:37 +00:00
Doug Evans
164c4c918a (do_spec_1): Fix typos in version calculation.
From-SVN: r10634
1995-11-29 23:17:30 +00:00
Richard Kenner
aa76a77e6c Remove fix_argv kludge.
From-SVN: r10340
1995-09-12 18:30:06 -04:00
Richard Kenner
2b16a9d39d (main): When concat gcc_exec_prefix and standard_startfile_prefix, put
machine_suffix in the middle.

From-SVN: r10227
1995-08-13 21:29:58 -04:00
Richard Kenner
03c424843c (MULTILIB_DIRS): Provide default if not defined.
(multilib_defaults): New static variable.
(default_arg): New static function.
(set_multilib_dir): Ignore default arguments.
(print_multilib_info): Ignore entries which use default arguments.

From-SVN: r10155
1995-07-26 07:58:10 -04:00
Richard Kenner
3d13060543 (default_compilers, cpp): Specify -lang-c89 if -ansi is given.
This turns off C++ comment recognition.

From-SVN: r10149
1995-07-18 19:23:30 -04:00
Richard Kenner
dc28c6c62b (p{fatal,error}_with_name, perror_exec): Quote filename.
From-SVN: r10108
1995-07-10 18:20:39 -04:00
Richard Kenner
a35311b035 Update FSF address.
From-SVN: r9961
1995-06-15 07:52:21 -04:00
Doug Evans
7f9cce93f3 (link_command_spec): Undo patch of May 11.
-nostdlib implies -nostartfiles again.
New argument -nodefaultlibs.

From-SVN: r9932
1995-06-12 19:01:48 +00:00
Richard Kenner
2e21df5a7f (do_spec_1, case 'g'): Handle %O as suffix if MKTEMP_EACH_FILE.
From-SVN: r9892
1995-06-06 17:57:34 -04:00
Doug Evans
5e1d9b962e (link_command_spec): Move ENDFILE_SPEC from -nostdlib to -nostartfiles.
From-SVN: r9790
1995-05-23 23:54:00 +00:00
Richard Kenner
f70165f69f (HAVE_OBJECT_SUFFIX): New macro.
(process_command): Convert x.o to x.foo for OBJECT_SUFFIX of ".foo".
(do_spec_1): Avoid shadow variable "i" and always use for loop var.

From-SVN: r9766
1995-05-22 17:10:06 -04:00
Richard Kenner
e9990579f1 (fix_argv): Removed call to free.
Changed WINNT to _WIN32.

From-SVN: r9731
1995-05-16 18:35:31 -04:00
Richard Kenner
1346ae41e6 (default_compilers): Remove entries for Ada, C++, Chill, and Fortran;
#include specs.h instead.

From-SVN: r9681
1995-05-14 10:37:53 -04:00
Doug Evans
7e2b9499e2 (link_command_spec): Make -nostdlib no longer imply -nostartfiles.
From-SVN: r9630
1995-05-12 01:06:03 +00:00
Jim Wilson
8faf4a6843 (main): Pass INIT_ENVIRONMENT to putenv.
From-SVN: r9455
1995-04-25 15:39:42 -07:00
Richard Kenner
ba78c9ff87 (default_compilers): Pass -I to gnat1.
From-SVN: r9429
1995-04-21 08:23:45 -04:00
Richard Kenner
adcb8d7d82 (OBJECT_SUFFIX): Default now ".o", not "o".
(all specs): Remove "." before %O; use %O in a few missing cases.

From-SVN: r9325
1995-04-07 08:09:21 -04:00
Richard Kenner
0b1dbf9e61 (default_compilers): Pass -W and -w to gnat1.
From-SVN: r9294
1995-04-02 08:11:46 -04:00
Richard Kenner
665bf3512b (print_multilib_info): Don't use LAST_PATH if not set.
From-SVN: r9281
1995-04-01 08:25:16 -05:00
Jim Wilson
e8601ecbcb (process_command): Delete code modifying gcc_exec_prefix.
(main): Put it here after last use of gcc_exec_prefix.  For cross
compiler, set startfile_prefixes if gcc_exec_prefix is set and
standard_startfile_prefix is a relative path.

From-SVN: r9253
1995-03-29 15:10:28 -08:00
Richard Kenner
b6da85666d Removed __NetBSD__ from conditional.
Declare strerror if HAVE_STRERROR is defined; otherwise declare sys_errlist
and sys_nerr.
(my_strerror): New function.

From-SVN: r9233
1995-03-27 07:15:55 -05:00
Jason Merrill
0600f3fab5 Move SunOS 4 assembler flags from default_compilers into ASM_SPEC.
From-SVN: r9197
1995-03-16 23:18:10 +00:00
Doug Evans
2628b9d33d (print_search_dirs): New variable.
(build_search_list): New function.
(putenv_from_prefixes): Call it.
(option_map): New option --print-search-dirs.
(process_command): Handle it.
(main): Print installation directory and exec/startfile_prefixes if
--print-search-dirs given.

From-SVN: r9085
1995-02-25 15:16:38 +00:00
Richard Kenner
34dd383844 (SWITCH_TAKES_ARG): Add `x'.
(process_command): -Wl, -Xlinker, and -lm values always go to linker
even if -x was specified.

From-SVN: r9035
1995-02-22 17:37:01 -05:00
Richard Kenner
278479ede5 (default_compilers): Remove rule for ".ada".
Pass .ads or .adb suffix to -dumpbase, depending on input filename.

From-SVN: r9025
1995-02-21 19:25:17 -05:00
Richard Kenner
6ce3c2a19a (fix_argv): Rewrite.
From-SVN: r9013
1995-02-21 18:52:14 -05:00
Richard Kenner
56070e5503 (read_specs): Use length read when inserting zero.
From-SVN: r8979
1995-02-21 06:16:06 -05:00
Richard Kenner
ae618a2808 (default_compilers): Add entries for .f and .F.
From-SVN: r8977
1995-02-21 05:57:30 -05:00
Richard Kenner
29a94cd51e Update comment.
From-SVN: r8909
1995-02-11 16:10:52 -05:00
Richard Kenner
ed7dae049f (specs): Use %O instead of "o" for object file suffix.
(do_spec_1, case 'O'): New option.

From-SVN: r8908
1995-02-11 16:08:02 -05:00
Richard Kenner
34cd1bd74c (execute): Don't wait for just any N subprocesses...
(execute): Don't wait for just any N subprocesses, since we may have
started with some subprocesses before we started executing.  Wait just
for _our_ N subprocesses.

From-SVN: r8746
1995-01-13 19:37:56 -05:00
Jim Wilson
0d6fc1be02 (print_multilib_info): Initialize last_path_len to 0.
From-SVN: r8706
1994-12-29 11:16:48 -08:00
Per Bothner
13bdb4e26a * gcc.c (default_compilers): Add support for Chill (.ch and .chi).
From-SVN: r8637
1994-12-09 15:10:41 -08:00
Jason Merrill
68d69835ac Shared library support.
From-SVN: r8519
1994-11-19 04:09:58 +00:00
Richard Kenner
9c4faac1d5 (main): For -V output, give both driver and compiler versions, if they
differ.

From-SVN: r8472
1994-11-16 16:40:04 -05:00
Richard Kenner
9200adce70 (process_command): Ignore LIBRARY_PATH and LPATH if cross-compiler.
From-SVN: r8396
1994-11-07 11:02:15 -05:00
Torbjorn Granlund
9b226f9093 (process_command): Don't forget to split -Wl arguments at commas.
From-SVN: r8350
1994-10-27 22:50:06 +00:00
Torbjorn Granlund
368dfd3a5b (process_command): Handle -Wl, and -Xlinker similar to -l,
i.e., preserve their order with respect to linker input files.

From-SVN: r8349
1994-10-27 18:04:25 +00:00
Jason Merrill
d1e04478b0 (STARTFILE_SPEC): Wrap startfiles in %{!shared:}.
From-SVN: r8325
1994-10-20 20:53:07 +00:00
Jason Merrill
bccef0116a (default_compilers): Treat files with an extension of .c++
as C++ code.

From-SVN: r8297
1994-10-18 00:33:02 +00:00
Michael Bushnell
f4d21c5c16 Define O_RDONLY if not already defined and use it in read_specs's call
to open.

From-SVN: r8217
1994-10-05 01:52:40 +00:00
Ian Lance Taylor
0b90f9c2dc If the POSIX.1 wait macros are defined, use them.
From-SVN: r8213
1994-10-04 20:53:02 +00:00
Richard Kenner
b5eda7762d Install omitted hunk from last diff.
From-SVN: r8190
1994-10-01 06:44:43 -04:00
Doug Evans
78b4f18284 (process_command): Fix typo.
From-SVN: r8189
1994-10-01 03:57:21 +00:00
Richard Kenner
48ff801bda Don't include sys/file.h for winnt; use process.h instead.
(concat): Now just concats two things; all callers changed.
(concat[346]): New functions.
(dir_separator_str): New variable.
(exec_prefixes, startfile_prefixes, include_prefixes): Renamed from same names
without plural; all users changed.
(find_a_file, process_command, do_spec_1): Use DIR_SEPARATOR.
(find_file, is_directory, main): Likewise.
(lookup_compiler): If OS/2, do case-independent search.
(fix_argv): New function on winnt.
(FIX_ARGV): New macro for some systems; use instead of argv.

From-SVN: r8184
1994-09-30 17:31:09 -04:00
Jim Wilson
57cb9b6087 (default_compilers): Add %Z to all cpp specs.
(n_preprocessor_options, preprocessor_options): New variables.
(process_command): Handle -Wp option.
(do_spec_1): Handle %Z spec.

From-SVN: r8175
1994-09-29 17:13:09 -07:00
Richard Kenner
92bd6bdc13 (struct option_map): Sort in alphabetical order.
(translate_options): Ignore option once an error occurs.
Fix error with reversed 'a' and 'o'.
Give error if specified abbreviation is unambiguous.

From-SVN: r8165
1994-09-29 18:24:38 -04:00
Richard Kenner
9b783fc953 (process_command): Add new switch, -dumpmachine.
From-SVN: r8102
1994-09-20 17:49:35 -04:00
Richard Kenner
2c793b3251 Rework last change so it's done like collect2.c.
From-SVN: r8090
1994-09-15 15:38:29 -04:00
Michael Bushnell
0212779cc8 Include <sys/errno.h> in case `errno' is a macro defined there.
From-SVN: r8082
1994-09-14 14:19:02 +00:00
Michael Meissner
c2fdae8ecd DJ patches for MSDOS
From-SVN: r7792
1994-07-22 13:55:40 +00:00
Jim Wilson
e21c472a1f (process_command): When have -BstageN option, pass include
not stageN/../include to preprocessor.

From-SVN: r7779
1994-07-18 19:05:10 -07:00
Charles Hannum
842a1144f2 Do the 4.4BSD sys_errlist modification for NetBSD also.
From-SVN: r7707
1994-07-11 19:03:10 +00:00
Jim Wilson
62a66e0735 (DEFAULT_WORD_SWITCH_TAKES_ARG): Add -isystem.
From-SVN: r7641
1994-07-02 15:52:50 -07:00
Richard Kenner
353646926a (do_spec_1, case 'P'): Don't add underscores to macros starting with
'_[A-Z]'.

From-SVN: r7626
1994-06-30 18:21:18 -04:00
Doug Evans
60103a3482 gcc.c: Include multilib.h.
* gcc.c: Include multilib.h.
	(print_multi_lib, print_multi_directory, multilib_select,
	multilib_dir): New static variables.
	(option_map): Added --print-multi-lib and --print-multi-directory.
	(set_spec): Get multilib_select from specs file.
	(process_command): Dump multilib_select into specs file.  Handle
	-print-multi-lib and -print-multi-directory.
	(do_spec_1): Try multilib_dir for %D case.
	(find_file): Try multilib_dir.
	(main): Call set_multilib_dir.  Handle print_multi_lib and
	print_multi_directory.
	(used_arg, set_multilib_dir, print_multilib_info): New functions.

From-SVN: r7491
1994-06-15 08:04:07 +00:00
Richard Kenner
4c9a05bc55 Cast pointer operands to bzero, bcopy, and bcmp to (char *).
From-SVN: r7472
1994-06-14 18:19:28 -04:00
Richard Kenner
460dcab481 (find_a_file): Try EXECUTABLE_SUFFIX first, then file without the
suffix.

From-SVN: r7459
1994-06-14 17:34:01 -04:00
Doug Evans
256a105a30 (default_compilers): Pass -MG to cpp if present.
(option_map): New option --print-missing-file-dependencies/-MG.

From-SVN: r7392
1994-05-30 17:58:54 +00:00
Doug Evans
d7715b7064 (process_command): Kludge in stageN/../include instead of include.
From-SVN: r7270
1994-05-10 21:49:41 +00:00
Richard Kenner
d5ea2ac4c7 (delete_if_ordinary): New function.
(delete_temp_files, delete_failure_queue): Call it.

From-SVN: r7267
1994-05-09 18:32:57 -04:00
Stan Shebs
3061ec2bdb *** empty log message ***
From-SVN: r7218
1994-05-06 01:00:48 +00:00
Jim Wilson
e184d694d8 (translate_options): For options that take an argument,
don't skip the argument if it doesn't exist.

From-SVN: r7190
1994-05-02 13:53:21 -07:00
Richard Kenner
75b1162915 (link_command_spec): Add -Z argument for ZMAGIC's on FreeBSD.
From-SVN: r7154
1994-04-25 14:23:10 -04:00
Richard Kenner
6c396fb5dc (handle_braces, check_live_switch): Refine previous change.
From-SVN: r7139
1994-04-22 15:02:13 -04:00
Richard Kenner
ac4cf5d96f (default_compilers): If -E and the file is (e.g.) x.s, don't run the
assembler; similarly for .i, .ii, .adb, etc.

From-SVN: r7129
1994-04-21 17:23:49 -04:00
Richard Kenner
6a9e290eec Add new options -print-file-name= and -print-prog-name=.
From-SVN: r7079
1994-04-19 17:57:14 -04:00
Richard Kenner
f5b0eb4e88 (struct switchstr): New field LIVE_COND.
(process_command): Initialize it.
(check_live_switch): New function.
(handle_braces): Call it.

From-SVN: r7078
1994-04-19 17:48:23 -04:00
Doug Evans
a78a8d589e (process_command): Minor white space cleanups to last patch.
From-SVN: r6969
1994-04-06 00:07:56 +00:00
Doug Evans
ea694f2d44 (process_command): Add "include" prefix for [blah/]stageN.
From-SVN: r6968
1994-04-06 00:04:56 +00:00
Jim Wilson
f62a12d07d Change "gstdarg.h" to <stdarg.h> and "gvarargs.h" to <varargs.h>.
From-SVN: r6942
1994-03-31 21:25:31 -08:00
Richard Kenner
6b0639bc6c (process_command, case 'B'): If name is "stageN/", add "include" to
system include prefix.

From-SVN: r6924
1994-03-30 17:21:05 -05:00
Jim Wilson
2d879387e2 (include_prefix): New variable.
(process_command): Add path/include to include_prefix when see a
-Bpath option.
(do_spec_1, case 'I'): Pass include_prefix directories to cpp with
the -isystem option.

From-SVN: r6813
1994-03-18 12:37:22 -08:00
Richard Kenner
54a88f9251 (do_spec_1): Don't duplicate a macro starting with '__'.
From-SVN: r6764
1994-03-13 06:45:59 -05:00
Richard Kenner
d18225c493 Use PVPROTO for varargs prototypes.
From-SVN: r6744
1994-03-11 08:01:45 -05:00
Richard Kenner
4b19dee8c6 ([__MSDOS__]): Use #ifdef, not #if.
From-SVN: r6739
1994-03-10 15:18:00 -05:00
Richard Kenner
870bc05205 (execute): Initialize PROG.
From-SVN: r6644
1994-02-27 10:48:25 -05:00
Richard Kenner
7aaf8abb28 (default_compilers): Generate and use .ii files in the intermediate
stage of compiling C++ source.

From-SVN: r6553
1994-02-14 19:13:05 -05:00
Doug Evans
fd2c2b2b62 (fatal, error): Fix declarations (make dependant on HAVE_VPRINTF).
From-SVN: r6545
1994-02-13 07:34:55 +00:00
Doug Evans
99360286e5 (PROTO): Define.
Add prototypes for static functions.

From-SVN: r6542
1994-02-12 16:34:43 +00:00
Doug Evans
b67b29cd33 (VPROTO, VA_START): Define.
From-SVN: r6532
1994-02-12 00:51:50 +00:00
Richard Kenner
4f90e4a0f7 If __STDC__, include gstdarg and use ANSI form of varargs.
From-SVN: r6514
1994-02-10 08:07:10 -05:00
Richard Kenner
4aea22caf1 (default_compilers, @ada): Don't duplicate "-gnat" parameters; pass
-quiet unless -Q is specified.

From-SVN: r6456
1994-02-01 08:32:46 -05:00
Jim Wilson
fb99c21cfa (translate_options): Skip arguments of -B, -b, -V, -x,
and -Xlinker options.

From-SVN: r6289
1993-12-23 16:26:16 -08:00
Richard Kenner
c1a9a99cd0 (default_compilers, gnat1): Don't write -gnatb.
From-SVN: r6285
1993-12-23 17:49:04 -05:00
Richard Kenner
53117a2f4d (compiler_version): New variable.
(spec_version): Initialize from DEFAULT_TARGET_VERSION.
(main): Distinguish COMPILER_VERSION from TARGET_VERSION.
(process_command): Use COMPILER_VERSION for %v.
Guard against a COMPILER_VERSION that lacks a minor.

From-SVN: r6264
1993-12-22 13:39:29 -05:00
Richard Kenner
cc70323d03 (default_compilers): Treat ".cpp" as C++.
From-SVN: r6260
1993-12-22 07:42:29 -05:00
Richard Stallman
dc476ce26f (default_compilers): Do define __GNUC_MINOR__ if input is `-'.
From-SVN: r6166
1993-11-26 20:58:04 +00:00
Richard Stallman
500c9e81dc (do_spec_1): Use spec_version for %v, not version_string.
Distinguish %v1 and %v2.
(default_compilers): For __GNUC_MINOR__, use %v2.
For __GNUC__ and __GNUG__, use %v1.

From-SVN: r5976
1993-11-02 23:05:13 +00:00
Richard Stallman
829407e190 (default_compilers): Define __GNUC_MINOR__, using %v.
(do_spec_1): Implement %v.

From-SVN: r5899
1993-10-26 19:04:27 +00:00
Jim Wilson
5d672cd7e6 (sys_errlist): Conditionalize declaration for BSD 4.4.
From-SVN: r5843
1993-10-20 16:20:09 -07:00
Richard Stallman
cbc580f02b (read_specs): Fix call to bzero.
From-SVN: r5656
1993-10-07 15:27:56 +00:00
Richard Kenner
6710c3bdf8 (read_specs): Make a null entry at end of `compilers' when reading new
entry from file.

From-SVN: r5615
1993-10-05 16:25:24 -04:00
Richard Kenner
da6d85c045 (choose_temp_base): Correct size allocated for temp_filename.
From-SVN: r5604
1993-10-05 14:08:10 -04:00
Richard Kenner
c1de946da1 (default_compilers): Add rules for Ada.
From-SVN: r5587
1993-10-03 22:10:24 -04:00
Jim Wilson
fa0d53694e (process_command): Don't warn for -x after last input file
if spec_lang is zero.

From-SVN: r5288
1993-09-08 12:08:15 -07:00
Ian Lance Taylor
7560d6cb1e Correct last change.
From-SVN: r5190
1993-08-20 16:25:56 +00:00
Ian Lance Taylor
4dbc7773ff Permit relative path for standard_startfile_prefix
From-SVN: r5091
1993-08-06 20:45:36 +00:00
Richard Stallman
14553b7569 (process_command): Don't check whether file `-' exists.
From-SVN: r5066
1993-08-04 03:57:21 +00:00
Richard Stallman
1df80ae415 (main): Improve "No input files" error message.
From-SVN: r4971
1993-07-23 18:36:41 +00:00
Jim Wilson
a2dfec996f (link_command_spec): Move %{T*} after %{L*} and %D.
From-SVN: r4951
1993-07-21 13:43:56 -07:00
Richard Stallman
1e72f68fc5 (choose_temp_base): Try multiple variables.
(choose_temp_base): Try multiple variables.  Don't
assume that the variable points to a valid directory.

(pexecute): Handle the MS-DOS return codes correctly.
Add .exe to file name when appropriate.

From-SVN: r4822
1993-07-01 23:30:43 +00:00
Richard Stallman
8b3d02513e (DEFAULT_WORD_SWITCH_TAKES_ARG): Check for -iwithprefixbefore.
(option_map): Add --include-with-prefix-before and
--include-with-prefix-after.

From-SVN: r4782
1993-06-28 04:54:15 +00:00
Richard Stallman
fff26804c9 (translate_options): `*' inhibits warning of extraneous arg.
From-SVN: r4758
1993-06-26 19:43:09 +00:00
Doug Evans
5e3f49d1ce (option_map): Add missing comma.
From-SVN: r4740
1993-06-26 07:14:53 +00:00
Richard Stallman
f7f1b4a40e (option_map): Make --version alias for -dumpversion.
From-SVN: r4721
1993-06-24 04:32:25 +00:00
Richard Stallman
cc198f10a7 (translate_options): Don't assume option_map[j].arg_info != 0.
From-SVN: r4658
1993-06-10 17:47:20 +00:00
Richard Stallman
e1027c772e (translate_options): Don't assume option_map[j].arg_info != 0.
From-SVN: r4644
1993-06-07 03:41:21 +00:00
Richard Stallman
c648ab8a1a (process_command): When GCC_EXEC_PREFIX is defined and tooldir is relative...
(process_command): When GCC_EXEC_PREFIX is defined and
tooldir is relative, add it to search path in addition to standard
directory rather than instead of.

From-SVN: r4588
1993-05-28 22:55:11 +00:00
Richard Stallman
8e06366547 (option_map): Renamed --version to --use-version.
From-SVN: r4462
1993-05-14 22:10:11 +00:00
Ian Lance Taylor
0ad5835e0b If SMALL_ARG_MAX is defined don't pass non-directories in environment
From-SVN: r4278
1993-04-29 21:11:44 +00:00
Richard Stallman
4782d5b5ad (default_compilers): Inhibit -D__OPTIMIZE__ if -O0.
From-SVN: r4272
1993-04-29 16:39:56 +00:00
Ian Lance Taylor
3b39b94f84 Base WORD_SWITCH_TAKES_ARG on new macro DEFAULT_WORD_SWITCH_TAKES_ARG
From-SVN: r4247
1993-04-27 14:58:13 +00:00
Richard Kenner
2a353d3a5e (putenv): Make result type void.
(main): Don't call signal for undefined signal names.

From-SVN: r4139
1993-04-13 17:17:19 -04:00
Jim Wilson
8cacec76fd (library_prefix): Delete variable.
(process_command): Delete uses of library_prefix.
(do_spec_1, D case): Delete use of library_prefix.

From-SVN: r4105
1993-04-12 12:50:01 -07:00
Richard Stallman
ac50959202 (link_command_spec): New option -nostartfiles.
From-SVN: r3690
1993-03-10 07:11:33 +00:00
Richard Stallman
f2faf549d4 Handle long options by translation to old-style ones.
(translate_options): New function.
(option_map): New table.

From-SVN: r3686
1993-03-09 05:47:14 +00:00
Jim Wilson
1d23c208bd (main): Put argv[0] in collect_obstack instead of programname.
From-SVN: r3655
1993-03-05 09:47:54 -08:00
Michael Meissner
1763b229fd Add missing \ before return inside string.
From-SVN: r3627
1993-03-04 15:39:20 +00:00
Jim Wilson
afcd8a020f (main): Truncate programname to what is after last slash.
From-SVN: r3612
1993-03-02 13:19:37 -08:00
Richard Stallman
4b3f0a5b28 (link_command_spec): Do nothing if -fsyntax-only.
From-SVN: r3598
1993-03-02 19:57:36 +00:00
Richard Stallman
dd30a199df (process_command): Fix typo in last change.
From-SVN: r3260
1993-01-18 05:34:03 +00:00
Brendan Kehoe
cb25ac928c With previous change, don't fail on `-l'.
From-SVN: r3253
1993-01-15 16:30:53 -05:00
Brendan Kehoe
48fb792a91 gcc.c (process_command): Only accept input files which exist and can be read...
* gcc.c (process_command): Only accept input files which exist and
        can be read; prevent link phase if an input file was rejected.
        (error_count): Make into a static global variable.

From-SVN: r3249
1993-01-14 19:19:25 -05:00
Ian Lance Taylor
53cc3d6317 Use TOOLDIR_BASE_PREFIX, not TOOLDIR_PREFIX
From-SVN: r3227
1993-01-13 22:37:01 +00:00
Paul Eggert
a1c3776604 # Fix misspellings in comments.
From-SVN: r3182
1993-01-10 22:33:45 +00:00
Richard Stallman
4cf3301cf5 (lookup_compiler): Fix special code for `-' suffix.
From-SVN: r3174
1993-01-09 15:10:30 +00:00
Richard Kenner
3ae7de4ed7 (putenv_from_prefixes): Use PATH_SEPARATOR.
Properly use JUST_MACHINE_SUFFIX when desired; always make path the same as
find_a_file will use.

From-SVN: r3065
1993-01-03 07:28:19 -05:00
Richard Stallman
f18fd95634 (TOOLDIR_PREFIX): Define if not defined.
(tooldir_prefix, tooldir_base_prefix): New variables.
(main): Set tooldir_prefix.  Add it (plus `bin' or `lib') to search paths.

From-SVN: r3057
1993-01-02 09:53:53 +00:00
Richard Stallman
3279bba682 (do_spec_1): Propagate failure from recursive calls.
From-SVN: r3033
1992-12-31 22:38:58 +00:00
Jim Wilson
a99bf70c25 (input_from_pipe): New variable.
(do_spec): Set/clear input_from_pipe as appropriate.  Translate %|
to "-" if input_from_pipe is true.

From-SVN: r3018
1992-12-31 13:05:40 -08:00
Tom Wood
fb2660307d (temp_names): New variable.
(do_spec_1): Rewrite MKTEMP_EACH_FILE for %g/%u/%U.
	(choose_temp_base): Abort if mktemp yields a null string.

From-SVN: r2847
1992-12-08 13:34:05 +00:00
Richard Stallman
49003ff65a (LINK_LIBGCC_SPECIAL_1): New parameter.
From-SVN: r2818
1992-11-30 23:03:05 +00:00
Richard Stallman
b9490a6ec1 (default_compilers): Pass -i* after -U*.
(default_compilers): When running cpp,
move %{D*} and %{U*} (in that order) just before %i.

(do_spec_1): Handle MKTEMP_EACH_FILE.

From-SVN: r2779
1992-11-23 22:44:40 +00:00
Richard Stallman
05d32ae0e0 (process_command): Check that we have enough arguments.
From-SVN: r2636
1992-10-28 21:20:57 +00:00
Richard Stallman
2484b6d2a9 (process_command): Discard after first space in spec_version.
From-SVN: r2583
1992-10-24 00:50:54 +00:00
Jim Wilson
ebb8e0c6c6 (WORD_SWITCH_TAKES_ARG): Handle -Ttext and -Tbss in addition to -Tdata.
From-SVN: r2529
1992-10-20 13:54:08 -07:00
Richard Stallman
0e14ddbcfc Comment added.
From-SVN: r2146
1992-09-17 19:47:09 +00:00
Richard Stallman
f396d2783c (SIGNED_CHAR_SPEC): Use #if rather than ?...
(SIGNED_CHAR_SPEC): Use #if rather than ?: to handle
setting the default SIGNED_CHAR_SPEC macro, since the 3.0 version
of the MIPS C compiler doesn't like ?: in initializers.

From-SVN: r2145
1992-09-17 19:45:49 +00:00
Richard Stallman
3b9b4d3fa6 (main): No program should return the error_count!
Return 2 if failure due to signal, 1 if just errors.
(execute): Increment signal_count.

From-SVN: r2068
1992-09-07 06:04:38 +00:00
Richard Stallman
cc6fc442d8 (process_command): Correct for spaz by patch, installing last change.
From-SVN: r2045
1992-09-03 08:40:32 +00:00
Richard Stallman
058d85217a (main): Use new loop var J to avoid conflict with I.
From-SVN: r2043
1992-09-03 07:15:21 +00:00
Richard Stallman
20eec2c268 (default_compilers): Add missing comma between strings, so that traditional compilers can compile gcc.c.
(default_compilers): Add missing comma between strings, so
that traditional compilers can compile gcc.c.
(main): Don't pass strcpy or strlen a NULL pointer if some of the
spec strings in default_compilers are NULL.
(validate_all_switches): Don't dereference a NULL pointer if some of
the spec strings in defalut_compilers are NULL.

From-SVN: r2039
1992-09-02 23:19:20 +00:00
Brendan Kehoe
301a5c0b57 (default_compilers, ".C" and ".ii"): Pass `+e*' into cc1plus.
(process_command): Allow +e[012] to be passed down into cc1plus.

From-SVN: r2036
1992-09-02 16:10:54 -04:00
Richard Stallman
ec32609a58 (struct compiler): spec field is now array of 4 elements.
(read_specs): Clear the entire new element of compilers.
(lookup_compiler): Copy all of spec array.  Check element 0 for @.
(main): Concatenate all elements of compiler spec.
(validate_all_switches): Validate from all elements of compiler spec.
(default_compilers): Split CPP commands into separate strings.

From-SVN: r2005
1992-08-31 20:00:19 +00:00
Michael Meissner
4401b31c0e Add %U to give last %u name.
From-SVN: r1942
1992-08-25 17:40:04 +00:00
Richard Stallman
8436fe3532 (process_command): Don't set verbose_flag if they make a
typo (e.g., `-v-E'); only when it's exactly "-v".

From-SVN: r1940
1992-08-25 03:07:57 +00:00
Richard Kenner
f8d97cf472 Put include of stdio.h after GCC header files (for i860-stardent-sysv4).
From-SVN: r1905
1992-08-20 05:58:18 -04:00
Richard Stallman
2ef32c884e (process_command): In second loop over all switches,
don't increment I for switches that don't have separate arguments.

From-SVN: r1856
1992-08-15 07:49:48 +00:00
Tom Wood
26ba9d2636 Really install NULL_PTR change
From-SVN: r1854
1992-08-15 00:20:19 +00:00
Tom Wood
d887e8089b (do_spec_1): Add %u.
(default_compilers): For output of as when -c is not used, use %u
	rather than %g so each object filename will be unique.

(NULL_PTR): Use the same definition as
	rtl.h and tree.h.

From-SVN: r1845
1992-08-14 22:51:05 +00:00
Richard Stallman
a6bf434760 Improve err msg for unknown config.
(read_specs): Cast args of xmalloc and read to unsigned.

From-SVN: r1792
1992-08-11 08:26:06 +00:00
Richard Stallman
5f31db15fb (default_compilers): For output of as when -c is not used,
use %g, rather than %b, because the file is going to be deleted anyway.

From-SVN: r1783
1992-08-07 07:17:12 +00:00
Richard Stallman
7ede72fcf2 (link_command_spec): Accept -static but do nothing with it.
From-SVN: r1715
1992-07-29 22:55:25 +00:00
Richard Stallman
c9ebacb820 (process_command): Handle -Wl,' and -Wa,'.
(do_spec_1): Handle %Y.
(default_compilers): Use %Y in assembler commands.

From-SVN: r1637
1992-07-20 02:49:26 +00:00
Charles Hannum
ae04227b3a entered into RCS
From-SVN: r1511
1992-07-08 03:40:47 +00:00
Richard Kenner
7471ffd8a6 *** empty log message ***
From-SVN: r1478
1992-07-06 16:25:01 -04:00
Richard Kenner
906c4e36c6 *** empty log message ***
From-SVN: r1473
1992-07-06 16:04:13 -04:00
Richard Stallman
ac88fc9055 *** empty log message ***
From-SVN: r1352
1992-06-30 01:52:47 +00:00
Richard Stallman
7558fb2af5 *** empty log message ***
From-SVN: r1304
1992-06-27 05:23:20 +00:00
Richard Stallman
00f7e60311 *** empty log message ***
From-SVN: r1187
1992-06-10 21:23:54 +00:00
Richard Stallman
6196c52839 *** empty log message ***
From-SVN: r1182
1992-06-08 03:09:12 +00:00
Richard Stallman
efb1933019 *** empty log message ***
From-SVN: r1172
1992-06-06 19:22:12 +00:00
Richard Stallman
14be024e77 *** empty log message ***
From-SVN: r1076
1992-05-25 02:25:35 +00:00
Richard Stallman
4c64aaf6a4 *** empty log message ***
From-SVN: r1072
1992-05-24 06:33:48 +00:00
Richard Stallman
607a4f7de3 *** empty log message ***
From-SVN: r1065
1992-05-23 21:04:29 +00:00
Richard Stallman
8eebb25825 *** empty log message ***
From-SVN: r983
1992-05-15 02:18:01 +00:00
Richard Stallman
2dcb563f6c *** empty log message ***
From-SVN: r945
1992-05-09 07:00:44 +00:00
Richard Stallman
6dc42e49d3 *** empty log message ***
From-SVN: r930
1992-05-07 06:41:23 +00:00
Richard Stallman
f6ec7e54c8 *** empty log message ***
From-SVN: r870
1992-05-03 21:39:50 +00:00
Richard Stallman
59014d0a6f *** empty log message ***
From-SVN: r678
1992-04-04 08:44:53 +00:00
Per Bothner
2378088aa6 *** empty log message ***
From-SVN: r649
1992-03-31 14:12:10 -08:00
Richard Stallman
b3865ca9f8 *** empty log message ***
From-SVN: r551
1992-03-21 22:50:43 +00:00
Richard Stallman
004fd4d55e *** empty log message ***
From-SVN: r459
1992-03-12 19:24:40 +00:00
Richard Stallman
ed1f651bed Initial revision
From-SVN: r262
1992-02-01 05:15:32 +00:00