From 48f239c94faca140427afc9aa06cf356b1b6b0de Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Fri, 9 May 2014 14:13:13 +0800 Subject: Disable canonical prefixes of system headers GCC know a few pre-defined paths (relative to its location) to search for headers, libraries, program, etc. By default GCC prefixes its own path(argv[0]) and calls realpath() which result in absolute path with all symlink, . and .. removed. It's usually good to have canonicalised paths, but absolute paths in *.d file can cause unnecessary relinking when stale entries in ccache cache hit Add -no-canonical-prefixes (gcc>=4.6) and -fno-canonical-system-headers (gcc>4.6) to disable realpath() on prefixed paths Change-Id: I58d739e61fb013015fb05a9c98b2132b307f915a --- core/clang/config.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/clang') diff --git a/core/clang/config.mk b/core/clang/config.mk index b8f76f2..c598e7d 100644 --- a/core/clang/config.mk +++ b/core/clang/config.mk @@ -31,7 +31,8 @@ CLANG_CONFIG_UNKNOWN_CFLAGS := \ -funswitch-loops \ -Wno-psabi \ -Wno-unused-but-set-variable \ - -Wno-unused-but-set-parameter + -Wno-unused-but-set-parameter \ + -fno-canonical-system-headers # Clang flags for all host rules CLANG_CONFIG_HOST_EXTRA_ASFLAGS := -- cgit v1.1