We should not use CFLAGS when using cpp
When building a universal binary on macOS (eg: CFLAGS="-arch x86_64 -arch arm64"), mesa fails during configure because meson is using CFLAGS with -E. This is not legal:
The meson log shows the failure:
Running command: /opt/buildX11/bin/python3 -c
from distutils.version import StrictVersion
import mako
assert StrictVersion(mako.__version__) > StrictVersion("0.8.0")
--- stdout ---
--- stderr ---
Running compile:
Working directory: /var/folders/99/yp4q7wrs6ts8mlgwy6njn6280000gn/T/tmpzbhrrjjh
Command line: /usr/bin/clang -I/opt/X11/include /var/folders/99/yp4q7wrs6ts8mlgwy6njn6280000gn/T/tmpzbhrrjjh/testfile.c -pipe -E -P
-target fat-apple-macos10.9 -arch x86_64 -arch arm64 -Os -g3 -gdwarf-2 -Werror=unguarded-availability-new -F/Applications/Utilities
/XQuartz.app/Contents/Frameworks -DFAIL_HARD -P -O0 -std=c11
Code:
#include <errno.h>
#ifndef ETIME
# define ETIME
#endif
"MESON_GET_DEFINE_DELIMITER"
ETIME
Compiler stdout:
Compiler stderr:
clang: error: cannot use 'cpp-output' output with multiple -arch options
meson.build:889:6: ERROR: Could not get define 'ETIME'