From dd1cd2eb671c87579e4f4f5ed7988c1516a47bd0 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 14 Sep 2001 23:07:02 +0000 Subject: [PATCH] Rev 1.10 bogusly tested the kernel version, not the libc version. The version of the kernel has no bearing on what is in libc. We now search for basename in libc to determin if we need to include the libiberty version in the build. This is all still a bit bogus as it will (like the sysctl method) cause basename.o to be linked into the cross-build as well as the host build. It would probably be better to test if we were doing the initial host build and unconditionally include that. Once we've generated the target libc we know that basename is available. (maybe test for $TOOLS_PREFIX or something). Submitted by: peter --- gnu/usr.bin/binutils/libiberty/Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gnu/usr.bin/binutils/libiberty/Makefile b/gnu/usr.bin/binutils/libiberty/Makefile index a9cbf4cc9f1c..5fd956e9c022 100644 --- a/gnu/usr.bin/binutils/libiberty/Makefile +++ b/gnu/usr.bin/binutils/libiberty/Makefile @@ -2,14 +2,6 @@ .include "../Makefile.inc0" -# Get __FreeBSD_version -.if exists(/sbin/sysctl) -SYSCTL= /sbin/sysctl -.else -SYSCTL= /usr/sbin/sysctl -.endif -OSVERSION!= ${SYSCTL} -n kern.osreldate - .PATH: ${SRCDIR}/libiberty LIB= iberty @@ -18,7 +10,8 @@ SRCS= argv.c choose-temp.c concat.c cp-demangle.c cplus-dem.c \ hex.c floatformat.c lbasename.c objalloc.c obstack.c safe-ctype.c \ xatexit.c xexit.c xmalloc.c \ xstrdup.c xstrerror.c -.if ${OSVERSION} < 420000 +LIBC_BASENAME!= ar tv /usr/lib/libc.a | grep basename +.if ${LIBC_BASENAME} == "" SRCS+= basename.c .endif CFLAGS+= -DHAVE_CONFIG_H