[K42-discussion] genConstants.c on x86_64/gcc4.1

Patrick G. Bridges bridges at cs.unm.edu
Tue Sep 11 01:18:54 EST 2007


On Sep 10, 2007, at 9:10 AM, Matthew J. Barrick wrote:

> Patrick G. Bridges wrote:
>> Managed to make something work. Stored the address of the generated
>> variable to a volatile
>> extern pointer after generating the reference, to force it to be  
>> live.
>>
>> -Patrick
>
> I don't know if that old axiom "When all else fails add a level or
> redirection" was meant to be taken that literally.

Heh, it's add a level of *indirection*, but well, yeah. Slowly  
hacking my way through the gcc4/x86_64 compile writing or stubbing  
out things as I go. libk.a is built now, as is libemu.a, though I'm  
sure it will abort early on. Working on libbase.a right now. THings  
can be quite picky - in particular, g++4 likes to complain about  
glibc header files - for example some of the ioctls in asm/ioctls.h  
(TIOGPTN, for example) expand to macros that are legal C case labels  
but not legal C++ case labels. Yick.

Just so folks know, I completely ditched a separate k42-package for  
this port. You simply specify a HOSTROOT in Makefile.new which is the  
root file system for the system you're compiling against. If you're  
compiling on an x86_64/gcc4 system, that's just the normal host root.

-Patrick


More information about the K42-discussion mailing list