|
From: Jean-Francois P. <pan...@di...> - 2002-01-13 08:17:38
|
I tried compiling under IRIX 6.5 with the SGI MIPSpro
C compiler. I first ran into a problem with the configure
script. The following section:
my_cc_switch=
# AC_MSG_CHECKING(for -KPIC as C compilation switch)
cat > conftest.c <<__EOF
int main() { return 0;}
__EOF
my_c='${CC-cc} $CFLAGS -KPIC conftest.c -o conftest${ac_exeext}'
(eval echo configure:2574: \"$my_c\") 1>&5
(eval $my_c 1>/dev/null 2>conftest.log)
cat conftest.log 1>&5
if grep <conftest.log "option" >/dev/null
then
my_cc_switch="$my_cc_switch"
# AC_MSG_RESULT(no)
else
my_cc_switch="-KPIC"
# AC_MSG_RESULT(yes)
fi
rm -rf conftest*
tries to guess whether the -fpic or -KPIC flag should be used
by looking for the word "option" in the output of the compiler.
That's not what MIPSpro C says when presented with -fpic:
$ cc -c -fpic /tmp/foo.c
cc ERROR parsing -fpic: unknown flag
I'm not sure what the solution is here, but this test seems
to be pretty gcc-specific.
Apart from that, the rest of the code compiled fine (I did not
try running it yet), but MIPSpro did generate a bunch of
warnings. Most of them were about unused variables, but there
were a couple of "interesting" ones. Is there a mechanism
for submitting patches, and would there be an interest
for warning cleanup patches?
Thanks,
JF Panisset
|