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
This commit is contained in:
parent
395572e2f3
commit
3d85dcd29b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user