This is the mail archive of the gcc-patches@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: -Bdir/ and overriding crt*.o files in multilibbed compilers


On Jan 14, 2003, Alexandre Oliva <aoliva at redhat dot com> wrote:

> Index: gcc/ChangeLog
> from  Alexandre Oliva  <aoliva at redhat dot com>

> 	* gcc.c (find_a_file): If searching a non-os_multilib directory,
> 	if multilib_name fails, try the unadorned name before the next
> 	directory.

Ping.

> Index: gcc/gcc.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
> retrieving revision 1.357
> diff -u -p -r1.357 gcc.c
> --- gcc/gcc.c 10 Jan 2003 02:22:02 -0000 1.357
> +++ gcc/gcc.c 14 Jan 2003 01:44:02 -0000
> @@ -1,6 +1,6 @@
>  /* Compiler driver program that can handle many languages.
>     Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
> -   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
> +   1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 
>  This file is part of GCC.
 
> @@ -2435,6 +2435,7 @@ find_a_file (pprefix, name, mode, multil
>  	const char *this_name
>  	  = pl->os_multilib ? multilib_os_name : multilib_name;
 
> +      retry:
>  	if (machine_suffix)
>  	  {
>  	    /* Some systems have a suffix for executable files.
> @@ -2523,6 +2524,16 @@ find_a_file (pprefix, name, mode, multil
>  		  *pl->used_flag_ptr = 1;
>  		return temp;
>  	      }
> +	  }
> +
> +	/* At least for -Bdirectory/ flags, we should be able to find
> +	   object files unadorned by multilib directories, if
> +	   searching with the multilib directories couldn't find
> +	   them.  */
> +	if (! pl->os_multilib && this_name != name)
> +	  {
> +	    this_name = name;
> +	    goto retry;
>  	  }
>        }
 
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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