delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2015/06/05/03:42:53

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Fri, 5 Jun 2015 03:42:42 -0400
Message-Id: <201506050742.t557ggR8019445@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to:
<CAA2C=vAsibDAvdNkdGMFC_HeEoEGdrCX_1xTk1yDqbSgebnXdA AT mail DOT gmail DOT com>
(djgpp AT delorie DOT com)
Subject: Re: dxe3gen patch
References: <CAA2C=vAsibDAvdNkdGMFC_HeEoEGdrCX_1xTk1yDqbSgebnXdA AT mail DOT gmail DOT com>
Errors-To: nobody AT delorie DOT com

I'm not opposed to environment variables, but they're a bit messy in a
unix environment (vs djgpp where we can ship djgpp.env with them ;).

If dxegen is built as a native djgpp program, it should be using the
native djgpp tools (gcc, ld, etc).  Yes?

If dxegen is cross built, it should note the target prefix (the
i586-pc-djgpp- part) and change the defaults for the tools to have
that prefix (i586-pc-djgpp-gcc, etc).  We try to do this with the
-DDXE_LD option.

If we do both of these correctly, most users shouldn't need to
override the defaults at all, and then it's not as big a deal that
they're controlled with environment variables (or cleaner but harder
command line options).

I don't think it's right for us to *rely* on environment variables to
provide correct *default* program names, though.


Also, your mailer is wrapping lines, which corrupted the patch in a
way that really confused me at first:

   /* Prepare the command line for ld */
   new_argv = (const char **)malloc((argc - 1 + NUMBER_OF_LINKER_ARGS
+ NUMBER_OF_ADDITIONAL_LOADED_LIBS + 2 + 1) * sizeof(char *));
+  process_env();
   process_args(argc, argv, new_argv);

Note the column for the wrapped '+' :-)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019