From owner-cvs-src@FreeBSD.ORG Thu Sep 4 09:34:10 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B46F16A4BF; Thu, 4 Sep 2003 09:34:10 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A3CA43FF2; Thu, 4 Sep 2003 09:34:03 -0700 (PDT) (envelope-from ru@sunbay.com) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h84GXw86002378 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Sep 2003 19:33:59 +0300 (EEST) (envelope-from ru@sunbay.com) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h84GXwJ1002377; Thu, 4 Sep 2003 19:33:58 +0300 (EEST) (envelope-from ru) Date: Thu, 4 Sep 2003 19:33:58 +0300 From: Ruslan Ermilov To: "David O'Brien" Message-ID: <20030904163358.GD97732@sunbay.com> References: <200309040429.h844TBhD058678@repoman.freebsd.org> <20030904083617.GA56261@dragon.nuxi.com> <20030904092755.GD45051@sunbay.com> <20030904140129.GA61909@dragon.nuxi.com> <20030904155659.GC97732@sunbay.com> <20030904162656.GA396@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Oiv9uiLrevHtW1RS" Content-Disposition: inline In-Reply-To: <20030904162656.GA396@dragon.nuxi.com> User-Agent: Mutt/1.5.4i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Peter Wemm Subject: Re: cvs commit: src/share/mk bsd.lib.mk X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2003 16:34:10 -0000 --Oiv9uiLrevHtW1RS Content-Type: multipart/mixed; boundary="fXStkuK2IQBfcDe+" Content-Disposition: inline --fXStkuK2IQBfcDe+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 04, 2003 at 09:26:56AM -0700, David O'Brien wrote: > On Thu, Sep 04, 2003 at 06:56:59PM +0300, Ruslan Ermilov wrote: > > On Thu, Sep 04, 2003 at 07:01:29AM -0700, David O'Brien wrote: > > > On Thu, Sep 04, 2003 at 12:27:55PM +0300, Ruslan Ermilov wrote: > > [...] > > > > > GCC should have additional changes then. It is going to confuse = other > > > > > things to have the symlink in one directory and the real libs in = another. > > > > >=20 > > > > I will look into what else is needed in our toolchain to get rid of= these > > > > symlinks, and get back to you, David. > > >=20 > > > Keep which ever symlinks you want /lib or /usr/lib -- but we should be > > > totally unambigious as to which are the "real" ones, and don't install > > > the other. Installing two sets of symlinks isn't the way to go. > > > =20 > > Sure. The fix is to make ``cc --print-search-dirs'' output include > > the /lib directory too. =20 >=20 > That is trival. >=20 Not quite. Just fixing STANDARD_STARTFILE_PREFIX to include ${TOOLS_PREFIX}/lib makes the output look like required, but this does not seem to work -- linkage doesn't work. I had to introduce and use STANDARD_STARTFILE_PREFIX_1 and STANDARD_STARTFILE_PREFIX_2 to make it work. My test buildworld just completed with this patch (and without compatibility symlinks in /usr/lib). But this does not work (yet) in the CROSS_COMPILE case. Attached is the draft patch. > > I'm currently testing some patches with bsd.lib.mk,v 1.152. >=20 > We should all agree on where the symlink for things like libc.so.X live. > I'm 99% sure Peter will argue /usr/lib, and I personally don't care -- I > just want one of them. Before commiting yet something else to > bsd.lib.mk, what direction are you going in? >=20 For /lib/libfoo.so.X, create /lib/libfoo.so symlink. For /usr/lib/libfoo.so.X, create /usr/lib/libfoo.so symlink. Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software Ltd, ru@FreeBSD.org FreeBSD committer --fXStkuK2IQBfcDe+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Content-Transfer-Encoding: quoted-printable Index: contrib/gcc/gcc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/contrib/gcc/gcc.c,v retrieving revision 1.36 diff -u -r1.36 gcc.c --- contrib/gcc/gcc.c 11 Jul 2003 04:45:39 -0000 1.36 +++ contrib/gcc/gcc.c 4 Sep 2003 16:02:07 -0000 @@ -1319,6 +1319,12 @@ #ifndef STANDARD_STARTFILE_PREFIX #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/" #endif +#ifndef STANDARD_STARTFILE_PREFIX_1 +#define STANDARD_STARTFILE_PREFIX_1 "/lib/" +#endif +#ifndef STANDARD_STARTFILE_PREFIX_2 +#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" +#endif #ifndef TOOLDIR_BASE_PREFIX #define TOOLDIR_BASE_PREFIX "/usr/local/" #endif @@ -1335,8 +1341,8 @@ static const char *md_startfile_prefix =3D MD_STARTFILE_PREFIX; static const char *md_startfile_prefix_1 =3D MD_STARTFILE_PREFIX_1; static const char *const standard_startfile_prefix =3D STANDARD_STARTFILE_= PREFIX; -static const char *const standard_startfile_prefix_1 =3D "/lib/"; -static const char *const standard_startfile_prefix_2 =3D "/usr/lib/"; +static const char *const standard_startfile_prefix_1 =3D STANDARD_STARTFIL= E_PREFIX_1; +static const char *const standard_startfile_prefix_2 =3D STANDARD_STARTFIL= E_PREFIX_2; =20 static const char *const tooldir_base_prefix =3D TOOLDIR_BASE_PREFIX; static const char *tooldir_prefix; @@ -6060,6 +6066,7 @@ add_prefix (&startfile_prefixes, md_startfile_prefix_1, "GCC", PREFIX_PRIORITY_LAST, 0, NULL, 1); =20 +#ifndef FREEBSD_NATIVE /* If standard_startfile_prefix is relative, base it on standard_exec_prefix. This lets us move the installed tree as a unit. If GCC_EXEC_PREFIX is defined, base @@ -6080,13 +6087,12 @@ standard_startfile_prefix, NULL), NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1); } +#endif /* not FREEBSD_NATIVE */ =20 -#ifndef FREEBSD_NATIVE add_prefix (&startfile_prefixes, standard_startfile_prefix_1, "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1); add_prefix (&startfile_prefixes, standard_startfile_prefix_2, "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1); -#endif /* not FREEBSD_NATIVE */ #if 0 /* Can cause surprises, and one can use -B./ instead. */ add_prefix (&startfile_prefixes, "./", NULL, PREFIX_PRIORITY_LAST, 1, NULL, 0); Index: gnu/usr.bin/cc/Makefile.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/gnu/usr.bin/cc/Makefile.inc,v retrieving revision 1.63 diff -u -r1.63 Makefile.inc --- gnu/usr.bin/cc/Makefile.inc 4 Jun 2002 19:45:08 -0000 1.63 +++ gnu/usr.bin/cc/Makefile.inc 4 Sep 2003 16:04:37 -0000 @@ -15,7 +15,7 @@ target=3D ${TARGET_ARCH}-undermydesk-freebsd =20 CFLAGS+=3D -DIN_GCC -DHAVE_CONFIG_H -CFLAGS+=3D -DPREFIX=3D\"${TOOLS_PREFIX}/usr\" +CFLAGS+=3D -DTOOLS_PREFIX=3D\"${TOOLS_PREFIX}\" -DPREFIX=3DTOOLS_PREFIX\"/= usr\" #CFLAGS+=3D -DWANT_COMPILER_INVARIANTS =20 # If building 64-bit longs for the i386, "_LARGE_LONG" should also be defi= ned Index: gnu/usr.bin/cc/cc_tools/freebsd-native.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/gnu/usr.bin/cc/cc_tools/freebsd-native.h,v retrieving revision 1.23 diff -u -r1.23 freebsd-native.h --- gnu/usr.bin/cc/cc_tools/freebsd-native.h 11 Jul 2003 05:33:24 -0000 1.23 +++ gnu/usr.bin/cc/cc_tools/freebsd-native.h 4 Sep 2003 16:03:53 -0000 @@ -40,7 +40,8 @@ /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ =20 -#define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" +#define STANDARD_STARTFILE_PREFIX_1 TOOLS_PREFIX"/lib/" +#define STANDARD_STARTFILE_PREFIX_2 TOOLS_PREFIX"/usr/lib/" #ifdef CROSS_COMPILE #define CROSS_STARTFILE_PREFIX PREFIX"/lib/" #endif --fXStkuK2IQBfcDe+-- --Oiv9uiLrevHtW1RS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/V2l2Ukv4P6juNwoRAoO7AJ9I3Lx2FJh5HPvAEXAxZpkmOpZtEQCcDEIj 4jYABYmIhnfPKEiCWe7k+0I= =S5B7 -----END PGP SIGNATURE----- --Oiv9uiLrevHtW1RS--