mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
build: beware of Clang++ not supporting POSIXLY_CORRECT
* m4/c-working.m4 (BISON_LANG_COMPILER_POSIXLY_CORRECT): New. (BISON_C_COMPILER_POSIXLY_CORRECT): Use it. For consistency with C++, also define BISON_C_WORKS. * m4/cxx.m4 (BISON_CXX_COMPILER_POSIXLY_CORRECT): New. * configure.ac: Use it. * tests/atlocal.in: Get its result. Propagate properly CXX values when used to compile C. When POSIXLY_CORRECT, adjust BISON_C_WORKS and BISON_CXX_WORKS. * tests/local.at (AT_COMPILE): Use BISON_C_WORKS.
This commit is contained in:
@@ -600,9 +600,7 @@ m4_define([AT_QUELL_VALGRIND],
|
||||
# otherwise pass "-c"; this is a hack. The default SOURCES is OUTPUT
|
||||
# with trailing .o removed, and ".c" appended.
|
||||
m4_define([AT_COMPILE],
|
||||
[AT_CHECK([case $POSIXLY_CORRECT_IS_EXPORTED:$C_COMPILER_POSIXLY_CORRECT in
|
||||
true:false) echo 'cannot compile properly with POSIXLY_CORRECT' && exit 77;;
|
||||
esac])
|
||||
[AT_CHECK([$BISON_C_WORKS], 0, ignore, ignore)
|
||||
AT_CHECK(m4_join([ ],
|
||||
[$CC $CFLAGS $CPPFLAGS],
|
||||
[m4_bmatch([$1], [[.]], [-c], [$LDFLAGS])],
|
||||
|
||||
Reference in New Issue
Block a user