diff options
author | David S. Miller <devnull@localhost> | 2013-04-10 22:42:33 +0200 |
---|---|---|
committer | David S. Miller <devnull@localhost> | 2013-04-10 22:42:33 +0200 |
commit | 5355906670529c8696df3b3c9770bfe5ecea297d (patch) | |
tree | c33501ba233e5aa892e9202a2545a3247b20ea61 /acinclude.m4 | |
parent | 52056e2549d613a595279e6235107c0665bb59e3 (diff) | |
download | gmp-5355906670529c8696df3b3c9770bfe5ecea297d.tar.gz |
Sparc symbol handling overhaul.
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 508bdacdc..225afe20d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3090,6 +3090,57 @@ GMP_DEFINE_RAW(["define(<HAVE_REGISTER>,<$gmp_cv_asm_sparc_register>)"]) ]) +dnl GMP_ASM_SPARC_GOTDATA +dnl ---------------------- +dnl Determine whether the assembler accepts gotdata relocations. +dnl +dnl See also mpn/sparc32/sparc-defs.m4 which uses the result of this test. + +AC_DEFUN([GMP_ASM_SPARC_GOTDATA], +[AC_REQUIRE([GMP_ASM_TEXT]) +AC_CACHE_CHECK([if the assembler accepts gotdata relocations], + gmp_cv_asm_sparc_gotdata, +[GMP_TRY_ASSEMBLE( +[ $gmp_cv_asm_text + .text + sethi %gdop_hix22(symbol), %g1 + or %g1, %gdop_lox10(symbol), %g1 +], +[gmp_cv_asm_sparc_gotdata=yes], +[gmp_cv_asm_sparc_gotdata=no])]) + +GMP_DEFINE_RAW(["define(<HAVE_GOTDATA>,<$gmp_cv_asm_sparc_gotdata>)"]) +]) + + +dnl GMP_ASM_SPARC_SHARED_THUNKS +dnl ---------------------- +dnl Determine whether the assembler supports all of the features +dnl necessary in order to emit shared PIC thunks on sparc. +dnl +dnl See also mpn/sparc32/sparc-defs.m4 which uses the result of this test. + +AC_DEFUN([GMP_ASM_SPARC_SHARED_THUNKS], +[AC_REQUIRE([GMP_ASM_TEXT]) +AC_CACHE_CHECK([if the assembler can support shared PIC thunks], + gmp_cv_asm_sparc_shared_thunks, +[GMP_TRY_ASSEMBLE( +[ $gmp_cv_asm_text + .section .text.__sparc_get_pc_thunk.l7,"axG",@progbits,__sparc_get_pc_thunk.l7,comdat + .weak __sparc_get_pc_thunk.l7 + .hidden __sparc_get_pc_thunk.l7 + .type __sparc_get_pc_thunk.l7, #function +__sparc_get_pc_thunk.l7: + jmp %o7+8 + add %o7, %l7, %l7 +], +[gmp_cv_asm_sparc_shared_thunks=yes], +[gmp_cv_asm_sparc_shared_thunks=no])]) + +GMP_DEFINE_RAW(["define(<HAVE_SHARED_THUNKS>,<$gmp_cv_asm_sparc_shared_thunks>)"]) +]) + + dnl GMP_C_ATTRIBUTE_CONST dnl --------------------- |