[cfe-dev] [static checker] unexpected strip -std=gnu99

Дмитрий Дьяченко dimhen at gmail.com
Sun Sep 8 13:04:47 PDT 2013


I use autoconf/libtool.
In configure.ac I have 'AC_PROG_CC_C99'

After all Makefile contains
CC = /home/dimhen/src/llvm_189371/tools/clang/tools/scan-build/ccc-analyzer
-std=gnu99
CFLAGS =   -g -DNO_ASN1_RT_REDUNDANT -D_COMPACT -fvar-tracking
-fvar-tracking-assignments -fno-builtin -fno-common -O0 -pipe -m64
-DUSE_JEMALLOC -DUSE_XMLSEC

2013/9/8 Steve McCoy <mccoyst at gmail.com>:
> Are you setting 'CC=gcc -std=gnu99' in your build script, rather than
> putting the -std flag inCFLAGS
>
>
> On Sunday, September 8, 2013, Дмитрий Дьяченко wrote:
>>
>> Jordan,
>>
>> Now I know problem commit -- 189372, but I don't have a little testcase
>> yet.
>>
>> [ clang]$ svn log -r189372
>> ------------------------------------------------------------------------
>> r189372 | jrose | 2013-08-27 20:59:33 +0400 (Вт., 27 авг. 2013) | 6 lines
>>
>> scan-build: Set CC and CXX as make variables when wrapping make builds.
>> [...]
>>
>> A bit more about my project's build:
>> 1) autoreconf
>> 2) '... scan-build configure ...'
>> After step 2) build trees are identical for scan-build-189371 and
>> scan-build-189372
>>
>> 3) '... scan-build make'
>> Difference in command line is: no '-std=gnu99' in rev.189372
>>
>> rev.189372 (FAIL)
>> $ ~/src/llvm_189372/tools/clang/tools/scan-build/scan-build
>> --use-analyzer=/home/dimhen/build/csa_189372/Release+Asserts/bin/clang
>> make
>> scan-build: Using
>> '/home/dimhen/build/csa_189372/Release+Asserts/bin/clang' for static
>> analysis
>> /bin/sh ../../../../libtool  --tag=CC --tag=disable-static
>> --mode=compile
>> /home/dimhen/src/llvm_189372/tools/clang/tools/scan-build/ccc-analyzer
>> -DHAVE_CONFIG_H ..... x.c
>>
>> rev.189371 (OK)
>> $ ~/src/llvm_189371/tools/clang/tools/scan-build/scan-build
>> --use-analyzer=/home/dimhen/build/csa_189371/Release+Asserts/bin/clang
>> make
>> scan-build: Using
>> '/home/dimhen/build/csa_189371/Release+Asserts/bin/clang' for static
>> analysis
>> /bin/sh ../../../../libtool  --tag=CC --tag=disable-static
>> --mode=compile
>> /home/dimhen/src/llvm_189371/tools/clang/tools/scan-build/ccc-analyzer
>> -std=gnu99 -DHAVE_CONFIG_H ... x.c
>>
>>
>> A bit more about my environment
>>
>> Fedora 19/x86_64
>> make 3.82
>> autoconf 2.69
>> libtool 2.4.2
>> m4 1.4.16
>>
>> Thank you,
>> Dmitry
>>
>> 2013/9/6 Дмитрий Дьяченко <dimhen at gmail.com>:
>> > Thank you, Jordan
>> >
>> > I'll try to reduce project to something reasonable.
>> >
>> > Dmitry
>> >
>> > 2013/9/6 Jordan Rose <jordan_rose at apple.com>:
>> >> I don't see this in a simple test. Can you send a test project that
>> >> exhibits this behavior?
>> >>
>> >> Jordan
>> >>
>> >>
>> >> On Sep 6, 2013, at 11:25 , Дмитрий Дьяченко <dimhen at gmail.com> wrote:
>> >>
>> >>> Hello!
>> >>>
>> >>> Sounds like sometimes after 2013-aug-23 (probably before 28 aug)
>> >>> scan-build  (or maybe clang) starts strip '-std=gnu99' from command
>> >>> line.
>> >>>
>> >>> I configure/make project using gcc for build and static checker for
>> >>> analyze.
>> >>>
>> >>> make with gcc has '-std=gnu99' in command line, but with
>> >>> scan-build/ccc-analyzer not.
>> >>>
>> >>> Anybody can confirm this?
>> >>>
>> >>> Thank you,
>> >>> Dmitry
>> >>> _______________________________________________
>> >>> 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




More information about the cfe-dev mailing list