Mercurial > hg > CbC > CbC_gcc
diff libbacktrace/configure.ac @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line diff
--- a/libbacktrace/configure.ac Thu Oct 25 07:37:49 2018 +0900 +++ b/libbacktrace/configure.ac Thu Feb 13 11:34:05 2020 +0900 @@ -1,5 +1,5 @@ # configure.ac -- Backtrace configure script. -# Copyright (C) 2012-2018 Free Software Foundation, Inc. +# Copyright (C) 2012-2020 Free Software Foundation, Inc. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are @@ -29,7 +29,6 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -AC_PREREQ(2.64) AC_INIT(package-unused, version-unused,, libbacktrace) AC_CONFIG_SRCDIR(backtrace.h) AC_CONFIG_HEADER(config.h) @@ -79,6 +78,9 @@ "") AC_MSG_ERROR([can't build without awk]) ;; esac +AC_CHECK_PROG(DWZ, dwz, dwz) +AM_CONDITIONAL(HAVE_DWZ, test "$DWZ" != "") + LT_INIT AM_PROG_LIBTOOL @@ -257,6 +259,7 @@ *) elfsize=unused esac AC_DEFINE_UNQUOTED([BACKTRACE_ELF_SIZE], [$elfsize], [ELF size: 32 or 64]) +AM_CONDITIONAL(HAVE_ELF, test "$FORMAT_FILE" = "elf.lo") # XCOFF defines. xcoffsize= @@ -290,10 +293,8 @@ # simply assume that if we have mman.h, we have mmap. have_mmap=yes case "${host}" in - spu-*-*|*-*-msdosdjgpp) - # The SPU does not have mmap, but it has a sys/mman.h header file - # containing "mmap_eaddr" and the mmap flags, confusing the test. - # DJGPP also has sys/man.h, but no mmap + *-*-msdosdjgpp) + # DJGPP has sys/man.h, but no mmap have_mmap=no ;; esac else @@ -305,12 +306,12 @@ ALLOC_FILE=alloc.lo else VIEW_FILE=mmapio.lo - AC_PREPROC_IFELSE([ + AC_PREPROC_IFELSE([AC_LANG_SOURCE([ #include <sys/mman.h> #if !defined(MAP_ANONYMOUS) && !defined(MAP_ANON) #error no MAP_ANONYMOUS #endif -], [ALLOC_FILE=mmap.lo], [ALLOC_FILE=alloc.lo]) +])], [ALLOC_FILE=mmap.lo], [ALLOC_FILE=alloc.lo]) fi AC_SUBST(VIEW_FILE) AC_SUBST(ALLOC_FILE) @@ -330,12 +331,6 @@ # When built as a GCC target library, we can't do a link test. AC_EGREP_HEADER([dl_iterate_phdr], [link.h], [have_dl_iterate_phdr=yes], [have_dl_iterate_phdr=no]) - case "${host}" in - *-*-solaris2.10*) - # Avoid dl_iterate_phdr on Solaris 10, where it is in the - # header file but is only in -ldl. - have_dl_iterate_phdr=no ;; - esac else AC_CHECK_FUNC([dl_iterate_phdr], [have_dl_iterate_phdr=yes], [have_dl_iterate_phdr=no]) @@ -367,7 +362,6 @@ if test -n "${with_target_subdir}"; then case "${host}" in *-*-mingw*) have_fcntl=no ;; - spu-*-*) have_fcntl=no ;; *) have_fcntl=yes ;; esac else @@ -414,7 +408,7 @@ [libgo_cv_lib_pthread], [CFLAGS_hold=$CFLAGS CFLAGS="$CFLAGS -pthread" -AC_COMPILE_IFELSE([[int i;]], +AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], [libgo_cv_lib_pthread=yes], [libgo_cv_lib_pthread=no]) CFLAGS=$CFLAGS_hold]) @@ -426,6 +420,17 @@ AM_CONDITIONAL(HAVE_PTHREAD, test "$libgo_cv_lib_pthread" = yes) +dnl Test whether the compiler supports the -gdwarf-5 option. +AC_CACHE_CHECK([whether -gdwarf-5 is supported], +[libbacktrace_cv_lib_dwarf5], +[CFLAGS_hold=$CFLAGS +CFLAGS="$CFLAGS -gdwarf-5" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], +[libbacktrace_cv_lib_dwarf5=yes], +[libbacktrace_cv_lib_dwarf5=no]) +CFLAGS=$CFLAGS_hold]) +AM_CONDITIONAL(HAVE_DWARF5, test "$libbacktrace_cv_lib_dwarf5" = yes) + AC_CHECK_LIB([z], [compress], [AC_DEFINE(HAVE_ZLIB, 1, [Define if -lz is available.])]) AM_CONDITIONAL(HAVE_ZLIB, test "$ac_cv_lib_z_compress" = yes) @@ -443,6 +448,7 @@ AC_ARG_VAR(OBJCOPY, [location of objcopy]) AC_CHECK_PROG(OBJCOPY, objcopy, objcopy,) +AC_CHECK_PROG(READELF, readelf, readelf) AC_CACHE_CHECK([whether objcopy supports debuglink], [libbacktrace_cv_objcopy_debuglink], [if test -n "${with_target_subdir}"; then @@ -470,6 +476,7 @@ fi AC_CONFIG_FILES(Makefile backtrace-supported.h) +AC_CONFIG_FILES(install-debuginfo-for-buildid.sh, chmod +x install-debuginfo-for-buildid.sh) # We need multilib support, but only if configuring for the target. AC_CONFIG_COMMANDS([default],