>> > Now, this is one of the reasons why ECL does not build on OS X when >> > compiling with CFLAGS="-m64" Since the linker needs the -m64 flag, ECL >> > is not capable of finding your copy of the MPIR library. >> >> Can you show me where it is documented that the linker has a '-m64' flag? > > Dave, you are really hard to convince. GCC refuses to build a 64 bit > binary, linking the object files, if not passed a -m64 flag. I do not > know about "ld". I personally do not use it for linking because there > are libraries that I would miss and which GCC or any other compiler (g+ > +, IBM's,...) takes care of adding when used for linking. > > Juanjo
Juanjo, I will be impossible to convince!!! I have no problem accepting the *compiler* needs -m64. That option tells the *compiler* to create 64-bit object files. But once the linker is asked to link the object files, it should be able to work out whether the executable to be created is 32-bit or 64-bit based on the type of object files it is being asked to link. The linker can not create a 64-bit executable or library from 32-bit object files. Neither can it create a 32-bit executable from 64-bit object files. Unless the linker was exceeding dumb, it should be able to work out whether you want a 32 or 64-bit executable just be looking at the object files, and seeing if they are 32 or 64-bit. The previous spkg-install is Sage for ecl set 'LDFLAGS=-m64'. LDFLAGS is passed to the *linker* directly, and not to the compiler. That is wrong. I agree CFLAGS should be set to -m64 if you want the *compiler* to create 64-bit objects. I think this should be proof enough that there is no such linker option as '-m64' on OS X. [kir...@bsd ~]$ ld -m64 ld: unknown option: -m64 In case you did not know, 'bsd' is running OS X. [kir...@bsd ~]$ uname -a Darwin bsd.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386 MacPro1,1 Darwin [ On the linux box 'sage', again there is no such option as -m64. There is a -m<emulation> option. The -Wl,-foobar optoin to gcc will pass the option -foobar directly to the linker. Let's see what happens when we pass -m64 to the linker kir...@sage:[~] $ gcc -Wl,-m64 hello.c /usr/bin/ld: unrecognised emulation mode: 64 Supported emulations: elf_x86_64 elf_i386 i386linux collect2: ld returned 1 exit status I've yet to find any linker which has this option. Of course, most times (and you are saying every time in ecl), the linker is not called directly, but only via the compiler. The compiler accepts -m64, but does *NOT* pass that to the linker. Hence my point that there is never any need to set LDFLAGS to -m64. Setting LDFLAGS to -m64 did not generate an error message in the previous .spkg for ecl, since LDFLAGS was never exported. Hence I am yet to be convinced there is any need to ever set LDFLAGS to include -m64. I suspect setting LDFLAGS to -m64 it will do one of three things * Silently ignore it * Issue a warning. * Abort the linking, as the option is invalid. Dave --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---