X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=libgo%2Fconfigure.ac;h=f7b780be3b31ec68a3f073e0528a1cf85ad43f17;hb=d5b18b0b138cc89f02f972c51c35c3bf287c9693;hp=58cc045734cd69193a4bd5c125296694e781085f;hpb=ae135907ba2daedbd418e2005bbec7f5ac8fdea7;p=gcc.git diff --git a/libgo/configure.ac b/libgo/configure.ac index 58cc045734c..f7b780be3b3 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -11,7 +11,7 @@ AC_INIT(package-unused, version-unused,, libgo) AC_CONFIG_SRCDIR(Makefile.am) AC_CONFIG_HEADER(config.h) -libtool_VERSION=3:1:0 +libtool_VERSION=5:0:0 AC_SUBST(libtool_VERSION) AM_ENABLE_MULTILIB(, ..) @@ -503,7 +503,7 @@ AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv dl_iterate_phdr) AM_CONDITIONAL(HAVE_STRERROR_R, test "$ac_cv_func_strerror_r" = yes) AM_CONDITIONAL(HAVE_WAIT4, test "$ac_cv_func_wait4" = yes) -AC_CHECK_FUNCS(accept4 epoll_create1 faccessat fallocate fchmodat fchownat futimesat inotify_add_watch inotify_init inotify_init1 inotify_rm_watch mkdirat mknodat openat pipe2 renameat sync_file_range splice tee unlinkat unshare utimensat) +AC_CHECK_FUNCS(accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat openat pipe2 removexattr renameat setxattr sync_file_range splice tee unlinkat unshare utimensat) AC_TYPE_OFF_T AC_CHECK_TYPES([loff_t]) @@ -757,6 +757,68 @@ if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then [Define if setcontext clobbers TLS variables]) fi +AC_CACHE_CHECK([whether .eh_frame section should be read-only], +libgo_cv_ro_eh_frame, [ +libgo_cv_ro_eh_frame=no +echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c +if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then + if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then + libgo_cv_ro_eh_frame=yes + elif grep '.section.*eh_frame.*#alloc' conftest.c \ + | grep -v '#write' > /dev/null; then + libgo_cv_ro_eh_frame=yes + fi +fi +rm -f conftest.* +]) +if test "x$libgo_cv_ro_eh_frame" = xyes; then + AC_DEFINE(EH_FRAME_FLAGS, "a", + [Define to the flags needed for the .section .eh_frame directive.]) +else + AC_DEFINE(EH_FRAME_FLAGS, "aw", + [Define to the flags needed for the .section .eh_frame directive.]) +fi + +AC_CACHE_CHECK([if assembler supports GNU comdat group syntax], +libgo_cv_as_comdat_gnu, [ +echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s +if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then + libgo_cv_as_comdat_gnu=yes +else + libgo_cv_as_comdat_gnu=no +fi +]) +if test "x$libgo_cv_as_comdat_gnu" = xyes; then + AC_DEFINE(HAVE_AS_COMDAT_GAS, 1, + [Define if your assembler supports GNU comdat group syntax.]) +fi + +AC_CACHE_CHECK([assembler supports pc related relocs], +libgo_cv_as_x86_pcrel, [ +libgo_cv_as_x86_pcrel=yes +echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s +if $CC $CFLAGS -c conftest.s 2>&1 | $EGREP -i 'illegal|warning' > /dev/null; then + libgo_cv_as_x86_pcrel=no +fi +]) +if test "x$libgo_cv_as_x86_pcrel" = xyes; then + AC_DEFINE(HAVE_AS_X86_PCREL, 1, + [Define if your assembler supports PC relative relocs.]) +fi + +AC_CACHE_CHECK([assembler supports unwind section type], +libgo_cv_as_x86_64_unwind_section_type, [ +libgo_cv_as_x86_64_unwind_section_type=yes +echo '.section .eh_frame,"a",@unwind' > conftest.s +if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then + libgo_cv_as_x86_64_unwind_section_type=no +fi +]) +if test "x$libgo_cv_as_x86_64_unwind_section_type" = xyes; then + AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1, + [Define if your assembler supports unwind section type.]) +fi + AC_CACHE_SAVE if test ${multilib} = yes; then