On Fri, May 10, 2002 at 01:41:47AM -0700, David E. O'Brien wrote: > obrien 2002/05/10 01:41:46 PDT > > Modified files: (Branch: WIP_GCC31) > gnu/usr.bin/cc/cc_tools freebsd-native.h > Log: > Use MD_EXEC_PREFIX now to get us thru `buildworld'. > The problem is the GCC driver now turns STANDARD_EXEC_PREFIX into a relative > path -- "<basename argv[0]>/../../libexec" for our normal install location. > 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 installed > in the normal place (but isn't). > MD_EXEC_PREFIX is still absolute, so I'll use that for now. I would like 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 why! > Another way is to add ${OBJFORMAT_PATH} (as set in CROSSENV) to the PATH > in src/Makefile.inc's WMAKEENV. > > Revision Changes Path > 1.9.2.7 +1 -1 src/gnu/usr.bin/cc/cc_tools/freebsd-native.h > 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 =================================================================== 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]. */ +#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=", gcc_exec_prefix, NULL)); } #endif +#endif /* not FREEBSD_NATIVE */ 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 =================================================================== 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 /* Under FreeBSD, the normal location of the various *crt*.o files is the /usr/lib directory. */ %%% Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age
msg38318/pgp00000.pgp
Description: PGP signature