maiko icon indicating copy to clipboard operation
maiko copied to clipboard

Remove -m32/-m64 args from makefiles.

Open waywardmonkeys opened this issue 4 years ago • 4 comments

We detect machinetype and build for the native CPU type as it is, so we don't need to repeat this here in each makefile.

waywardmonkeys avatar Feb 11 '21 09:02 waywardmonkeys

I'm adding .mk files that we can include, one for each compiler, so that I can configure things like dependency flags correctly for each compiler.

That would be easier if there weren't 32 / 64 bit flags being given, especially as I don't think they should be needed.

waywardmonkeys avatar Feb 11 '21 09:02 waywardmonkeys

on my mac mini I can do

arch -x86_64 ./makeright x

and compile maiko x86 binaries into darwin.x86_64/lde and ldex

masinter avatar Feb 11 '21 19:02 masinter

Yes, I can do arch -x86_64 ./makeright x on my MacBook Pro, but if I do arch -i386 ./makeright x it produces

arch: posix_spawnp: ./makeright: Bad CPU type in executable

because all the executables used to create a 32-bit lde are in fact 64-bit executables, and for most other systems it's more like the -m32/-m64 (or --target=<target-triple> for cross-compiling).

nbriggs avatar Feb 11 '21 19:02 nbriggs

On macOS, it is usually -arch i386 and -arch x86_64 and -arch arm64 ... I'm still thinking about what to do about this patch.

waywardmonkeys avatar Feb 13 '21 09:02 waywardmonkeys