Commit 00dcee0c by Alan Modra Committed by Alan Modra

re PR driver/20425 (-print-search-dirs doesn't honor mutil-os/multilib settings)

	PR driver/20425
	* gcc.c (for_each_path): New function.
	(add_to_obstack, file_at_path): New functions.
	(struct file_at_path_info, struct add_to_obstack_info): New.
	(build_search_list): Rewrite using for_each_path.  Constify struct
	path_prefix pointer.  Add do_multi param.  Adjust all callers.
	(find_a_file): Similarly, but just change existing param to bool.
	(putenv_from_prefixes): Add do_multi param, make "paths" const.
	(do_spec_path): Delete.
	(struct spec_path_info): New.
	(spec_path): New function.
	(do_spec_1): Use for_each_path for %D and %I.
	(find_file): Adjust for find_a_file changes.
	(main): Search multilibs for specs.  Print multilib lib path for
	-print-search-dirs.  Likewise add multilibs to LIBRARY_PATH_ENV.
	(read_specs): Search multilibs for %include and %include_noerr.
	(is_directory): Remove second string param.  Change last param
	to a bool.  Don't use concat.  Remove SMALL_ARG_MAX test, always
	check path is a dir.  Update all callers.
	* doc/hostconfig.texi (SMALL_ARG_MAX): Remove mention.
	* system.h (SMALL_ARG_MAX): Poison.
	* config.gcc: Don't define SMALL_ARG_MAX.
	* config.host: Likewise.
	* config.build: Likewise.

From-SVN: r108635
parent bd1ef757
2005-12-16 Alan Modra <amodra@bigpond.net.au>
PR driver/20425
* gcc.c (for_each_path): New function.
(add_to_obstack, file_at_path): New functions.
(struct file_at_path_info, struct add_to_obstack_info): New.
(build_search_list): Rewrite using for_each_path. Constify struct
path_prefix pointer. Add do_multi param. Adjust all callers.
(find_a_file): Similarly, but just change existing param to bool.
(putenv_from_prefixes): Add do_multi param, make "paths" const.
(do_spec_path): Delete.
(struct spec_path_info): New.
(spec_path): New function.
(do_spec_1): Use for_each_path for %D and %I.
(find_file): Adjust for find_a_file changes.
(main): Search multilibs for specs. Print multilib lib path for
-print-search-dirs. Likewise add multilibs to LIBRARY_PATH_ENV.
(read_specs): Search multilibs for %include and %include_noerr.
(is_directory): Remove second string param. Change last param
to a bool. Don't use concat. Remove SMALL_ARG_MAX test, always
check path is a dir. Update all callers.
* doc/hostconfig.texi (SMALL_ARG_MAX): Remove mention.
* system.h (SMALL_ARG_MAX): Poison.
* config.gcc: Don't define SMALL_ARG_MAX.
* config.host: Likewise.
* config.build: Likewise.
2005-12-16 Paolo Bonzini <bonzini@gnu.org>
* combine.c (combine_simplify_rtx <case NOT, NEG, TRUNCATE,
......
......@@ -90,15 +90,10 @@ case $build in
build_install_headers_dir=install-headers-cpio
;;
i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4* )
build_xm_defines="SMALL_ARG_MAX"
build_install_headers_dir=install-headers-cpio
;;
i[34567]86-*-solaris2*)
build_xm_defines="SMALL_ARG_MAX"
;;
i[34567]86-*-sysv4*)
# Intel x86 running system V r4
build_xm_defines="SMALL_ARG_MAX"
build_install_headers_dir=install-headers-cpio
;;
i[34567]86-*-udk*)
......
......@@ -984,7 +984,6 @@ i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
then
tm_file="${tm_file} usegas.h"
fi
xm_defines="SMALL_ARG_MAX"
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ptx4.h i386/ptx4-i.h"
tmake_file=t-svr4
extra_parts="crtbegin.o crtend.o"
......@@ -1115,7 +1114,6 @@ i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
use_fixproto=yes
;;
i[34567]86-*-solaris2*)
xm_defines="SMALL_ARG_MAX"
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h"
case ${target} in
*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
......@@ -1182,7 +1180,6 @@ i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
use_fixproto=yes
;;
i[34567]86-*-sysv4*) # Intel 80386's running system V.4
xm_defines="SMALL_ARG_MAX"
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h"
if test x$stabs = xyes
then
......
......@@ -132,17 +132,10 @@ case ${host} in
i370-*-opened* | i370-*-mvs* ) # IBM 360/370/390 Architecture
host_xm_defines='FATAL_EXIT_CODE=12'
;;
i[34567]86-sequent-ptx4*)
host_xm_defines="SMALL_ARG_MAX"
;;
i[34567]86-*-solaris2*)
host_xm_defines="SMALL_ARG_MAX"
out_host_hook_obj=host-solaris.o
host_xmake_file=x-solaris
;;
i[34567]86-*-sysv4*) # Intel 80386's running System V Release 4
host_xm_defines="SMALL_ARG_MAX"
;;
i[34567]86-pc-msdosdjgpp*)
host_xm_file=i386/xm-djgpp.h
host_exeext=.exe
......
......@@ -208,11 +208,6 @@ initialization when @code{collect2} is being initialized.
If defined, a C statement (sans semicolon) that performs host-dependent
initialization when a compilation driver is being initialized.
@item SMALL_ARG_MAX
Define this macro if the host system has a small limit on the total
size of an argument vector. This causes the driver to take more care
not to pass unnecessary arguments to subprocesses.
@item HOST_LONG_LONG_FORMAT
If defined, the string used to indicate an argument of type @code{long
long} to functions like @code{printf}. The default value is
......
......@@ -730,7 +730,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
TARGET_OPTIONS TARGET_SWITCHES EXTRA_CC_MODES FINALIZE_PIC \
PREDICATE_CODES SPECIAL_MODE_PREDICATES HOST_PTR_PRINTF \
EXTRA_SECTIONS EXTRA_SECTION_FUNCTIONS READONLY_DATA_SECTION \
TARGET_ASM_EXCEPTION_SECTION TARGET_ASM_EH_FRAME_SECTION
TARGET_ASM_EXCEPTION_SECTION TARGET_ASM_EH_FRAME_SECTION \
SMALL_ARG_MAX
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment