[cfe-dev] svn update then make gives cc1 error: unrecognized command line option '-Wcovered-switch-default'
Larry Evans
cppljevans at suddenlink.net
Fri Oct 5 17:58:28 PDT 2012
On 10/05/12 19:35, Eli Friedman wrote:
> On Fri, Oct 5, 2012 at 5:25 PM, Larry Evans <cppljevans at suddenlink.net> wrote:
>> On 10/05/12 13:32, Larry Evans wrote:
>> I just ran svn update:
>>
>> ~/download/llvm/svn/llvm $ svn update
>> ~/download/llvm/svn/llvm/tools/clang $ svn update
>> ~/download/llvm/svn/llvm/tools $ svn co
>> http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
>> ~/download/llvm/svn/llvm/projects/compiler-rt $ svn update
>>
>> However, make resulted in:
>>
>> .
>> .
>> .
>> llvm[1]: Compiling regexec.c for Debug+Asserts build
>> cc1: error: unrecognized command line option "-Wcovered-switch-default"
>> /bin/rm: cannot remove
>>
>> `/home/evansl/download/llvm/svn/build/lib/Support/Debug+Asserts/regexec.d.tmp':
>> No such file or directory
>> make[1]: ***
>> [/home/evansl/download/llvm/svn/build/lib/Support/Debug+Asserts/regexec.o]
>> Error 1
>> make[1]: Leaving directory
>> `/home/evansl/download/llvm/svn/build/lib/Support'
>> make: *** [all] Error 1
>> ~/download/llvm/svn/build $
>>
>> How can this be corrected?
>>
>> My system is:
>>
>> uname -a
>> Linux evansl-desktop 2.6.32-41-generic #90-Ubuntu SMP Tue May 22
>> 11:29:51 UTC 2012 x86_64 GNU/Linux
>>
>> TIA.
>>
>> -regards,
>> Larry
>> SOLVED:
>>
>> Changed Makefile.config to remove the COVERED_SWITCH_DEFAULT macro,
>> and now it's working:
>>
>> ~/download/llvm/svn/build $ cat Makefile.config|grep switch
>> # -Wcovered-switch-default
>> #COVERED_SWITCH_DEFAULT = -Wcovered-switch-default
>> ~/download/llvm/svn/build $ make
>> llvm[0]: Constructing LLVMBuild project information.
>> make[1]: Entering directory
>> `/home/evansl/download/llvm/svn/build/lib/Support'
>> llvm[1]: Compiling regexec.c for Debug+Asserts build
>> llvm[1]: Compiling system_error.cpp for Debug+Asserts build
>> llvm[1]: Building Debug+Asserts Archive Library libLLVMSupport.a
>
> Err, this is a guess, but it's possible you're setting the C++
> compiler to clang++, but not setting the C compiler to clang.
>
> -Eli
Thanks Eli.
I've not set anything directly. I did do the configure step:
~/download/llvm/svn/llvm $ cd ..
~/download/llvm/svn $ cd build
~/download/llvm/svn/build $ ls ../llvn/configure
../llvn/configure: No such file or directory
~/download/llvm/svn/build $ ls ../llvm/configure
../llvm/configure
~/download/llvm/svn/build $ ../llvm/configure
checking for clang... no
checking for llvm-gcc... no
checking for gcc... gcc
.
.
.
and maybe that did what you say. Hmmm. This is not the
1st time I've built clang; so, maybe something's left over
from the last build.
Where would I check to see which compiler is being used?
TIA.
-Larry
More information about the cfe-dev
mailing list