patchGNU Autoconf Archive - Patches: patch #8950, Fix AX_CXX_COMPILE_STDCXX for...

 
 

patch #8950: Fix AX_CXX_COMPILE_STDCXX for "noext" mode

Submitter:  Neil Conway <neilconway>
Submitted:  Thu 17 Mar 2016 06:43:48 PM UTC
 
Priority:  5 - Normal Status:  Wont Do
Assigned to:  simons Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Wed 13 Apr 2016 08:09:25 AM UTC, comment #5: 

What is the status of this submission?

Peter Simons <simons>
Project Administrator
Sat 19 Mar 2016 01:39:34 AM UTC, comment #4: 

Hey Neil. Here's the excerpt from my configure.ac:

    # C++ preprocessor...
    AC_PROG_CXXCPP

    # C++14 compiler with strict conformance required...
    AC_PROG_CXX
    AX_CXX_COMPILE_STDCXX_14([noext],[mandatory])

Script works the same with git head (as in emits the same warning about the pre-processor).

Kip <kip>
Sat 19 Mar 2016 12:19:59 AM UTC, comment #3: 

@Kip: Hmmm. Seems like the g++ invocation isn't using $(CXX)? Can you post the M4 source that generates that part of your configure script? And just to make sure, your script works correctly using the most recent version of the macro without the proposed patch, right?

Neil Conway <neilconway>
Fri 18 Mar 2016 10:13:40 PM UTC, comment #2: 

I may have spoken too soon:

...
configure:9924: checking cfenv usability
configure:9924: g++ -std=c++14 -c -g3 -mfpmath=sse -msse -msse2  conftest.cpp >&5
configure:9924: $? = 0
configure:9924: result: yes
configure:9924: checking cfenv presence
configure:9924: g++ -E  conftest.cpp
In file included from /usr/include/c++/5/cfenv:35:0,
                 from conftest.cpp:32:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
configure:9924: $? = 1
configure: failed program was:
| /* confdefs.h */
...
| /* end confdefs.h.  */
| #include <cfenv>
configure:9924: result: no
configure:9924: WARNING: cfenv: accepted by the compiler, rejected by the preprocessor!
configure:9924: WARNING: cfenv: proceeding with the compiler's result
...

Kip <kip>
Fri 18 Mar 2016 09:02:08 PM UTC, comment #1: 

Thank you kindly for your work, Neil. I can confirm that your patch works for my project.

Kip <kip>
Thu 17 Mar 2016 06:43:48 PM UTC, original submission:  

AX_CXX_COMPILE_STDCXX first checks to see if the compiler can build the test program without any special flags. If the build succeeds, CXX is not modified. This is incorrect if:

(a) the user requests "noext" mode
(b) the compiler defaults to supporting GNU extensions

(b) is true of some compilers: notably GCC6 defaults to "-std=g++14". The current behavior is broken even if "noext" isn't specified if the user wants to enable C++11 features but not C++14 ones.

Neil Conway <neilconway>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by simons (Updated the item)
  • -email is unavailable- added by kip (Posted a comment)
  • -email is unavailable- added by neilconway (Submitted the item)
  • -email is unavailable- added by neilconway
  •  

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-06 simons StatusIn Progress Wont Do
        Open/ClosedOpen Closed
    2016-03-20 simons StatusNone In Progress
        Assigned toNone simons
    2016-03-17 neilconway Attached File- Added cxx_compile_stdcxx_noext_gcc6.patch, #36673
        Carbon-Copy- Added -email is unavailable-

    Back to the top


    Powered by Savane 3.9