Mercurial > hg > dhcpcd
changeset 951:23362251acd3 draft
Always test our cc options with a valid input file.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sat, 06 Sep 2008 15:53:31 +0000 |
| parents | c2d7dbd4c893 |
| children | e7d13ecba805 |
| files | mk/cc.mk |
| diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mk/cc.mk Fri Sep 05 19:44:02 2008 +0000 +++ b/mk/cc.mk Sat Sep 06 15:53:31 2008 +0000 @@ -16,16 +16,13 @@ -Wmissing-prototypes -Wmissing-declarations \ -Wmissing-noreturn -Wmissing-format-attribute \ -Wredundant-decls -Wnested-externs \ - -Winline -Wwrite-strings -Wcast-align -Wcast-qual -Wpointer-arith \ + -Winline -Wwrite-strings -Wcast-align -Wcast-qual \ + -Wpointer-arith \ -Wdeclaration-after-statement -Wsequence-point _CC_FLAGS_SH= if ! test -d .git; then echo ""; else for f in ${_CCFLAGS}; do \ - if ${CC} $$f -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ + if echo "int main(void) { return 0;} " | \ + ${CC} $$f - -E -o /dev/null >/dev/null 2>&1; \ then printf "%s" "$$f "; fi \ done; fi _CC_FLAGS!= ${_CC_FLAGS_SH} CFLAGS+= ${_CC_FLAGS}$(shell ${_CC_FLAGS_SH}) - -_GGDB_SH= if test "${DEBUG}" = "yes"; then echo "-ggdb -DDEBUG"; else echo ""; fi -_GGDB!= ${_GGDB_SH} -GGDB= ${_GGDB}$(shell ${_GGDB_SH}) -CFLAGS+= ${GGDB}
