summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2005-10-15 20:07:00 +0200
committerNiels Möller <nisse@lysator.liu.se>2005-10-15 20:07:00 +0200
commitf8231569bc184dfb5b1e9839827d7ccc4bd755cf (patch)
tree0e144968df38c13ce53ae5f568c5141133cbedf2
parent4f4391f4fdb5ea95457b8934df846e45ff7c065c (diff)
downloadnettle-f8231569bc184dfb5b1e9839827d7ccc4bd755cf.tar.gz
* configure.ac (ASM_ELF_STYLE): Check for %function and #function,
but not for @function. (ASM_TYPE_FUNCTION): New substituted variable. Rev: src/nettle/configure.ac:1.67
-rw-r--r--configure.ac50
1 files changed, 32 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index caee425f..57e27b80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,6 +182,7 @@ AC_SUBST([CCPIC_MAYBE])
ASM_SYMBOL_PREFIX=''
ASM_ELF_STYLE='no'
+ASM_TYPE_FUNCTION=''
ASM_MARK_NOEXEC_STACK=''
if test x$enable_assembler = xyes ; then
@@ -227,36 +228,49 @@ EOF
ASM_MARK_NOEXEC_STACK='.section .note.GNU-stack,"",@progbits'
fi
- # With inspiration from GMP_TRY_ASSEMBLE
- AC_CACHE_CHECK([for ELF-style pseudo-ops],
- nettle_cv_asm_elf_style_pseudo_ops,
- [cat >conftest.s <<EOF
+ AC_CACHE_CHECK([for ELF-style .type,%function pseudo-ops],
+ [nettle_cv_asm_type_percent_function],
+ [GMP_TRY_ASSEMBLE([
.text
.globl foo
-.type foo,@function
+.type foo,%function
foo:
.Lend:
.size foo, .Lend - foo
-EOF
- nettle_assemble="$CC $CFLAGS $CPPFLAGS -c conftest.s >conftest.out 2>&1"
- if AC_TRY_EVAL(nettle_assemble); then
- cat conftest.out >&AC_FD_CC
- nettle_cv_asm_elf_style_pseudo_ops=yes
- else
- cat conftest.out >&AC_FD_CC
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.s >&AC_FD_CC
- nettle_cv_asm_elf_style_pseudo_ops=no
- fi
- rm -f conftest.*])
- if test x$nettle_cv_asm_elf_style_pseudo_ops = xyes ; then
+],
+ [nettle_cv_asm_type_percent_function=yes],
+ [nettle_cv_asm_type_percent_function=no])])
+
+dnl Needs double quote for the # character
+ AC_CACHE_CHECK([[for ELF-style .type,#function pseudo-ops]],
+ [nettle_cv_asm_type_hash_function],
+ [GMP_TRY_ASSEMBLE([
+.text
+.globl foo
+.type foo,#function
+foo:
+.Lend:
+
+.size foo, .Lend - foo
+],
+ [nettle_cv_asm_type_hash_function=yes],
+ [nettle_cv_asm_type_hash_function=no])])
+
+ if test x$nettle_cv_asm_type_percent_function = xyes ; then
ASM_ELF_STYLE='yes'
+ ASM_TYPE_FUNCTION='%function'
+ else
+ if test x$nettle_cv_asm_type_hash_function = xyes ; then
+ ASM_ELF_STYLE='yes'
+ ASM_TYPE_FUNCTION='#function'
+ fi
fi
fi
AC_SUBST(ASM_SYMBOL_PREFIX)
AC_SUBST(ASM_ELF_STYLE)
+AC_SUBST(ASM_TYPE_FUNCTION)
AC_SUBST(ASM_MARK_NOEXEC_STACK)
AC_SUBST(SHLIBCFLAGS)