[csw-maintainers] compiler vs compiler

Philip Brown phil at bolthole.com
Thu Mar 17 03:02:42 CET 2011


On Wed, Mar 16, 2011 at 5:50 PM, Geoff Davis <gadavis at opencsw.org> wrote:
> In most cases, the compilers are also installed by the sysadmin. Therefore, the sysadmin is going to have to intervene no matter what.


Errr.. what?  what you said doesnt make sense.  how does the sysadmin
going to "have to intervene", if the build tool is autosensing?

for 99% percent of all development use, building tools tends to be
some variant of

./configure blah blah blah

configure will automatically set CC to SOMETHING, if it is unset.

So if our side auto-switches based on CC, where is this supposed
intervention needed?

I am coming from the standpoint of, "the generic build environment is
already in place. the end user wants to choose one of the already
installed compilers, that they are already using, to compile something
that needs one of our packages"


> I don't see the need to jump through a bunch of hoops for an edge case of an edge case

That is another issue. If people want to decide based on that, that is
reasonable.
I just object to people making invalid claims about use, rather than
just being honest and saying, "I dont want to do the extra work".

And really, the extra work is pretty #@$@# trivial.About the same
amount of work compared to setting up alternatives to be the front
end.
We could actually make a generic template for this. But here's a quick hackjob.

If someone is already going to the trouble of providing something for
"alternatives" to point at, they already have some equivalent of
bin/compile.cc
bin/compile.gcc

So then instead of providing
/opt/csw/bin/bin/compile  (alternatives set symlink to compile.XX)

just provide as /opt/csw/bin/compile

-----------------------
#!/bin/ksh -p

BUILD_EXEC=/opt/csw/bin/compile.cc
case "$CC" in
  gcc|*/gcc)
     BUILD_EXEC=/opt/csw/bin/compile.gcc
esac

exec $BUILD_EXEC "$@"

--------------------

There. done.


More information about the maintainers mailing list