Greetings!

May I suggest trying this entry from amd64-linux.h:

#ifdef IN_SFASL
#include <sys/mman.h>
#define CLEAR_CACHE {\
   void *p,*pe; \
   p=(void *)((unsigned long)memory->cfd.cfd_start & ~(PAGESIZE-1)); \
   pe=(void *)((unsigned long)(memory->cfd.cfd_start+memory->cfd.cfd_size) & 
~(PAGESIZE-1)) + PAGESIZE-1; \
   if (mprotect(p,pe-p,PROT_READ|PROT_WRITE|PROT_EXEC)) {\
     fprintf(stderr,"%p %p\n",p,pe);\
     perror("");\
     FEerror("Cannot mprotect", 0);\
   }\
}
#endif


I.e., copy powerpc-macosx.{defs,h} to i386-macosx.{defs,h}, make the
above modification, make sure configure detects the host right, and
then see where we are.

This code flushes the data cache so that the cpu ca properly execute
code that has just ben loaded into the data segment.  I typical
symptom of this not having been done is SIGILL as some random
instruction gets fed to the cpu.  Historically, i386 has not needed
this, but I have noticed a tendency towards requiring this
functionality as computers have been evolving over the past few
years.  mprotect is a generic syscall way to achieve the same end
without cpu specific assembly.  It might work across the board -- I
have not had time to check.

Please keep me posted.

Take care,

Humberto Ortiz-Zuazaga <[EMAIL PROTECTED]> writes:

> Camm Maguire wrote:
> 
> > locbfd should be the default on macosx, as we have Aurelien's specific
> > mods for .o file loading.  Extending this default to the intel should
> > resolve the -lintl 'out of the box'.  This said, I'd be quite
> > (pleasantly) surprised if Aurelien's code works as is on intel.  This
> > should be tried first -- if you can compile and load a simple file,
> > all is well.
> 
> No such luck. Considering that h/powerpc-macosx.h has inline (PowerPC)
> assembly, it's not likely to work (line 91).
> 
> The code is for "Processor cache synchronization code." I'm definitely
> in over my head here. I don't have the foggiest notion how to implement
> the equivalent on Intel Macs.
> 
> 
> >  Otherwise, the brain-dead default entry-level loading
> > option is --disable-statsysbfd --enable-dlopen. 
> 
> Can I simply delete the cache sync code and try this?
> 
> -- 
> Humberto Ortiz-Zuazaga
> Programmer-Archaeologist
> University of Puerto Rico
> http://www.hpcf.upr.edu/~humberto/
> 
> 

-- 
Camm Maguire                                            [EMAIL PROTECTED]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah


_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to