[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Compiling the kernel using GCC
From:       Ryan Libby <rlibby () gmail ! com>
Date:       2017-08-27 4:51:52
Message-ID: CAHgpiFyq2Y3n_M-v0OFDfMu6H1WoKQ+zroTf3h0p3-s70xMDRw () mail ! gmail ! com
[Download RAW message or body]

On Sat, Aug 26, 2017 at 2:41 AM, Aijaz Baig <aijazbaig1@gmail.com> wrote:
> Has anyone been able to successfully compile the kernel using GCC as
> against CLANG the default compiler on most later versions of FreeBSD? I was
> able to successfully buildworld. After which I reboot and now /usr/bin/cc
> points to GCC as requested. However kernel fails to link
[...]
> make  -D KERNFAST -m /usr/src/share/mk  KERNEL=kernel all -DNO_MODULES_OBJ
> linking kernel.full
> ck_array.o: In function `ck_cc_popcount':
> /usr/src/sys/contrib/ck/include/gcc/ck_cc.h:139: undefined reference to
> `__popcountdi2'
[...]

Do you need ck?  Can you share your KERNCONF?  And the branch and
revision you are building?

I have been building an amd64 GENERIC kernel on head with various gccs.
I think that does not build ck.  The main method I have been focusing on
for now is

make CROSS_TOOLCHAIN=amd64-gcc TARGET=amd64 TARGET_ARCH=amd64 buildkernel

with the amd64-xtoolchain-gcc-0.2 package installed.  But I have also
built kernel-only successfully with gcc 6 with src.conf e.g. as below.

% cat /etc/src.conf.gcc6
WITH_GCC=yes
WITH_GCC_BOOTSTRAP=yes
WITH_GCC_IS_CC=yes
WITHOUT_CLANG=yes
WITHOUT_CLANG_BOOTSTRAP=yes
WITHOUT_CLANG_IS_CC=yes
WITHOUT_FORMAT_EXTENSIONS=yes
CC=/usr/local/bin/gcc6
CXX=/usr/local/bin/g++6
_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic