Showing posts with label compilation. Show all posts
Showing posts with label compilation. Show all posts

Getting the Right Kernel Configuration for Your System the Easy Way

If you're lazy (and/or smart), you still want to compile a kernel for your system and save the time compiling all the things you don't need, then make localmodconfig is your friend. It will create a .config from the modules you have loaded, as Christoph Hellwig did not fail to mention repeatedly at the LinuxTag. But there are two caveats.

Mixed Static and Shared Library Linking with GCC

If you want to link some libraries statically and other dynamically you can use these switches:

-Wl,-Bstatic -lsomelibstatically -Wl,-Bdynamic -lotherlibshared

If you just want to compile it all statically, use LDFLAGS="-static".