This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld build configured with additional targets is broken
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Fri, 4 Nov 2016 14:00:12 +0000
- Subject: Re: ld build configured with additional targets is broken
- Authentication-results: sourceware.org; auth=none
- References: <3fc5685b-c191-7b90-acbe-69c509d7e74c@ubuntu.com> <alpine.DEB.2.00.1610280436500.31859@tp.orcam.me.uk> <fe9cf009-8a04-4dcd-bd64-3a97f88d1511@redhat.com> <1e8d014f-b1d5-145a-1c53-10fc0954cb9a@redhat.com> <6aedc4f3-e5c2-e4d0-05b8-0050c16f75df@redhat.com>
Hi Guys,
OK - I have checked in a patch to remove support for $PLATFORM in rpath
search strings. This seems to be the safest thing to do, as I was never
sure that the support would actually be correct anyway.
Cheers
Nick
ld/ChangeLog
2016-11-04 Nick Clifton <nickc@redhat.com>
* emultempl/elf32.em (search_needed): Remove use of getauxval and
inclusion of <sys/auxv.h>. Replace support for $PLATFORM with a
warning message.
* configure.ac (AC_CHECK_FUNCS): Remove getauxval.
* configure: Regenerate.
* config.in: Regenerate.
diff --git a/ld/config.in b/ld/config.in
index 5c614ed..2c6d698 100644
--- a/ld/config.in
+++ b/ld/config.in
@@ -62,9 +62,6 @@
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
-/* Define to 1 if you have the `getauxval' function. */
-#undef HAVE_GETAUXVAL
-
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
diff --git a/ld/configure b/ld/configure
index 2c55b28..3f82f35 100755
--- a/ld/configure
+++ b/ld/configure
@@ -16488,7 +16488,7 @@ _ACEOF
fi
done
-for ac_func in getauxval open lseek close
+for ac_func in open lseek close
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/ld/configure.ac b/ld/configure.ac
index 4542845..d17281f 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -216,7 +216,7 @@ AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h elf-hints.h limits.h local
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h)
ACX_HEADER_STRING
AC_CHECK_FUNCS(glob mkstemp realpath sbrk setlocale waitpid)
-AC_CHECK_FUNCS(getauxval open lseek close)
+AC_CHECK_FUNCS(open lseek close)
AC_HEADER_DIRENT
dnl AC_CHECK_HEADERS(sys/mman.h)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 06f02c6..57252da 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -472,16 +472,6 @@ fragment <<EOF
return TRUE;
}
-EOF
-if [ "x${NATIVE}" = xyes ] ; then
-fragment <<EOF
-#ifdef HAVE_GETAUXVAL
-#include <sys/auxv.h>
-#endif
-EOF
-fi
-fragment <<EOF
-
/* Search for a needed file in a path. */
static bfd_boolean
@@ -615,25 +605,12 @@ gld${EMULATION_NAME}_search_needed (const char *path,
case 'P':
if (strcmp (var + 2, "LATFORM") == 0)
{
- /* PLATFORM - replace with a string corresponding
- to the processor type of the host system.
-
- FIXME: Supporting this token might be a bad idea,
- especially for non-native linkers. It has the potential
- to find incorrect results. Maybe issuing a warning
- message would be safer. Current policy: wait and see if
- somebody complains. */
- replacement = "$OUTPUT_ARCH";
-EOF
-# We use getauxval() if it is available, but only for natives.
-if [ "x${NATIVE}" = xyes ] ; then
-fragment <<EOF
-#ifdef HAVE_GETAUXVAL
- replacement = (char *) getauxval (AT_PLATFORM);
-#endif
-EOF
-fi
-fragment <<EOF
+ /* Supporting $PLATFORM in a cross-hosted environment is not
+ possible. Supporting it in a native environment involves
+ loading the <sys/auxv.h> header file which loads the
+ system <elf.h> header file, which conflicts with the
+ "include/elf/mips.h" header file. */
+ replacement = NULL;
}
break;
@@ -665,7 +642,7 @@ fragment <<EOF
/* We only issue an "unrecognised" message in verbose mode
as the $<foo> token might be a legitimate component of
a path name in the target's file system. */
- info_msg (_("unrecognised token '%s' in search path\n"), var);
+ info_msg (_("unrecognised or unsupported token '%s' in search path\n"), var);
if (end)
/* Restore the path separator. */