Rob,
rda@lemma-one.com wrote:
If I do:
./configure --build=x86_64-darwin
then make works, but make cvs then fails like this:
make all-recursive Making all in libpolyml make[2]: Nothing to be done for `all'. Making all in libpolymain make[2]: Nothing to be done for `all'. make[2]: Nothing to be done for `all-am'. ./poly -H 10 < mlsource/BuildExport.sml /bin/sh: line 1: 18804 Bus error ./poly -H 10 < mlsource/BuildExport.sml make: *** [compiler] Error 138
./configure --build=x86_64-darwin LDFLAGS='-segprot POLY rwx rwx'
then everything works (but as you predict I also have to put -segprot POLY rwx rwx in the steps in my make files that link a poly program.
OK, that confirms what I found on the older version of Mac OS X; the linker is removing the execute bit from the POLY segment and it needs to be explicitly set. I'll update the configure/Make files to add this for the Poly/ML build.
If I do:
./configure CFLAGS='-arch i386'
It fails on x86_dep.lo just as it does with no extra settings.
It may be possible to force 32-bit mode with ./configure CFLAGS='-arch i386 -O3' CXXFLAGS='-arch i386 -O3' \ CCASFLAGS='-arch i386'
Did you try with the CXXFLAGS option as well? From what I can tell CFLAGS is only used in C programs not in the C++ parts such as x86_dep.cpp.
Regards, David