autoconf-archive-maintainers
[Top][All Lists]
Advanced

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

[patch #9673] Use AX_COMPILER_VENDOR for more robust selection of compil


From: John Zaitseff
Subject: [patch #9673] Use AX_COMPILER_VENDOR for more robust selection of compiler flags
Date: Mon, 6 Aug 2018 00:59:14 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

URL:
  <http://savannah.gnu.org/patch/?9673>

                 Summary: Use AX_COMPILER_VENDOR for more robust selection of
compiler flags
                 Project: GNU Autoconf Archive
            Submitted by: zaitseff
            Submitted on: Mon 06 Aug 2018 02:59:13 PM AEST
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The AX_FLAGS_WARN_ALL macro is a very useful and simple one for adding
reasonable compiler warnings, as compared with the full machinery of
AX_COMPILER_FLAGS_CFLAGS and friends.  It also works with multiple compilers,
unlike AX_COMPILER_FLAGS_CFLAGS which is tailored to GCC-emulating ones.

Unfortunately, AX_FLAGS_WARN_ALL uses a heuristic to determine which compiler
flags to use--and that heuristic fails on many compilers.

This series of patches reworks AX_FLAGS_WARN_ALL to use AX_COMPILER_VENDOR,
which is a far more robust way to select appropriate flags.  All flags in the
old macro have been transferred across, with bug fixes added for current Intel
compilers.  The patches depend on Patch #9671 to be applied first.

One function/file is added: AX_PREPEND_FLAG, which allows flags to be added to
the front of CFLAGS, etc., to allow the user to override AX_FLAGS_WARN_ALL's
selection.

I have tested this series of patches with my Star Traders game at
https://www.zap.org.au/software/trader -- see the Git repository at
https://www.zap.org.au/gitweb/trader.git .

If you prefer, I can combine all patches in this series into a single patch.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 06 Aug 2018 02:59:13 PM AEST  Name:
0001-ax_cflags_warn_all.m4-Bump-version-number-and-add-ne.patch  Size: 1KiB  
By: zaitseff
Patches 1 to 4 of eight total
<http://savannah.gnu.org/patch/download.php?file_id=44721>
-------------------------------------------------------
Date: Mon 06 Aug 2018 02:59:13 PM AEST  Name:
0002-ax_cflags_warn_all.m4-Rewrite-AX_FLAGS_WARN_ALL-to-u.patch  Size: 5KiB  
By: zaitseff
Patches 1 to 4 of eight total
<http://savannah.gnu.org/patch/download.php?file_id=44722>
-------------------------------------------------------
Date: Mon 06 Aug 2018 02:59:13 PM AEST  Name:
0003-ax_cflags_warn_all.m4-Nicely-indent-remaining-macros.patch  Size: 1KiB  
By: zaitseff
Patches 1 to 4 of eight total
<http://savannah.gnu.org/patch/download.php?file_id=44723>
-------------------------------------------------------
Date: Mon 06 Aug 2018 02:59:13 PM AEST  Name:
0004-ax_cflags_warn_all.m4-Rewrite-the-documentation-to-p.patch  Size: 3KiB  
By: zaitseff
Patches 1 to 4 of eight total
<http://savannah.gnu.org/patch/download.php?file_id=44724>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?9673>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]