From owner-cvs-all Sat Sep 8 14: 6:55 2001 Delivered-To: cvs-all@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id DEAFC37B406; Sat, 8 Sep 2001 14:06:46 -0700 (PDT) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f88L6kM57362; Sat, 8 Sep 2001 14:06:46 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id BEF9D380A; Sat, 8 Sep 2001 14:06:45 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: "David E. O'Brien" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/gnu/usr.bin/binutils/libiberty Makefile In-Reply-To: <200109062259.f86MxVT88167@freefall.freebsd.org> Date: Sat, 08 Sep 2001 14:06:45 -0700 From: Peter Wemm Message-Id: <20010908210645.BEF9D380A@overcee.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "David E. O'Brien" wrote: > obrien 2001/09/06 15:59:31 PDT > > Modified files: > gnu/usr.bin/binutils/libiberty Makefile > Log: > Fix the upgrade path from 4.1 and earlier. This is bogusly testing the kernel version, not the libc version. The version of the kernel has no bearing on what is in libc. IMHO, either put basename.c in unconditionally (it is not worth the pain) or do this: peter@ftp-master[5:46pm]~-129# ar t /usr/lib/libc.a | grep basename basename.o If you must test for it, I would feel happier if you had something along the lines of this: [**UNTESTED**] Index: Makefile =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/binutils/libiberty/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- Makefile 2001/09/06 22:59:31 1.10 +++ Makefile 2001/09/08 21:01:20 @@ -2,13 +2,7 @@ .include "../Makefile.inc0" -# Get __FreeBSD_version -.if exists(/sbin/sysctl) -SYSCTL= /sbin/sysctl -.else -SYSCTL= /usr/sbin/sysctl -.endif -OSVERSION!= ${SYSCTL} -n kern.osreldate +LIBC_BASENAME!= ar tv /usr/lib/libc.a | grep basename .PATH: ${SRCDIR}/libiberty @@ -18,7 +12,7 @@ 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 +.if ${LIBC_BASENAME} == "" SRCS+= basename.c .endif CFLAGS+= -DHAVE_CONFIG_H peter@overcee[2:01pm]/home/src/gnu/usr.bin/binutils/libiberty-105> make -V LIBC_BASENAME rw-r--r-- 0/0 1230 Aug 24 03:49 2001 basename.o However, 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). Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message