Community
cancel
Showing results for 
Search instead for 
Did you mean: 
felix_s_1
Beginner
58 Views

System Studio and the FreeBSD Kernel

Hi everyone,

 

 

 

 

 

 

I'm not sure if this is the right place to post this question, but here it goes. I have played around in the past with the Intel C++ compiler for Linux and achieved very good results. Moreover, not so long ago I had the task of rebuilding the Linux kernel using the Intel compiler suite - which went very well and without any critical failures!

Recently I got acquainted with the FreeBSD compiler, which I found a very interesting step from Intel, and I decided that it would be a big leap if I recompiled (using the make buildworld) command the BSD kernel using the Intel System Studio suite.

First, I modified the Makefile in /etc/make.conf to the following:

CC=/opt/intel/system_studio_freebsd_2016.3.024/bin/intel64/icl
CXX=/opt/intel/system_studio_freebsd_2016.3.024/bin/intel64/icl++
CPP=/opt/intel/system_studio_freebsd_2016.3.024/bin/intel64/icl -P
COMPILER_TYPE="ICL"

For those who are curious, the COMPILER_TYPE is needed to suppress a message about getting the compiler version, and the -P flag in the CPP field has to do with a problem described in https://wiki.freebsd.org/BuildingFreeBSDWithClang (something to do with RPC).

The entire procedure went well up until this point:

make -f /usr/src/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile MFILE=/usr/src/gnu/lib/libgcc/../../usr.bin/cc/cc_tools/Makefile GCCDIR=/usr/src/gnu/lib/libgcc/../../../contrib/gcc gthr-default.h
ln -sf /usr/src/gnu/lib/libgcc/../../../contrib/gcc/gthr-posix.h gthr-default.h
/opt/intel/system_studio_freebsd_2016.3.024/bin/intel64/icl -c -I/usr/lib -I/lib   -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -DHAVE_GTHR_DEFAULT  -I/usr/src/gnu/lib/libgcc/../../../contrib/gcclibs/include  -I/usr/src/gnu/lib/libgcc/../../../contrib/gcc/config -I/usr/src/gnu/lib/libgcc/../../../contrib/gcc -I.  -I/usr/src/gnu/lib/libgcc/../../usr.bin/cc/cc_tools -std=gnu99    -fvisibility=hidden -DHIDE_EXPORTS -fPIC -fexceptions -D__GLIBC__=3 -DElfW=__ElfN -o unwind-dw2.o /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c
<unknown file>(0) (col 0): internal error: 010101_1141
compilation aborted for /usr/src/gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c (code 1)
*** Error code 1

Stop.
make[4]: stopped in /usr/src/gnu/lib/libgcc
*** Error code 1

Stop.
make[3]: stopped in /usr/src
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

Which is a very strange error (it actually happens when the system is trying to rebuild the libraries!), I've tried isolating the problem, but with no luck. Trying the same procedure with CLang/LLVM works fine, so I would assume it should work just as well when using ICL.

I would be very grateful if someone could point me in the right direction!

0 Kudos
2 Replies
Hubert_H_Intel
Employee
58 Views

Hi Felix,

Thanks for your report. We will have a look at it soon.

Regards, Hubert.

Devorah_H_Intel
Moderator
58 Views

Hello Felix,

Thank you for submitting the question. I am currently working on possible solutions for your issue with building FreeBSD kernel.

Regards,

 

Reply