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



## DaftWullie (Feb 16, 2012)

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 /etc/make.conf, building, installing and booting my own custom kernel was a quite satisfying proces... 

Watching the build proces, I wondered why CPUTYPE=core resulted in -march=prescott flags for cc. 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 -mno-mmx, -mno-sse and -msoft-float  flags passed to most (all?) cc calls while making the kernel, although they are not part of my make.conf?

Looking forward to learn from you all,

DaftWullie


----------



## DutchDaemon (Feb 16, 2012)

Disclaimer: Topics about PC-BSD | FreeNAS | DesktopBSD | m0N0WALL | pfSense | Debian GNU/kFreeBSD. FreeBSD and PC-BSD are not the exact same thing.


----------



## DaftWullie (Feb 16, 2012)

Hi,

*T*hank 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 (dmesg.boot, kernel config-files, make.conf, 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


----------



## DutchDaemon (Feb 17, 2012)

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.


----------



## phoenix (Feb 17, 2012)

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.


----------



## DaftWullie (Feb 19, 2012)

Hi Phoenix, thanks a lot.

*T*hat's the Info I was looking for!


DaftWullie


----------

