[PC-BSD] CC-flags when building custom kernel

This forum discusses issues related to running FreeBSD on notebooks, laptops, and other mobile equipment.

[PC-BSD] CC-flags when building custom kernel

Postby DaftWullie » 16 Feb 2012, 18:47

Hi all,

Although I played with FreeBSD 5.x years ago, I'm fairly new to FreeBSD. I currently installed PC-BSD 9.0 RELEASE on a Thinkpad Z61t and basically, everything works fine.

As I like playing around with new systems, I'm currently into building my own kernel. My first tries work quite well: after creating my own config file and editing [FILE]/etc/make.conf[/FILE], building, installing and booting my own custom kernel was a quite satisfying proces... :-)

Watching the build proces, I wondered why [FILE]CPUTYPE=core[/FILE] resulted in [FILE]-march=prescott[/FILE] flags for [FILE]cc[/FILE]. According to some discussions in the web I found, this apparently is the right behaviour and no error, and has to do something with SSE vs. FPU-Performance etc.

But what I don't understand and what I can't find an explanation for: Why are [FILE]-mno-mmx[/FILE], [FILE]-mno-sse[/FILE] and [FILE]-msoft-float[/FILE] flags passed to most (all?) [FILE]cc[/FILE] calls while making the kernel, although they are not part of my [FILE]make.conf[/FILE]?

Looking forward to learn from you all,

DaftWullie
DaftWullie
Junior Member
 
Posts: 3
Joined: 16 Feb 2012, 09:13
Location: Ottensoos, Bavaria, Germany

Postby DutchDaemon » 16 Feb 2012, 18:55

Disclaimer: Topics about PC-BSD | FreeNAS | DesktopBSD | m0N0WALL | pfSense | Debian GNU/kFreeBSD. FreeBSD and PC-BSD are not the exact same thing.
User avatar
DutchDaemon
Old Fart
 
Posts: 10463
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby DaftWullie » 16 Feb 2012, 19:53

Hi,

Thank you for your answer.

Sure, I know that PC-BSD is not exactly the same as FreeBSD. But I didn't know that there are kernel-related changes in PC-BSD. All files and their docu ([FILE]dmesg.boot[/FILE], kernel config-files, [FILE]make.conf[/FILE], makefiles) talk solely about FreeBSD, with no single reference to PC-BSD. So I thought FreeBSD is the place to ask.

Sorry for that.

DaftWullie
DaftWullie
Junior Member
 
Posts: 3
Joined: 16 Feb 2012, 09:13
Location: Ottensoos, Bavaria, Germany

Postby DutchDaemon » 17 Feb 2012, 00:32

It's not forbidden to ask something concerning PC-BSD here, so long as you're aware of the disclaimer above (basically: "Following FreeBSD advice may damage derivative and customized systems"). We do prefer that you ask at the PC-BSD forums first, because this community and forum concentrates on FreeBSD first and foremost.
User avatar
DutchDaemon
Old Fart
 
Posts: 10463
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby phoenix » 17 Feb 2012, 05:26

Floating-point operations are not used in the kernel itself, and are not allowed inside the kernel. Thus, the FreeBSD build system turns off all floating-point options in GCC in order to prevent any FPU operations slipping in via "optimisations". MMX, SSE, AVX, 3DNow!, and so on are all floating-point extensions.
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
User avatar
phoenix
MFC'd
 
Posts: 3349
Joined: 17 Nov 2008, 05:43
Location: Kamloops, BC, Canada

Postby DaftWullie » 19 Feb 2012, 18:56

Hi Phoenix, thanks a lot.

That's the Info I was looking for!


DaftWullie
DaftWullie
Junior Member
 
Posts: 3
Joined: 16 Feb 2012, 09:13
Location: Ottensoos, Bavaria, Germany


Return to Mobile Computing

Who is online

Users browsing this forum: No registered users and 0 guests