Core dump Compiling with clang sample


I successfully compiled all of llvm, clang etc for Solaris SPARC however when I try and compile with clang I get ‘Unsupported architecture’. Help, is this really true or did I forget to setup a path?

Thanks in Advance,


dave@athena:~$ clang hello.c -o hello

Unsupported architecture

UNREACHABLE executed at /home/dave/llvm/tools/clang/lib/Driver/Tools.cpp:6745!

0 0xfef7ff0c llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 36

1 0xfef7f710 SignalHandler(int) + 504

2 0xf68a8470 __sighndlr + 12

3 0xf689b3fc call_user_handler + 880

4 0xf689b704 sigacthandler + 88

5 0xf68acf50 __lwp_sigqueue + 8

6 0xf682988c abort + 200

7 0xfef61318 llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 376

8 clang 0x00888a94 clang::driver::tools::solaris::Linker::ConstructJob(clang::driver::Compilation&, clang::driver::JobAction const&, clang::driver::InputInfo const&, llvm::SmallVector<clang::driver::InputInfo, 4u> const&, llvm::opt::ArgList const&, char const*) const + 1348

9 clang 0x00835938 clang::driver::Driver::BuildJobsForAction(clang::driver::Compilation&, clang::driver::Action const*, clang::driver::ToolChain const*, char const*, bool, bool, char const*, clang::driver::InputInfo&) const + 1832

10 clang 0x00836174 clang::driver::Driver::BuildJobs(clang::driver::Compilation&) const + 356

11 clang 0x008373f0 clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) + 3192

12 clang 0x0075a180 main + 3800

13 clang 0x00750160 _start + 92

Stack dump:

  1. Program arguments: clang hello.c -o hello

  2. Compilation construction

  3. Building compilation jobs

  4. Building compilation jobs

Abort (core dumped)


I would start by looking at exactly what the triple is for your target. It is plausible that the precise name&number of your system isn’t supported - I know nothing of Sparc support, just that (sometimes) you only need a minor letter/digit away from the supported platform(s) to get this sort of problem. Building Clang + LLVM with debug symbols and going back up the call-stack to see exactly where it fell over would help - sometimes there’s even comments to help out there… :slight_smile:

It’s quite plausible, if you know enough about the processor architectures, that you can pick a “nearby relative” and specify “-target=ABC” to work around the problem. But without knowing WHAT you are running on, I doubt anyone can give precise help.