[GCC-XML] OS X GCCXML Builtins not declared

Brad King brad.king at kitware.com
Fri Dec 5 11:13:41 EST 2008


Jeffrey A Loiselle wrote:
> So I'm attempting to wrap Ogre3D for Python Ogre.  Part of that uses
> GCCXML (version 0.9.0), currently its hitting errors mentioning builtin
> types not being declared.  I found next to nothing about these online so
> I'm not sure where to look next.
> 
> I'm making the following call (Not sure if this will be helpful, but
> anyway):
> /Users/team23/development/root/usr/bin/gccxml   --gccxml-cxxflags
> "-DCF_OPEN_SOURCE -D_POSIX_C_SOURCE -isysroot
> /Developer/SDKs/MacOSX10.5.sdk"  
> -I"/Users/team23/development/python-ogre"
> -I"/Users/team23/development/python-ogre/code_generators/ogre"
> -I"/Users/team23/development/root/usr/include/boost-1_36"
> -I"/Users/team23/development/ogre/OgreMain/include"
> -I"/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5"
> -I"/Developer/SDKs/MacOSX10.5.sdk/Developer/Headers/FlatCarbon"
>  -D"OGRE_NONCLIENT_BUILD" -D"OGRE_GCC_VISIBILITY"
> -D"__PYTHONOGRE_BUILD_CODE" -D"BOOST_HAS_THREADS"
> -D"BOOST_HAS_WINTHREADS" -D"OGRE_VERSION_1.6.0RC1"
>  "/Users/team23/development/python-ogre/code_generators/ogre/python_ogre.h"
> -fxml="/Users/team23/development/python-ogre/code_generators/cache/ogre_1.6.0RC1_cache.xml"
> 
> 
> And a small excerpt of the errors:
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:
> In function 'void _mm_empty()':
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:68:
> error: '__builtin_ia32_emms' was not declared in this scope
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:
> In function 'long long int __vector__ _mm_cvtsi32_si64(int)':
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:85:
> error: '__builtin_ia32_vec_init_v2si' was not declared in this scope
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:
> In function 'int _mm_cvtsi64_si32(long long int __vector__)':
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:140:
> error: '__builtin_ia32_vec_ext_v2si' was not declared in this scope
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:
> In function 'long long int __vector__ _mm_packs_pi16(long long int
> __vector__, long long int __vector__)':
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:189:
> error: '__builtin_ia32_packsswb' was not declared in this scope
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:
> In function 'long long int __vector__ _mm_packs_pi32(long long int
> __vector__, long long int __vector__)':
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:208:
> error: '__builtin_ia32_packssdw' was not declared in this scope
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:
> In function 'long long int __vector__ _mm_packs_pu16(long long int
> __vector__, long long int __vector__)':
> /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.2.1/include/mmintrin.h:227:
> error: '__builtin_ia32_packuswb' was not declared in this scope
> 
> 
> Any help would be appreciated.

The builtins get declared in the

  GCC_XML/Support/GCC/4.2/gccxml_builtins.h

file (the above is its location in the gccxml source tree, there is one
in the install tree too).

It seems several builtins are missing from that file but no one has hit
code that needs them until now.  You can add the forward declarations
for the builtins.  In order to learn the signatures of the builtins,
compile this:

template <typename T> void f(T*);
int main()
{
  f(&__builtin_ia32_emms);
  f(&__builtin_ia32_packsswb);
  //...
  return 0;
}

and look at the linker errors.

I can do this eventually, but I won't be able to get to it for a while.
 If you manage to add all the signatures, I'll be happy to accept a patch.

-Brad



More information about the gccxml mailing list