Bugzilla – Bug 3397
Misconfiguration of GCC "-Wno-unused" flag for Tru64 native compiler
Last modified: 2005-08-03 17:20:59
You need to log in before you can comment on or make changes to this bug.
The Tru64 native compiler parses the "-Wno-unused" flag as '-W' (pass arguments to compiler passes denoted by the letters 'n', 'o', 'u', 's', 'e', 'd'). When the configure script compiles the "int main(void) { return 0; }" test program (using "cc -Wno-unused -c conftest.c"), it is successful. As a result, configure assumes the compiler will accept the "-Wno-unused" flag. However, when actually generating an executable, the Tru64 native compiler fails and spits out the error: > Invalid flag usage: Wno-unused, -Wx,-option must appear after -_SYSTYPE_SVR4 > ld: Usage: ld [options] file [...] The fix here is to ask the configure script to generate an executable -- which will fail on Tru64 -- so that it is discovered that the Tru64 compiler does not really accept the "-Wno-unused" flag. The only configure script that checks for "-Wno-unused" is in "source-trees/ws-gram/client/c/source/configure.in". For this package, I've included a patch that requires an executable be generated. That is, I've changed the test compile from: $CC -Wno-unused -c conftest.c to: $CC -Wno-unused conftest.c -o conftest (and then remove both "conftest.c" and "conftest" afterward).
Created an attachment (id=621) [details] patch to configure.in to generate an executable for -Wno-unused test
Thanks Jeff! This patch has been applied to the globus_4_0_branch and HEAD in CVS. It will be in the 4.0.1 release and future releases.