Re: [PATCH] Makefile: detect compiler and enable more warnings in DEVELOPER=1
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Mar 18, 2018, 18:56 UTC
- Message-ID
- <d30d131e-1cfe-fedb-4a45-7628615a7876@ramsayjones.plus.com>
- In-Reply-To
- <CACsJy8BOCpHiMxJ0K=_-WPf9b4yh0W0i3m9sAo5-Sk5fY9x1+A@mail.gmail.com>
On 18/03/18 15:55, Duy Nguyen wrote:
Show 8 quoted lines
> On Sun, Mar 18, 2018 at 9:18 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote: >> +ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),) >> +CFLAGS += -Wextra > > Another thing we can add here is -Og instead of standard -O2 (or -O0 > in my build), which is supported since gcc 4.8. clang seems to support > it too (mapped to -O1 at least for clang5) but I don't know what > version added that flag.
I've been doing a lot of compiling recently, using 10 'different' versions of clang and gcc ('different' if you count 64-bit and 32-bit compilers with the same version number as different!)
However, I can tell you that clang version 3.4 and 3.8.0 don't support -Og, but clang version 5.0.1 does.
ATB, Ramsay Jones