Gentoo Archives: gentoo-embedded

From: "Peter S. Mazinger" <ps.m@×××.net>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] upgrading to gcc-3.3.6
Date: Mon, 31 Oct 2011 03:58:11
Message-Id: Pine.LNX.4.44.0510030822470.17257-100000@lnx.bridge.intra
In Reply to: Re: [gentoo-embedded] upgrading to gcc-3.3.6 by Natanael Copa
On Mon, 26 Sep 2005, Natanael Copa wrote:

> Peter S. Mazinger wrote: > > >On Thu, 22 Sep 2005, Natanael Copa wrote: > > > > > > > >>I upgraded to gcc-3.3.6 today and when recompiling the drivers (kernel > >>modules in the portage tree) I got some warnings and the modules fails > >>to load: > >> > >> > >>WARNING: //lib/modules/2.6.11-hardened-r15/fs/fuse.ko needs unknown > >>symbol __sta ck_smash_handler > >> > >> > ... > > >>So I guess there is something wrong with my gcc upgrade. I guess I need > >>to do a proper toolchain upgrade? > >> > >> > > > >no, your module build process (Makefiles) does not add -D__KERNEL__ to the > >build, so ssp will be enabled on the built modules (not supported by any > >gentoo kernel). > >Nothing in the kernel and module build process is allowed to enable > >-fstack-protector (either by CFLAGS or any other method) > >Rebuild one of the above modules and paste your compiler line. > > > > > > I worked around it by selecting the nossp gcc profile, compiled all the > modules and switched back to the standard hardened gcc profile. Now I > cannot reproduce it. > > Could it have been a bug in portage that have been fixed? (I did a > emerge -ssync today to get that gdbm update)
I don't think so, as I said, the way you compiled your modules was incorrect. if gcc gets -D__KERNEL__ no ssp is enabled (independently of the chosen hardened/non-hardened compiler), if you build within the normal kernel tree, this is set for you, but if you try to build addons, this has to be done by the Makefile used. That's why I asked for your command-line for one of these modules (to clarify this) ... it seems too late. Peter -- Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2 Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2 -- gentoo-embedded@g.o mailing list