Bug 3397 - Misconfiguration of GCC "-Wno-unused" flag for Tru64 native compiler
: Misconfiguration of GCC "-Wno-unused" flag for Tru64 native compiler
Status: RESOLVED FIXED
: GRAM
wsrf gram clients
: 4.0.0
: DEC OSF/1
: P3 normal
: 4.0.1
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-05-23 15:19 by
Modified: 2005-08-03 17:20 (History)


Attachments
patch to configure.in to generate an executable for -Wno-unused test (1.98 KB, patch)
2005-05-23 15:20, Jeff Forys
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-05-23 15:19:45
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).
------- Comment #1 From 2005-05-23 15:20:39 -------
Created an attachment (id=621) [details]
patch to configure.in to generate an executable for -Wno-unused test
------- Comment #2 From 2005-07-14 16:48:04 -------
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.