Date: Tue, 14 May 2002 13:05:22 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: "David E. O'Brien" <obrien@FreeBSD.org> 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> In-Reply-To: <200205100841.g4A8flG31979@freefall.freebsd.org> References: <200205100841.g4A8flG31979@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 -- "<basename argv[0]>/../../libexec" for our normal install locat=
ion.
> However, in the middle of `buildworld' we need
> "<basename argv[0]>/../../../../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 "<basename argv[0]>/../../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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020514100522.GA58546>
