at master 1.6 kB view raw
1As originally implemented, the error message check 2described in the configure script 3breaks detection of Ada compiler support on x86_64-darwin, 4because the assembler in the version of cctools currently used 5unconditionally emits a deprecation message to stdout, 6with no way to disable it. 7 8Furthermore, GCC 3.4 was the minimum version needed to build GNAT 9as far back as GCC 4.4 (see the GCC git repo, tags/releases/gcc-4.4.0, 10gcc/doc/install.texi, lines 2052-2053 [1]); 11GCC 3.4 is newer than any of the broken GCC versions 12that the configure script works around 13(see the part of the comment in the configure script 14before the context in the patch below), 15and GCC 4.4 is older than any GCC that Nix currently packages (GCC 4.8). 16 17We therefore choose to not check for error messages, 18and just check for an error code. 19There's no harm in still checking for an object file being created, though. 20 21[1]: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/doc/install.texi;h=6bdfbece981f7fb6c26da672d45e5d3ba7879c69;hb=b7fc996728085c0591ea7c5d0e1c84a8f6a29bd8#l2052 22--- a/configure 2022-08-19 18:09:52.000000000 +1000 23+++ b/configure 2022-12-26 17:30:49.000000000 +1100 24@@ -5622,8 +5622,7 @@ 25 # Other compilers, like HP Tru64 UNIX cc, exit successfully when 26 # given a .adb file, but produce no object file. So we must check 27 # if an object file was really produced to guard against this. 28-errors=`(${CC} -c conftest.adb) 2>&1 || echo failure` 29-if test x"$errors" = x && test -f conftest.$ac_objext; then 30+if ${CC} -c conftest.adb && test -f conftest.$ac_objext; then 31 acx_cv_cc_gcc_supports_ada=yes 32 fi 33 rm -f conftest.*