aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2001-09-14 23:07:02 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2001-09-14 23:07:02 +0000
commitdd1cd2eb671c87579e4f4f5ed7988c1516a47bd0 (patch)
treed1a332958fa5fe60776b144ce25eddb30347ae41 /gnu
parent5c25132af57fa44915470bc28a0e9145e34613f5 (diff)
downloadsrc-dd1cd2eb671c87579e4f4f5ed7988c1516a47bd0.tar.gz
src-dd1cd2eb671c87579e4f4f5ed7988c1516a47bd0.zip
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
Notes
Notes: svn path=/head/; revision=83477
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 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