Bug in ax_cflags_warn_all on DEC/Compaq Tru64

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bug in ax_cflags_warn_all on DEC/Compaq Tru64

Jeffrey Armstrong
I've run across a bug in the script ax_cflags_warn_all.m4 when testing on
Tru64 (OSF/1) when using the Compaq C (previously Digital C) compiler.
The script is meant to determine which flags to use to enable all
warnings.  On the platform described, it always selects the Intel flags
for a very odd reason.

Compaq C, when it encounters an unknown flag starting with either "W" or
"w," passes the flag to the linker when linking is requested.  If the user
is just compiling, no action is taken.  Therefore, the C compiler will
accept the flags "-warn all" which is Intel-specific.  However, if linking
were requested, an error is raised correctly.

In order to properly test the Compaq C compiler's accepted flag, linking
has to be tested as well.  Based on the most up-to-date version of
ax_cflags_warn_all.m4, changing lines 81-82 from:

AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
                      [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])

to:

AC_LINK_IFELSE([AC_LANG_PROGRAM],
                      [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])

fixes the problem for Compaq C without actually causing any further
problems on other compilers.  A simple patch is included.

I realize Compaq C is a niche and obsolete system at this point, but the
fix is neccesary to support the compiler.

I appreciate your time, and please let me know if I can provide any
further information.


Jeff Armstrong - [hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

ax_cflags_warn_all.ccc.patch (658 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bug in ax_cflags_warn_all on DEC/Compaq Tru64

Mike Frysinger
On 26 Jun 2016 13:29, Jeffrey Armstrong wrote:
> I've run across a bug in the script ax_cflags_warn_all.m4 when testing on

all the ax_* files are maintained in a diff GNU project.  this autoconf
list is just for the core autoconf package itself and not the third party
library projects.  in this case, the GNU Autoconf Archive project is the
one you seek:
        https://www.gnu.org/software/autoconf-archive/
        [hidden email]

if you have a patch already, you can submit a PR directly:
        https://github.com/peti/autoconf-archive
-mike

signature.asc (836 bytes) Download Attachment
Loading...