• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

DaftWullie

New Member


Messages: 3

#1
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
 

DaftWullie

New Member


Messages: 3

#3
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 (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

Administrator
Staff member
Administrator
Moderator

Thanks: 2,451
Messages: 11,084

#4
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

Administrator
Staff member
Administrator
Moderator

Thanks: 1,031
Messages: 3,818

#5
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.