[Distutils] Re: order on link

Paul F. Dubois dubois1@llnl.gov
Thu, 30 Sep 1999 19:10:02 -0700

> Hmmm, so I am.  That's a bug.  The fix is trivial: see lines 225-226 of
> distutils/unixccompiler.py -- just change the order of 'objects' and
> 'lib_opts'.

That did the trick!

> Do you know if it ever matters where "-o" comes in?
> Currently, I have it last, and it could easily move too.
Don't know. I doubt it. I did once run into a C compiler that had no -o
option at all, however. You had to make the object file in the same
directory as the source.

> Will a similar change have to be made to MSVCCompiler -- i.e is it as
> sensitive to order of link options as Unix compiler are?

No idea. This sensitivity varies among Unix compilers, too. That leads to
the nonsense of having to list a library twice.

I'm too jet lagged to think about the other things you wrote.

The package is useful to us even in its new state. Thanks.

The .o's get left in the directory with setup.py; should be squirreled away
someplace else. To allow for building for mutiple platforms it would be nice
if the build products went into a platform-specific directory, eg.
build/linux2. That way when you make a bug fix on one platform you don't
have to blow everything away to do the next one.