Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it safe to use customized CFLAGS while compiling linux kernel, e.g enable SSE, MMX instructions, is that a problem ?

share|improve this question
    
I think the kernel makefiles already pick decent flags. I'd be wary of changing them, as the kernel source sometimes uses code that just happens to work with the expected version of GCC and may not be robust to unexpected compiler flags. –  Gilles Jul 18 '12 at 23:45
add comment

1 Answer 1

If you are building a custom kernel then you are already playing with features which may or may not work depending on version of GCC (as mentioned by GillieS) and other factors. So deciding to enable SSE,MX and so forth, probably doesn't introduce any more 'risk'. Basically, you are going to need to test your custom kernel extensively anyway, so it depends on what you call 'safe'.

If you are building modules (device drivers) for an existing kernel, then you really do need to use the same GCC as the kernel and the CFLAGS selected by the appropriate makefiles or you are asking for trouble.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.