Re: mico-c++ linking problems (Was: Where are MICO rpms ?)



Shawn> In the mico-c++ wrapper (it is a very simple shell script) you
Shawn> will see it adds -O0 to g++.  It seems that g++ takes the
Shawn> greater option and ignored the lower; thus, although mico-c++
Shawn> is trying to work around this bug in g++, configure is messing
Shawn> up the work around.

gcc takes the last option from the command line.  mico-c++ puts -O0
before `$*'.  -O2 is in the default flags (as determined by configure)
if you didn't set them explicitly and so the command line ends up
"... -O ... -O0 ... -O2".  At least, that's what happens for me.

Interestingly, this isn't the only weirdness in mico-c++.  It uses
this bizarre circumlocution:

eval "c++ -I/usr/local/include -O   -fhandle-exceptions -O0 $*"
exit $?


This is simpler and probably more correct (if an argument has a space
or quote in it):

exec c++  -I/usr/local/include -O   -fhandle-exceptions -O0 "$@"

(If you're concerned about legacy systems you have to use ${1+"$@"} as
the last argument)

Tom



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]