On Thu, 2015-03-12 at 21:06 +0000, Barak A. Pearlmutter wrote:
> Thanks for the bug report.
> 
> >> checking size of void *... 8
> >> configure: WARNING: non 32-bit pointer platform detected
> >> configure: trying to enabling 32-bit compilation mode
> >> checking size of void *... 0
> >> configure: WARNING: bad news, pointers are now 0 bytes
> 
> > This is caused by trying to use '-m32':
> 
> Indeed.
> 
> Until a 64-bit port is done, Oaklisp requires 32-bit pointers
> 
> I've just push code to error out when it notices "0 byte" pointers.
> 
> > -m32 isn't a valid option to gcc on mips (or on arm64 or ia64[1]).
> 
> > if you want to compile 32-bit code on mips64, you need to pass
> > something like '-march=mips2 -mabi=32' to gcc.
> 
> There is no possibility of compiling Oaklisp on a 64-bit machine without
> some compiler option requesting a 32-bit pointer memory model.
> 
> I thought GCC used -m32 for this purpose whenever feasible. Ah well.
> Perhaps there is an existing autoconf macro,
> AX_CFLAGS_32BIT_MEMORY_MODEL or something like that? I poked around but
> didn't find anything. I suppose I'll have to break down and write one
> myself, casing out on architecture.
> 
> You include the magic above for mips64. You wouldn't happen to know it
> for other multilib-enabled 64-bit platforms, would you?

I just tried using -mabi=32 (without the -march stuff) and it worked so
only that is needed on mips.

These options are untested, I just looked over the GCC manual for them.

alpha     impossible?
amd64     -m32
arm64     -mabi=ilp32
ia64      -milp32
mips64el  -mabi=32
ppc64     -m32
ppc64el   -m32
s390x     -m31
sparc64   -m32

But only some of these architectures have multilib enabled in the glibc
package:

amd64
mips64el
ppc64 (but not ppc64el?)
sparc64
s390x

> (Of course, another possibility would be to simply drop all 64-bit
> architectures aside from amd64 and let people use multiarch to install
> the appropriate 32-bit package when applicable.)

And that would work as well - I'll leave that up to you :)

Thanks,
James

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to