Unkown C++ abi?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unkown C++ abi?

Starry-3
So im trying to build some simple code but when i run it it gives a seg
fault with the message 'unkown c++ abi' i was able to run it awhile ago,
which makes me believe that when i recompiled llvm + clang i did
something wrong. Any ideas?




 llvm::raw_stdout_ostream ost;
  const DiagnosticOptions options;
  TextDiagnosticPrinter tdp(ost,options);//, dops);
  Diagnostic diag(&tdp);
  LangOptions lang;
  SourceManager sm(diag);
  FileManager fm;
  TargetOptions target_options;
  printf(LLVM_HOSTTRIPLE);
  target_options.Triple = "i686-pc-linux-gnu";//LLVM_HOSTTRIPLE;
  TargetInfo *ti = TargetInfo::CreateTargetInfo(diag,target_options);
 

==>results in
error: unknown C++ ABI ''
i686-pc-linux-gnu
Process  finished




_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Unkown C++ abi?

Enea Zaffanella
Seth Burleigh wrote:

> So im trying to build some simple code but when i run it it gives a seg
> fault with the message 'unkown c++ abi' i was able to run it awhile ago,
> which makes me believe that when i recompiled llvm + clang i did
> something wrong. Any ideas?
>
>
>
>
>  llvm::raw_stdout_ostream ost;
>   const DiagnosticOptions options;
>   TextDiagnosticPrinter tdp(ost,options);//, dops);
>   Diagnostic diag(&tdp);
>   LangOptions lang;
>   SourceManager sm(diag);
>   FileManager fm;
>   TargetOptions target_options;
>   printf(LLVM_HOSTTRIPLE);
>   target_options.Triple = "i686-pc-linux-gnu";//LLVM_HOSTTRIPLE;

Try adding

     target_options.CXXABI = "itanium";

Documentation says it is the default, but a recent commit made the
comment obsolete.

Enea.

>   TargetInfo *ti = TargetInfo::CreateTargetInfo(diag,target_options);
>  
>
> ==>results in
> error: unknown C++ ABI ''
> i686-pc-linux-gnu
> Process  finished
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Unkown C++ abi?

Starry-3
That fixed it!

On Sat, 2010-06-12 at 16:04 +0200, Enea Zaffanella wrote:

> Seth Burleigh wrote:
> > So im trying to build some simple code but when i run it it gives a seg
> > fault with the message 'unkown c++ abi' i was able to run it awhile ago,
> > which makes me believe that when i recompiled llvm + clang i did
> > something wrong. Any ideas?
> >
> >
> >
> >
> >  llvm::raw_stdout_ostream ost;
> >   const DiagnosticOptions options;
> >   TextDiagnosticPrinter tdp(ost,options);//, dops);
> >   Diagnostic diag(&tdp);
> >   LangOptions lang;
> >   SourceManager sm(diag);
> >   FileManager fm;
> >   TargetOptions target_options;
> >   printf(LLVM_HOSTTRIPLE);
> >   target_options.Triple = "i686-pc-linux-gnu";//LLVM_HOSTTRIPLE;
>
> Try adding
>
>      target_options.CXXABI = "itanium";
>
> Documentation says it is the default, but a recent commit made the
> comment obsolete.
>
> Enea.
>
> >   TargetInfo *ti = TargetInfo::CreateTargetInfo(diag,target_options);
> >  
> >
> > ==>results in
> > error: unknown C++ ABI ''
> > i686-pc-linux-gnu
> > Process  finished
> >
> >
> >
> >
> > _______________________________________________
> > cfe-dev mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >
> >
>


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Unkown C++ abi?

Charles Davis-3
In reply to this post by Starry-3
On 6/12/10 7:50 AM, Seth Burleigh wrote:
> error: unknown C++ ABI ''
That's my fault. I added that option and didn't initialize it to
'itanium' in the (nonexistent) TargetOptions constructor. Should be
fixed now (r105893).

Chip

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev