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: 32/64 startfile path handling


On Thu, Jun 13, 2002 at 09:36:10PM +0200, Ulrich Weigand wrote:
> Alan Modra wrote:
> 
> >-  /* If not cross-compiling, look for startfiles in the standard places.
> */
> >-  if (*cross_compile == '0')
> >+  /* If not cross-compiling, look for startfiles in the standard places.
> >+     Similarly, don't add the standard prefixes if startfile handling
> >+     will be under control of startfile_prefix_spec.  */
> >+  if (*cross_compile == '0' || *startfile_prefix_spec == 0)
> 
> The 'if'-condition appears to be wrong; this should be '&&' instead of '||'

Thanks.  You're correct.  I tested the patch using a powerpc-linux ->
powerpc64-linux cross..  Committing the following as obvious.

	* gcc.c (main): Correct startfile_prefix_spec check.

Index: gcc/gcc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
retrieving revision 1.323
diff -u -p -r1.323 gcc.c
--- gcc/gcc.c	10 Jun 2002 12:27:55 -0000	1.323
+++ gcc/gcc.c	16 Jun 2002 04:16:49 -0000
@@ -5910,7 +5910,7 @@ main (argc, argv)
   /* If not cross-compiling, look for startfiles in the standard places.
      Similarly, don't add the standard prefixes if startfile handling
      will be under control of startfile_prefix_spec.  */
-  if (*cross_compile == '0' || *startfile_prefix_spec == 0)
+  if (*cross_compile == '0' && *startfile_prefix_spec == 0)
     {
       if (*md_exec_prefix)
 	{


-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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