diff options
author | Trent Nelson <trent@trent.me> | 2012-12-13 06:46:39 (GMT) |
---|---|---|
committer | Trent Nelson <trent@trent.me> | 2012-12-13 06:46:39 (GMT) |
commit | 15daa35d32c930aca2038586aae2d821d711b0bb (patch) | |
tree | 80aed18a56ea6af6dfa1a05d99ba5f55d421cbf0 /configure | |
parent | 64ab35e11d9e2ad55f8a9ee69515f8901e184b59 (diff) | |
download | cpython-15daa35d32c930aca2038586aae2d821d711b0bb.zip cpython-15daa35d32c930aca2038586aae2d821d711b0bb.tar.gz cpython-15daa35d32c930aca2038586aae2d821d711b0bb.tar.bz2 |
IRIX: force MIPSpro to treat #errors as errors, not warnings.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -3238,6 +3238,39 @@ then (it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5 fi +if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then + # Normally, MIPSpro CC treats #error directives as warnings, which means + # a successful exit code is returned (0). This is a problem because IRIX + # has a bunch of system headers with this guard at the top: + # + # #ifndef __c99 + # #error This header file is to be used only for c99 mode compilations + # #else + # + # When autoconf tests for such a header, like stdint.h, this happens: + # + # configure:4619: cc -c conftest.c >&5 + # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5 + # #error directive: This header file is to be used only for c99 mode + # compilations + # + # #error This header file is to be used only for c99 mode compilations + # ^ + # + # configure:4619: $? = 0 + # configure:4619: result: yes + # + # Therefore, we use `-diag_error 1035` to have the compiler treat the + # warning as an error, which causes cc to return a non-zero result, + # which autoconf can interpret correctly. + CFLAGS="$CFLAGS -diag_error 1035" + # Whilst we're here, we might as well make sure CXX defaults to something + # sensible if we're not using gcc. + if test -z "$CXX"; then + CXX="CC" + fi +fi + # If the user set CFLAGS, use this instead of the automatically # determined setting preset_cflags="$CFLAGS" |