From owner-freebsd-current Tue May 14 3: 5:37 2002 Delivered-To: freebsd-current@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id D827937B403; Tue, 14 May 2002 03:05:26 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g4EA5MA69433; Tue, 14 May 2002 13:05:22 +0300 (EEST) (envelope-from ru) Date: Tue, 14 May 2002 13:05:22 +0300 From: Ruslan Ermilov To: "David E. O'Brien" Cc: current@FreeBSD.org Subject: [PATCH] cross builds are broken (was: Re: cvs commit: src/gnu/usr.bin/cc/cc_tools freebsd-native.h) Message-ID: <20020514100522.GA58546@sunbay.com> References: <200205100841.g4A8flG31979@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <200205100841.g4A8flG31979@freefall.freebsd.org> User-Agent: Mutt/1.3.99i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 10, 2002 at 01:41:47AM -0700, David E. O'Brien wrote: > obrien 2002/05/10 01:41:46 PDT >=20 > Modified files: (Branch: WIP_GCC31) > gnu/usr.bin/cc/cc_tools freebsd-native.h=20 > Log: > Use MD_EXEC_PREFIX now to get us thru `buildworld'. > The problem is the GCC driver now turns STANDARD_EXEC_PREFIX into a rel= ative > path -- "/../../libexec" for our normal install locat= ion. > However, in the middle of `buildworld' we need > "/../../../../libexec" due to the prefix we tell the = GCC > driver. But either the GCC driver is buggy, or we are confusing it, as= it > tries to exec "/../../libexec/cpp0" as if it were ins= talled > in the normal place (but isn't). > MD_EXEC_PREFIX is still absolute, so I'll use that for now. I would li= ke to > later make it so MD_EXEC_PREFIX is set only for `buildworld', as > MD_EXEC_PREFIX is also in the search path for libraries. Don't ask me w= hy! > Another way is to add ${OBJFORMAT_PATH} (as set in CROSSENV) to the PATH > in src/Makefile.inc's WMAKEENV. > =20 > Revision Changes Path > 1.9.2.7 +1 -1 src/gnu/usr.bin/cc/cc_tools/freebsd-native.h >=20 This does not work for the "cross" case, as MD_EXEC_PREFIX is not honoured here thus breaking "cross" world and releases. The below patch restores the lost functionality in the old pre-gcc-3.1 import way. ``gcc -print-search-dirs'' now looks as before with this patch. It also eliminates the redundant entry in the `libraries:' part of the -print-search-dirs output. %%% 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.26 diff -u -p -r1.26 gcc.c --- contrib/gcc/gcc.c 9 May 2002 22:02:01 -0000 1.26 +++ contrib/gcc/gcc.c 14 May 2002 09:58:59 -0000 @@ -3187,6 +3187,7 @@ process_command (argc, argv) /* Set up the default search paths. If there is no GCC_EXEC_PREFIX, see if we can create it from the pathname specified in argv[0]. */ =20 +#ifndef FREEBSD_NATIVE #ifndef VMS /* FIXME: make_relative_prefix doesn't yet work for VMS. */ if (!gcc_exec_prefix) @@ -3197,6 +3198,7 @@ process_command (argc, argv) putenv (concat ("GCC_EXEC_PREFIX=3D", gcc_exec_prefix, NULL)); } #endif +#endif /* not FREEBSD_NATIVE */ =20 if (gcc_exec_prefix) { @@ -3841,9 +3843,9 @@ warranty; not even for MERCHANTABILITY o #ifndef OS2 add_prefix (&exec_prefixes, standard_exec_prefix, "GCC", PREFIX_PRIORITY_LAST, 1, warn_std_ptr); -#ifndef FREEBSD_NATIVE add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS", PREFIX_PRIORITY_LAST, 2, warn_std_ptr); +#ifndef FREEBSD_NATIVE add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS", PREFIX_PRIORITY_LAST, 2, warn_std_ptr); #endif /* not FREEBSD_NATIVE */ 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.16 diff -u -p -r1.16 freebsd-native.h --- gnu/usr.bin/cc/cc_tools/freebsd-native.h 10 May 2002 08:54:46 -0000 1.16 +++ gnu/usr.bin/cc/cc_tools/freebsd-native.h 14 May 2002 09:58:59 -0000 @@ -31,8 +31,9 @@ libraries: MD_EXEC_PREFIX:MD_STARTFILE_PREFIX:STANDARD_STARTFILE_PREFIX */ #undef TOOLDIR_BASE_PREFIX /* Old?? This is not documented. */ +#undef STANDARD_BINDIR_PREFIX /* We don't need one for now. */ #define STANDARD_EXEC_PREFIX PREFIX"/libexec/" -#define MD_EXEC_PREFIX PREFIX"/libexec/" +#undef MD_EXEC_PREFIX =20 /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ %%% Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --ZPt4rx8FFjLCG7dd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE84OFiUkv4P6juNwoRAoTZAJ40NrqRj2gZ4jEooufNBNeOGMAlCQCeM7Dv qj4xx2d7jBfzxnpEIB0ZjH8= =dtU2 -----END PGP SIGNATURE----- --ZPt4rx8FFjLCG7dd-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message