Blame SOURCES/binutils-ppc64le-8.patch

881b8e
commit 2dc0e7b400e46f105960c0dfcd431013f0013c6a
881b8e
Author: Alan Modra <amodra@gmail.com>
881b8e
Date:   Tue Jul 1 18:10:25 2014 +0930
881b8e
881b8e
    Don't include sys/param.h
881b8e
    
881b8e
    sys/param.h on recent versions of powerpc glibc ends up including
881b8e
    asm/elf.h via asm/sigcontex.h.  asm/elf.h defines R_PPC_* and R_PPC64_*
881b8e
    macros, which clash with our include/elf/ppc.h and include/elf/ppc64.h.
881b8e
    It turns out that no current source uses LD_PATHMAX, so there is no
881b8e
    need for limits.h or sys/param.h, except for one occurrence of UINT_MAX.
881b8e
    I don't have a quarrel with limits.h, but it seems unnecessary just
881b8e
    for UINT_MAX.
881b8e
    
881b8e
    	* sysdep.h: Don't include limits.h and sys/param.h.  Don't
881b8e
    	include unistd.h twice.
881b8e
    	(LD_PATHMAX): Don't define.
881b8e
    	* ldlang.c (lang_common): Don't use UINT_MAX.
881b8e
881b8e
diff --git a/ld/ldlang.c b/ld/ldlang.c
881b8e
index e7c9669..60877b8 100644
881b8e
--- a/ld/ldlang.c
881b8e
+++ b/ld/ldlang.c
881b8e
@@ -5981,7 +5981,7 @@ lang_common (void)
881b8e
 	  for (power = 0; power <= 4; power++)
881b8e
 	    bfd_link_hash_traverse (link_info.hash, lang_one_common, &power);
881b8e
 
881b8e
-	  power = UINT_MAX;
881b8e
+	  power = (unsigned int) -1;
881b8e
 	  bfd_link_hash_traverse (link_info.hash, lang_one_common, &power);
881b8e
 	}
881b8e
     }
881b8e
diff --git a/ld/sysdep.h b/ld/sysdep.h
881b8e
index c0b8445..99caf18 100644
881b8e
--- a/ld/sysdep.h
881b8e
+++ b/ld/sysdep.h
881b8e
@@ -56,34 +56,12 @@ extern char *strrchr ();
881b8e
 #include <unistd.h>
881b8e
 #endif
881b8e
 
881b8e
-/* for PATH_MAX */
881b8e
-#ifdef HAVE_LIMITS_H
881b8e
-#include <limits.h>
881b8e
-#endif
881b8e
-/* for MAXPATHLEN */
881b8e
-#ifdef HAVE_SYS_PARAM_H
881b8e
-#include <sys/param.h>
881b8e
-#endif
881b8e
-#ifdef PATH_MAX
881b8e
-# define LD_PATHMAX PATH_MAX
881b8e
-#else
881b8e
-# ifdef MAXPATHLEN
881b8e
-#  define LD_PATHMAX MAXPATHLEN
881b8e
-# else
881b8e
-#  define LD_PATHMAX 1024
881b8e
-# endif
881b8e
-#endif
881b8e
-
881b8e
 #ifdef HAVE_REALPATH
881b8e
 # define REALPATH(a,b) realpath (a, b)
881b8e
 #else
881b8e
 # define REALPATH(a,b) NULL
881b8e
 #endif
881b8e
 
881b8e
-#ifdef HAVE_UNISTD_H
881b8e
-#include <unistd.h>
881b8e
-#endif
881b8e
-
881b8e
 #ifdef USE_BINARY_FOPEN
881b8e
 #include "fopen-bin.h"
881b8e
 #else