X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Thu, 22 Jan 2004 21:33:44 -0500 Message-Id: <200401230233.i0N2Xii4025886@envy.delorie.com> From: DJ Delorie To: djgpp-workers AT delorie DOT com Subject: GCC_DRIVER_HOST_INITIALIZATION vs gcc 3.4 Reply-To: djgpp-workers AT delorie DOT com In xm-djgpp.h we define this macro (see below). Unfortunately, the variables it sets have become const in 3.4, so we cannot change them. I've build a version both with and without the three assignments, and see negligible difference in the search paths (functionally the same, without the assignments is more efficient in my case). The thread discussing this is at [1] where it seems the purpose of these assignments is efficiency, not always functionality. I'm contemplating just removing these assignments (but leaving in the diagnostics). Can anyone see any functional problems with such a change? [1] http://www.delorie.com/archives/browse.cgi?p=djgpp-workers/2000/05/15/19:29:32 /* Change /dev/env/DJDIR/prefix/dir/ to canonical form so gcc_exec_prefix is set properly in 'gcc.c'. It also helps to cut down the number of times the value of the DJGPP environment variable 'DJDIR' is evaluated. */ #undef GCC_DRIVER_HOST_INITIALIZATION #define GCC_DRIVER_HOST_INITIALIZATION \ do { \ /* If the environment variable DJDIR is not defined, then DJGPP is not \ installed correctly and GCC will quickly become confused with the \ default prefix settings. Report the problem now so the user doesn't \ receive deceptive "file not found" error messages later. */ \ char *djdir = getenv ("DJDIR"); \ if (djdir == NULL) \ { \ /* DJDIR is automatically defined by the DJGPP environment config \ file pointed to by the environment variable DJGPP. Examine DJGPP \ to try and figure out what's wrong. */ \ char *djgpp = getenv ("DJGPP"); \ if (djgpp == NULL) \ fatal ("environment variable DJGPP not defined"); \ else if (access (djgpp, R_OK) == 0) \ fatal ("environment variable DJGPP points to missing file '%s'", \ djgpp); \ else \ fatal ("environment variable DJGPP points to corrupt file '%s'", \ djgpp); \ } \ standard_exec_prefix = update_path (standard_exec_prefix, NULL); \ standard_bindir_prefix = update_path (standard_bindir_prefix, NULL); \ standard_startfile_prefix = update_path (standard_startfile_prefix, NULL); \ } while (0)