[cfe-dev] Error in xmmintrin.h with Clang and LLVM 3.1 built from RELEASE_31 tag.

Chandler Carruth chandlerc at google.com
Wed May 23 02:04:16 PDT 2012


On Wed, May 23, 2012 at 1:52 AM, Gordon Keiser <gkeiser at arxan.com> wrote:

> May not be the problem here, but errors similar to that happen in
> xmmintrin.h when building things with GCC and not specifying -msse2.


Not the same problem. I'll expand on Eli's comment....


>   It's a bit too late for me to go digging into the clang driver, but I
> know I've seen this before from GCC and LLVM-GCC because they assume you
> have an original Pentium III unless told otherwise.   Various combinations
> of -mcpu / -march usually do it, too.
>
> -Gordon
>
> > -----Original Message-----
> > From: cfe-dev-bounces at cs.uiuc.edu [mailto:cfe-dev-bounces at cs.uiuc.edu]
> > On Behalf Of Eli Friedman
> > Sent: Wednesday, May 23, 2012 1:29 AM
> > To: Gabe Rives-Corbett
> > Cc: cfe-dev at cs.uiuc.edu
> > Subject: Re: [cfe-dev] Error in xmmintrin.h with Clang and LLVM 3.1
> built from
> > RELEASE_31 tag.
> >
> > On Tue, May 22, 2012 at 9:28 PM, Gabe Rives-Corbett
> > <gabe at gaberivescorbett.com> wrote:
> > > Hello,
> > >
> > > I built Clang and LLVM 3.1 on OS X using the following configure
> command:
> > >
> > > configure --with-gcc-toolchain=/opt/local/ --prefix=/opt/clang-3.1/
> > > --enable-targets=x86_64,x86 --enable-optimized
> > >
> > > the reason for the gcc-tolchain location is to use the macports gcc
> > > 4.6
> > > libstdc++ in order to support more of C++11.  I also made the
> > > libstdc++ following
> > > changes to InitHeaderSearch::AddDefaultCIncludePaths:
> > >
> > > void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple
> > > &triple,
> > >                                             const HeaderSearchOptions
> > > &HSOpts) {
> > >   llvm::Triple::OSType os = triple.getOS();
> > >
> > >   if (HSOpts.UseStandardSystemIncludes) {
> > >     switch (os) {
> > >     case llvm::Triple::FreeBSD:
> > >     case llvm::Triple::NetBSD:
> > >       break;
> > >     default:
> > >       // FIXME: temporary hack: hard-coded paths.
> > >       //AddPath("/usr/local/include", System, true, false, false);
> > >
> > >       AddPath("/opt/local/include/gcc46/c++", System, true, false,
> > > false);
> > >  AddPath("/opt/local/include/gcc46/c++/x86_64-apple-darwin11/.",
> > > System, true, false, false);
> > >       AddPath("/opt/local/include/gcc46/c++/backward/", System, true,
> > > false, false);
> > >
> > > AddPath("/opt/local/lib/gcc46/gcc/x86_64-apple-darwin11/4.6.3/include"
> > > ,
> > > System, true, false, false);
> > >       AddPath("/usr/local/include", System, true, false, false);
> > >
> > > AddPath("/opt/local/lib/gcc46/gcc/x86_64-apple-darwin11/4.6.3/include-
> > > fixed",
> > > System, true, false, false);
> > >       AddPath("/usr/include", System, true, false, false);
> > >
> > >       break;
> > >     }
> > >   }
> > >
> > >
> > > Then when building a C source file I get the following error:
> > >
> > > In file included from
> > > /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
> > > In file included from
> > >
> > /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices
> > .h:21:
> > > In file included from
> > >
> > /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.frame
> > work/Headers/AE.h:20:
> > > In file included from
> > >
> > /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonC
> > ore.framework/Headers/CarbonCore.h:129:
> > > In file included from
> > >
> > /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonC
> > ore.framework/Headers/DriverServices.h:32:
> > > In file included from
> > >
> > /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonC
> > ore.framework/Headers/MachineExceptions.h:29:
> > > /opt/local/lib/gcc46/gcc/x86_64-apple-
> > darwin11/4.6.3/include/xmmintrin.h:102:10:
> > > error: invalid conversion between vector type '__m128' and integer
> > > type 'int' of different size
> > >
> > > Any ideas?
> >
> > Adding "/opt/local/lib/gcc46/gcc/x86_64-apple-darwin11/4.6.3/include/"
> > to your include paths is a bad idea.
> >
> > -Eli
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120523/968a37b1/attachment.html>


More information about the cfe-dev mailing list