Gentoo Archives: gentoo-dev

From: Doug Goldstein <cardoe@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Kernel calls gcc directly: fine?
Date: Sun, 12 Aug 2012 20:00:19
Message-Id: CAFWqQMRRQ1sHePFUP5OZ7kEVpBtOG5CgOmfzuYDZGtqmQ=gHHg@mail.gmail.com
In Reply to: [gentoo-dev] Kernel calls gcc directly: fine? by Agostino Sarubbo
1 On Sun, Aug 12, 2012 at 9:19 AM, Agostino Sarubbo <ago@g.o> wrote:
2 > If you try to launch make V=1 from the kernel source directory you will see:
3 >
4 > gcc -Wp,-MD,scripts/mod/.empty.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-
5 > pc-linux-gnu/4.5.3/include -I/usr/src/linux-3.3.8-gentoo/arch/x86/include -
6 > Iarch/x86/include/generated -Iinclude -include /usr/src/linux-3.3.8-
7 > gentoo/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes
8 > -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-
9 > declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -
10 > march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-
11 > outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -
12 > DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-
13 > asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-
14 > larger-than=2048 -fno-stack-protector -fomit-frame-pointer -Wdeclaration-
15 > after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -
16 > DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -
17 > D"KBUILD_BASENAME=KBUILD_STR(empty)" -D"KBUILD_MODNAME=KBUILD_STR(empty)" -c
18 > -o scripts/mod/empty.o scripts/mod/empty.c
19 >
20 >
21 > So it calls gcc directly.
22 >
23 > I see we don't like gcc called directly from the tracker[1], but this is for
24 > packages/ebuild. Should this bug block that tracker or it is invalid?
25 >
26 >
27 > [1]: https://bugs.gentoo.org/show_bug.cgi?id=cc-directly
28 >
29
30 Its invalid. Kbuild has its own documented way to do cross compiles
31 and replace out the compiler (granted only gcc works for building the
32 official Linux tree, there has been efforts to use clang and icc but
33 those are not mainlined).
34
35 --
36 Doug Goldstein