This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] SYSROOT subdir support


Oops!  I have removed the duplicated comment.  

The target_sysroot_subdir and target_sysroot_hdrs_subdir strings store the
results of processed specs, where target_system_root is a fixed path.  I
initialize the global subdir strings to 0, and if the spec is defined, I run
them through do_spec_2(), and assign a successful result to the global
variable.  Then I check against that global variable wherever I may need to
use it:

   if (target_sysroot_subdir)
      /* Do stuff with target_sysroot_subdir */

I could set it up in a function with static vars instead, if you think that is
better, or is there another way to do this that I am unaware of?  I went with
this because it was a small set of changes.  

LMK, and I will repost.

Cheers, and thanks.
GP

Matt Kraai <kraai@alumni.cmu.edu> said:

> On Tue, May 06, 2003 at 01:18:56PM -0000, gp@qnx.com wrote:
> > Anyone looking at this yet?  Jim Wilson is looking at the i386 QNX Neutrino 
> > patch which needs this patch, as the config/i386/nto.h defines 
> > SYSROOT_SUBDIR_SPEC.
> 
> The first hunk duplicates a comment.  I'd also suggest
> initializing target_sysroot_subdir and target_sysroot_hdrs_subdir
> like target_system_root.
> 
> Matt
> -- 
> Matt Kraai <kraai@alumni.cmu.edu>
> Debian GNU/Linux Peon
> 



-- 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]