Yea, that's a good point... the original reason that libelf was put where it
is was so that a single copy of the library would work for all the binaries
in the build directory.  This strategy relied on the assumption that
everything in the build directory would be built for the same platform.
What we're seeing now is that we're violating that assumption with
BATCH_CMD.  You could also violate that assumption by setting CC to some
cross-compiler for a particular build (though I don't think anyone's tried
this).

So our basic choices are either to stop violating that assumption (e.g., by
moving the regressions to zelf) or to get rid of the assumption (by building
a separate libelf for each binary).  I'm fine with either one, though if we
do the latter and end up having some more substantial library that we want
to share across binaries then it will be very hard to do that.  I suppose
that's not very likely though.

  we should move this code:
> >
> >   # Do this after we save setting back, or else we'll tack on an
> >   # extra 'qdo' every time we run scons.
> >   if env['BATCH']:
> >       env['CC']  = env['BATCH_CMD'] + ' ' + env['CC']
> >       env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX']
> >
> >
> > much higher in the file and outside of the for loop.
> >
>
Note that the comment describes why doing this naively doesn't work.

Steve
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to