summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-09-14 23:07:02 +0000
committerobrien <obrien@FreeBSD.org>2001-09-14 23:07:02 +0000
commit3d85dcd29b9b8fbb2e391846674f8302d2395454 (patch)
treed1a332958fa5fe60776b144ce25eddb30347ae41 /gnu
parent395572e2f3bfaec9f72ad71a93edb96074fb4e86 (diff)
downloadFreeBSD-src-3d85dcd29b9b8fbb2e391846674f8302d2395454.zip
FreeBSD-src-3d85dcd29b9b8fbb2e391846674f8302d2395454.tar.gz
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
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/libiberty/Makefile11
1 files changed, 2 insertions, 9 deletions
diff --git a/gnu/usr.bin/binutils/libiberty/Makefile b/gnu/usr.bin/binutils/libiberty/Makefile
index a9cbf4c..5fd956e 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
OpenPOWER on IntegriCloud