Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Development (http://www.linux-archive.org/gentoo-development/)
-   -   Kernel calls gcc directly: fine? (http://www.linux-archive.org/gentoo-development/693216-kernel-calls-gcc-directly-fine.html)

Jeroen Roovers 08-12-2012 02:32 PM

Kernel calls gcc directly: fine?
 
On Sun, 12 Aug 2012 16:19:59 +0200
Agostino Sarubbo <ago@gentoo.org> wrote:

> If you try to launch make V=1 from the kernel source directory you
> will see:

> snip <

> So it calls gcc directly.

Yes. That is called a default.

Set CC on the make command line or set CONFIG_CROSS_COMPILE through
make *config if you don't like the default.

> I see we don't like gcc called directly from the tracker[1], but this
> is for packages/ebuild. Should this bug block that tracker or it is
> invalid?

What bug (report)?

The kernel build system cannot guess what compiler you want to use, so
it defaults to CC=gcc. It's a feature.


jer

Doug Goldstein 08-12-2012 07:59 PM

Kernel calls gcc directly: fine?
 
On Sun, Aug 12, 2012 at 9:19 AM, Agostino Sarubbo <ago@gentoo.org> wrote:
> If you try to launch make V=1 from the kernel source directory you will see:
>
> gcc -Wp,-MD,scripts/mod/.empty.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-
> pc-linux-gnu/4.5.3/include -I/usr/src/linux-3.3.8-gentoo/arch/x86/include -
> Iarch/x86/include/generated -Iinclude -include /usr/src/linux-3.3.8-
> gentoo/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes
> -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-
> declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -
> march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-
> outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -
> DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-
> asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-
> larger-than=2048 -fno-stack-protector -fomit-frame-pointer -Wdeclaration-
> after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -
> DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -
> D"KBUILD_BASENAME=KBUILD_STR(empty)" -D"KBUILD_MODNAME=KBUILD_STR(empty)" -c
> -o scripts/mod/empty.o scripts/mod/empty.c
>
>
> So it calls gcc directly.
>
> I see we don't like gcc called directly from the tracker[1], but this is for
> packages/ebuild. Should this bug block that tracker or it is invalid?
>
>
> [1]: https://bugs.gentoo.org/show_bug.cgi?id=cc-directly
>

Its invalid. Kbuild has its own documented way to do cross compiles
and replace out the compiler (granted only gcc works for building the
official Linux tree, there has been efforts to use clang and icc but
those are not mainlined).

--
Doug Goldstein

Ryan Hill 08-13-2012 02:24 AM

Kernel calls gcc directly: fine?
 
On Sun, 12 Aug 2012 16:19:59 +0200
Agostino Sarubbo <ago@gentoo.org> wrote:

> So it calls gcc directly.
>
> I see we don't like gcc called directly from the tracker[1], but this is for
> packages/ebuild. Should this bug block that tracker or it is invalid?
>
>
> [1]: https://bugs.gentoo.org/show_bug.cgi?id=cc-directly

We have no business controlling how software is built outside the package
manager. This is a make default, it's not kernel specific.


--
gcc-porting you were never more here, expanse getting broader
toolchain, wxwidgets though bigger boats been done by less water
@ gentoo.org


All times are GMT. The time now is 06:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.