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

Discussion in 'Mobile Computing' started by DaftWullie, Feb 16, 2012.

  1. DaftWullie

    DaftWullie New Member

    Messages:
    3
    Likes Received:
    0
    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
     
  2. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,661
    Likes Received:
    23
  3. DaftWullie

    DaftWullie New Member

    Messages:
    3
    Likes Received:
    0
    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
     
  4. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,661
    Likes Received:
    23
    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.
     
  5. phoenix

    phoenix Moderator Staff Member Moderator

    Messages:
    3,407
    Likes Received:
    2
    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.
     
  6. DaftWullie

    DaftWullie New Member

    Messages:
    3
    Likes Received:
    0
    Hi Phoenix, thanks a lot.

    That's the Info I was looking for!


    DaftWullie