No subject


Tue Aug 4 17:24:50 PDT 2015


  5895  AC_DEFUN([AC_CXX_HAVE_EXT_HASH_MAP],
  5896  [AC_CACHE_CHECK(whether the compiler has ext/hash_map,
  5897  ac_cv_cxx_have_ext_hash_map,
  5898  [AC_REQUIRE([AC_CXX_NAMESPACES])
  5899    AC_LANG_SAVE
  5900    AC_LANG_CPLUSPLUS
  5901    AC_TRY_COMPILE([#include <ext/hash_map>
  5902  #ifdef HAVE_NAMESPACES
  5903  using namespace std;
  5904  #endif],[hash_map<int, int> t; return 0;],
  5905    ac_cv_cxx_have_ext_hash_map=std, ac_cv_cxx_have_ext_hash_map=no)
  5906    AC_TRY_COMPILE([#include <ext/hash_map>
  5907  #ifdef HAVE_NAMESPACES
  5908  using namespace __gnu_cxx;
  5909  #endif],[hash_map<int, int> t; return 0;],
  5910    ac_cv_cxx_have_ext_hash_map=gnu, ac_cv_cxx_have_ext_hash_map=no)
  5911    AC_LANG_RESTORE
  5912  ])
  5913  if test "$ac_cv_cxx_have_ext_hash_map" = std; then
  5914     AC_DEFINE(HAVE_STD_EXT_HASH_MAP,,[define if the compiler has
ext/hash_map])
  5915  fi
  5916  if test "$ac_cv_cxx_have_ext_hash_map" = gnu; then
  5917     AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,,[define if the compiler has
ext/hash_map])
  5918  fi
  5919  ])

The contents of the variable ac_cv_cxx_have_ext_hash_map will always be
overwritten with 'no' if the second AC_TRY_COMPILE test fails.
This is also true for the test for hash_set.
I discovered this when trying to compile with gcc-3.0 on Debian stable i386.

The workaround is to configure, then edit include/Config/config.h manually,
to have the correct definitions of HAVE_GNU_EXT_HASH_MAP and/or
HAVE_STD_EXT_HASH_MAP.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list