minor patch to ld/emultempl/elf32.em
David O'Brien
obrien@FreeBSD.org
Tue Jan 2 12:43:00 GMT 2001
Hi all,
This patch only activates the Linux processing when targeting Linux (and
makes room for simular processing when targeting FreeBSD). I created ld
targeting i686-pc-linux-gnu and did `make check' and things looked OK,
along with a `make check' on FreeBSD 4.2.
Permission to apply?
--
-- David (obrien@FreeBSD.org)
2000-1-2 David O'Brien <obrien@BSDi.com>
* emultempl/elf32.em: Only perform Linux ld hints processing when
targeting Linux.
Index: elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.38
diff -u -r1.38 elf32.em
--- elf32.em 2000/12/12 19:37:01 1.38
+++ elf32.em 2001/01/02 20:41:02
@@ -425,11 +425,13 @@
if [ "x${host}" = "x${target}" ] ; then
case " ${EMULATION_LIBPATH} " in
*" ${EMULATION_NAME} "*)
-cat >>e${EMULATION_NAME}.c <<EOF
+ case ${target} in
+ *-*-linux-gnu*)
+ cat >>e${EMULATION_NAME}.c <<EOF
/* For a native linker, check the file /etc/ld.so.conf for directories
in which we may find shared libraries. /etc/ld.so.conf is really
- only meaningful on Linux, but we check it on other systems anyhow. */
+ only meaningful on Linux. */
static boolean gld${EMULATION_NAME}_check_ld_so_conf
PARAMS ((const char *, int));
@@ -509,7 +511,9 @@
}
EOF
- ;;
+ # Linux
+ ;;
+ esac
esac
fi
cat >>e${EMULATION_NAME}.c <<EOF
@@ -695,10 +699,15 @@
if [ "x${host}" = "x${target}" ] ; then
case " ${EMULATION_LIBPATH} " in
*" ${EMULATION_NAME} "*)
-cat >>e${EMULATION_NAME}.c <<EOF
+ case ${target} in
+ *-*-linux-gnu*)
+ cat >>e${EMULATION_NAME}.c <<EOF
if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
break;
EOF
+ # Linux
+ ;;
+ esac
;;
esac
fi
More information about the Binutils
mailing list