[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Thinking about a "jessie and a half" release

>>> Is anybody else interested in helping? Thoughts/comments?
>>Sorry to bump an old thread....
>>Please consider moving to Clang 3.8 or 4.0 as the LLVM front end for
>>the platform.
>>Clang 3.5 and 3.6 are no longer maintained. The bugs we are
>>discovering and reporting are being closed as "invalid" and "won't
>>fix" because Clang is outside its freshness date.
>>Also pick up this for glibc:
>>. Though it was first seen in Clang 3.3, its still a problem today.
> ACK, thanks for thinking about this still.
> Progress to date has been quiet, but work is ongoing. KiBi has a good
> set of patches ready for d-i already, and I'm working on debian-cd to
> add useful backports support. My first quick-hack attempt failed
> dismally, so I'm midway down a more disruptive but thorough set of
> changes now.

Another pothole for Clang... '-march=native' does not perform as
expected at least about one third of the time. I have not narrowed it
down, but it affects at least MacPorts and Ubuntu. Apple Clang appears
to be OK. I don't recall the results of Debian testing.

When we added code generation tests to our test script, we found Clang
was not generating SSE3, SSSE3, SSE4, AVX, BMI, etc. The work around
in the field is to cat /proc/cpuinfo, and then do something like the
following based on the CPU flags (from

X86_CPU_FLAGS=$(cat /proc/cpuinfo 2>&1 | "$AWK" '{IGNORECASE=1}{if ($1
== "flags"){print;exit}}' | cut -f 2 -d ':')

if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "sse2") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-msse2"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "sse3") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-msse3"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "ssse3") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-mssse3"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "sse4.1") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-msse4.1"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "sse4.2") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-msse4.2"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "aes") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-maes"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "pclmulqdq") -ne "0")
]]; then PLATFORM_CXXFLAGS+=("-mpclmul"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "rdrand") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-mrdrnd"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "rdseed") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-mrdseed"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "avx") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-mavx"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "avx2") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-mavx2"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "bmi") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-mbmi"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "bmi2") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-mbmi2"); fi
if [[ ($(echo -n "$X86_CPU_FLAGS" | "$GREP" -c "adx") -ne "0") ]];
then PLATFORM_CXXFLAGS+=("-madx"); fi

Most users don't realize the silent failure is occurring. Ideally,
this would be fixed in the compiler front end.

Also see Clang {3.4|3.5|3.6|3.7} only advertises SSE2:


Reply to: