leif wrote:
Bill Hart wrote:
I don't know how to fix that.
The line in question is:
.section .data.rel.ro.local,"aw",@progbits
Ahem, that's an *ELF* section name (along with its attributes)...
It is complaining that .data.rel.ro.local is too long.
Yeah, we're on Darwin, and Mach-O section names are limited to 16
characters.
The section name declaration comes from JUMPTABSECT, which is hardcoded
(btw. twice; same for JMPENT) into mpn/x86_64/x86_64-defs.m4; and
unfortunately there's no macho.m4 / darwin.m4 or elf.m4 at all in that
folder.
If I
--- config.m4.orig 2014-04-05 17:06:55.000000000 -0700
+++ config.m4 2014-04-05 17:07:49.000000000 -0700
@@ -28,6 +28,7 @@
ifdef(`__CONFIG_M4_INCLUDED__',,`
include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4')
include_mpn(`x86_64/x86_64-defs.m4')
+define(`JUMPTABSECT',RODATA)
define_not_for_expansion(`HAVE_ABI_64')
define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN')
define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')
'make' succeeds and all tests pass (with both Apple's GCC 4.2.1 as well
as FSF's GCC 4.7.3).
(RODATA gets defined by 'configure', and here expands to '.text'.)
So you'd have to weave that into 'configure', either by [re]defining
JUMPTABSECT (on Darwin x86_64) directly there, or defining some macro
telling m4 that we're on Darwin, and ifdef'ing in x86_64-defs.m4 (also
removing the redundant second definition ;-) ). Or let 'configure'
include some mpn/x86_64/darwin.m4 (optionally also some elf.m4 on ELF
systems), and properly define the platform-dependent macros there. (Or
just define DARWIN in darwin.m4, again letting 'configure' include it,
and special-case on that macro in the generic x86_64-defs.m4.)
I think a macro definition or macro file inclusion would perfectly fit
here (configure.ac lines 2826--2858, relevant is only the ABI=64 branch):
X86_PATTERN | X86_64_PATTERN)
GMP_ASM_ALIGN_FILL_0x90
case $ABI in
32)
GMP_INCLUDE_MPN(x86/x86-defs.m4)
GMP_ASM_COFF_TYPE
GMP_ASM_X86_GOT_UNDERSCORE
GMP_ASM_X86_SHLDL_CL
case $enable_profiling in
prof | gprof) GMP_ASM_X86_MCOUNT ;;
esac
case $host in
*-*-darwin*)
OBJECT_FORMAT="-f macho32" ;;
*)
OBJECT_FORMAT="-f elf32" ;;
esac
;;
64)
case $host in
*-*-darwin*)
OBJECT_FORMAT="-f macho64" ;;
*-w64-mingw*|*-*-cygwin*)
OBJECT_FORMAT="-f x64" ;;
*)
OBJECT_FORMAT="-f elf64" ;;
esac
GMP_INCLUDE_MPN(x86_64/x86_64-defs.m4)
;;
esac
AC_SUBST(OBJECT_FORMAT)
;;
I'd move GMP_INCLUDE_MPN(x86_64/x86_64-defs.m4) a few lines up, right
before the 'case', and add a GMP_DEFINE() to the *-*-darwin* branch
(either defining just DARWIN, or redefining JUMPTABSECT there).
Or, leave GMP_INCLUDE_MPN(x86_64/x86_64-defs.m4) where it is, and add
GMP_INCLUDE_MPN(x86_64/darwin.m4) and optionally also
GMP_INCLUDE_MPN(x86_64/elf.m4) to the corresponding branches, then
either just defining DARWIN and ELF in those files to special-case on
them in x86_64-defs.m4, or defining the platform-specific macros (like
JUMPTABSECT) directly there. (The problem with the latter is that some
platform-specific macros are directly [determined and] defined by
'configure', although they'd probably better fit into such an
OBJECTFILEFORMAT.m4.)
-leif
--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail
--
You received this message because you are subscribed to the Google Groups
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.