build: Detect compiler (gcc or clang) and filter out compiler flags
commit5b8ec08d57fa932b769e590ecfe6a471910c05ec
authorTobias Klauser <tklauser@distanz.ch>
Mon, 8 Sep 2014 08:21:18 +0000 (8 10:21 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Mon, 8 Sep 2014 08:21:18 +0000 (8 10:21 +0200)
tree1e3aff5cacbf09e1bdaf35bec229b50566944dcd
parentee339c1af78312527312a812dce579266a9ba5bc
build: Detect compiler (gcc or clang) and filter out compiler flags

Create a make variable $(COMPILER) which is set to either `gcc' or
`clang' depending on the compiler used. Use this variable to filter out
command line options not supported by clang (for now only
-fno-delete-null-pointer-checks).

Compiler detection snippet extracted from the Linux kernel Makefile.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Makefile