sys-libs/glibc: pass user's CFLAGS over CC/XX, not CPPFLAGS
Breakage example (before this change):
# CFLAGS="-O2 -march=core2 -mno-sse4.2" emerge -v1 =glibc-2.27-r4
Here user's CFLAGS were able to override (this bug) glibc's
CFLAGS additions like:
sysdeps/i386/i686/multiarch/Makefile:CFLAGS-strspn-c.c += -msse4
'strspn' was built as 'gcc -msse4 -mno-sse4.2' and failed:
smmintrin.h:631:1: error: inlining failed in call to always_inline
‘_mm_cmpistri’: target specific option mismatch
This happens because we passed user's CFLAGS via CPPFLAGS:
Makerules:COMPILE.c = $(CC) -c $(CFLAGS) $(CPPFLAGS)
To avoid this kind of overrides this change injects user's CFLAGS
into CC/CXX. Above example will use 'gcc -mno-sse4.2 -msse4' order.
Reported-by: Philipp Psurek
Bug: https://bugs.gentoo.org/657760
Closes: https://bugs.gentoo.org/659030
Package-Manager: Portage-2.3.40, Repoman-2.3.9