Skip to contentSkip to conversation

package/ccache: do not force colored diagnostics

PATCH New Yann E. MORIN 2 participants 2 messages Feb 14, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 package/ccache: do not force colored diagnostics

When GCC_COLORS is set, ccache passes '-fdiagnostics-color' to GCC but this flag requires GCC v4.9 or later. Older versions complain about the unrecognized command line option.

Using GCC_COLORS in the context of Buildroot is seldom useful, so we just unexport GCC_COLORS altogether.

Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

---
This defconfig (provided by Carlos) helps reproduce the issue, during the build of openssl:

    BR2_powerpc=y
    BR2_powerpc_8548=y
    BR2_CCACHE=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
    BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/powerpc-ctng_e500v2-linux-gnuspe.tar.xz"
    BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="powerpc-ctng_e500v2-linux-gnuspe"
    BR2_TOOLCHAIN_EXTERNAL_GCC_4_7=y
    BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12=y
    BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
    BR2_TOOLCHAIN_EXTERNAL_CXX=y
    BR2_PACKAGE_OPENSSL=y

---
Changes v3 -> v4: (Yann)
- simply unexport GCC_COLORS (Arnout)

Changes v2 -> v3: (Yann)
- drop the environment variable override (Yann)
- directly patch ccache (Thomas)

Changes v1->v2 (Carlos)
Fix indentation, use positive logic and improve the commit message, acording to comments from Thomas Petazzoni and Yann E. MORIN.

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index dcda8fe..4db971b 100644
@@ -402,6 +402,7 @@ unexport QMAKESPEC
 unexport TERMINFO
 unexport MACHINE
 unexport O
+unexport GCC_COLORS
 
 GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH v4 1/1 package/ccache: do not force colored diagnostics

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

When GCC_COLORS is set, ccache passes '-fdiagnostics-color' to GCC but this flag requires GCC v4.9 or later. Older versions complain about the unrecognized command line option.

Quoted 7 lines

Using GCC_COLORS in the context of Buildroot is seldom useful, so we just unexport GCC_COLORS altogether.

Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard