Roland Mainz wrote:

>Garrett D'Amore wrote:
>  
>
>>Roland Mainz wrote:
>>    
>>
>[snip]
>  
>
>>>The problem doesn't affect you directly.
>>>The issue is that we need a way to distingish between 32bit and 64bit
>>>because we merge arch/${platform}/inlcude/ast/ includes from 32bit and
>>>64bit builds via "/usr/bin/diff -D<symbol>". The problem is that we
>>>can't use |_LP64| for <symbol> since the Sun Workshop/Forte/Studio
>>>compilers do not set |_LP64| (gcc set it, e.g.
>>>-- snip --
>>>$ (touch foo.h; /usr/sfw/bin/cpp -m64 -dM foo.h) | fgrep _LP64
>>>#define __LP64__ 1
>>>#define _LP64 1
>>>-- snip --
>>>) and "injecting" a |#include <sys/isa_defs.h>| will fork() the includes
>>>in a completely unpredictable manner (I've tried that - the sources
>>>compile and the code doesn't pass the test suite anymore (and I really
>>>don't have the time to figure out why it breaks somewhere in the ~~1000
>>>source files we have... that's more a job for Mr. Sisyphus)).
>>>      
>>>
>>Huh?  sys/isa_defs.h should come in via sys/types.h.    If you're not
>>getting sys/types.h, then all bets are off.
>>    
>>
>
>Erm, the code which generates the final headers works like this (shell
>pseudocode):
>-- snip --
>(
>    print "/* header */"
>    /usr/bin/diff -D<symbol>" 32bitinclude/foo.h 64bitinclude/foo.h
>) >${ROOT}/usr/include/ast/foo.h
>-- snip --
>
>We can't "inject" a "#include <sys/isa_defs.h>" between "header" and the
>"diff" because this will alter the behaviour of the AST includes (they
>are not designed to handle this kind of hackery). Right now we use
>either |__amd64| (on x86) or |__sparcv9| (on SPARC) instead of |_LP64|
>which I thought that this would be a acceptable compromise.
>
>  
>
Aren't you including <sys/types.h> anywhere in the code?  If so, you
have <sys/isa_defs.h> which defines _LP64.

Ian

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to