Project

General

Profile

Actions

Bug #2878

open

[fix] CCVER problem when using clang and cpu extensions (intrinsics)

Added by arcade@b1t.name almost 9 years ago. Updated over 8 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Build
Target version:
Start date:
12/30/2015
Due date:
% Done:

0%

Estimated time:

Description

Ok, I'm trying to compile dri with clang37. When I setting CCVER to clang37 build stops on:

In file included from utils.c:37:
In file included from ../../../../../src/mesa/main/macros.h:36:
../../../../../src/util/rounding.h:33:10: fatal error: 'xmmintrin.h' file not found
include <xmmintrin.h>
^
2 warnings and 1 error generated.

The file is present, but as per /etc/defaults/compiler.conf:

STD_INCOPT="-nostdinc -iprefix ${INCPREFIX} -iwithprefixbefore /usr/include"
DPORT_GCC_STD_INCOPTXX="-isystem /usr/local/lib/${CCVER}/include/c++ \
-isystem /usr/local/lib/${CCVER}/include/c++/${MACHARCH}-portbld-dragonfly${MACHREL}"
DPORT_CLANG_STD_INCOPTXX="-cxx-isystem /usr/include/c++/5.0"

...

clang37_INCOPT=${STD_INCOPT}
clang37_INCOPTCXX=${DPORT_CLANG_STD_INCOPTXX}

Actions #1

Updated by arcade@b1t.name almost 9 years ago

  • Subject changed from CCVER problem when using clang and cpu extensions (intrinsics) to [fix] CCVER problem when using clang and cpu extensions (intrinsics)

Looks like CCVER configuration for clang misses a few things:

1. INCOPT needs "-isystem /usr/local/llvm37/lib/clang/3.7.1/include" as this is the place for files that clang needs to work with intrinsics.
2. INCOPTCXX needs "-cxx-isystem /usr/include/c++/5.0/backward" as libstdxx misses a few things (seen when compiling firefox).
3. gcc/gxx can be superseded too as some ports just hardcode compiler names. Thus:

clang37_GCC=${clang37_CC}
clang37_GXX=${clang37_CXX}

As clang struggles to be mostly gcc compliant there's nothing bad with it probably.

Actions #2

Updated by marino almost 9 years ago

"3. gcc/gxx can be superseded too as some ports just hardcode compiler names."

Any port that hardcodes "gcc" is wrong. that's considered a bug, even when GCC is specified for the port. If you find a port like that, open a PR at FreeBSD.

Actions #3

Updated by arcade@b1t.name over 8 years ago

Well, those ports are devel/clang* and www/firefox*. If lang/gcc is installed it shadows /usr/bin/gcc and thus CCVER doesn't works.

Actions #4

Updated by dragonflybsd1 over 8 years ago

i'll need to see an actual excerpt to understand what you mean. I don't know what you mean by "shadow". lang/gcc simply being installed doesn't affect anything.

Actions #5

Updated by arcade@b1t.name over 8 years ago

Can't remember correctly what was there. Probably Firefox redefined path so /usr/local/bin/gcc was selected first before /usr/bin/gcc.

Actions

Also available in: Atom PDF