this post was submitted on 27 May 2025
46 points (81.1% liked)

Linux

54461 readers
586 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

The X86_NATIVE_CPU Kconfig build time parameter has been merged for the Linux 6.16 merge window as an easy way to enforce the “-march=native” compiler behavior on AMD and Intel processors to optimize kernel builds for your system's local CPU architecture/family. For those who want “-march=native” for Linux kernel builds on AMD/Intel x86_64 processors, you can easily include a new CONFIG_X86_NATIVE_CPU parameter to set this compiler behavior in local kernel builds. The CONFIG_X86_NATIVE_CPU parameter is considered when compiling the Linux x86_64 kernel with GCC or LLVM Clang when using Clang 19 or later due to a compiler bug in the Linux kernel in older compiler versions. In addition to setting the compiler parameter “-march=native” for Linux kernel C code, enabling this new Kconfig build parameter also sets “-Ctarget-cpu=native” for Rust kernel code.

you are viewing a single comment's thread
view the rest of the comments
[–] Thebigguy@lemmy.ml 3 points 1 day ago (6 children)

That’s cool, in order to use this would I have to compile a kernel myself or could I set this in my distribution somewhere?

[–] Mirokhodets@lemmy.ml 2 points 1 day ago (1 children)

Yes, to use the CONFIG_X86_NATIVE_CPU option, you will need to compile the kernel yourself with this option enabled. This is a compile-time setting that affects how the compiler optimizes the build specifically for your system. Prebuilt kernels from distro repositories usually do not have this enabled, since they are built for broad compatibility with many different processors.

[–] Thebigguy@lemmy.ml 2 points 1 day ago (1 children)

I‘m assuming if I want updates I’d need to create my own repository?

[–] Mirokhodets@lemmy.ml 2 points 1 day ago

Creating a repository is not absolutely necessary, but it will make the process of updating the kernel much easier in the future. If you plan to frequently update the kernel with custom settings, creating a repository is a smart choice. If you update the kernel very rarely, you can get by with manual compilation.

load more comments (4 replies)