Re: [PATCH] More accessible usage of custom flags

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nicholas Marquez
Date: Sunday, February 24, 2008 - 1:00 pm

On Sun, Feb 24, 2008 at 7:50 AM, Nick Andrew <nick@nick-andrew.net> wrote:

The problem with this is that it is very static.  As you are well
aware, options differ between gcc versions.  Some options also differ
in result depending on the gcc version; for example, -ftree-vectorize
in gcc 3.x versus gcc 4.x.  I believe that it would be cleaner to have
the custom flag menu and suggest some flags for specific uses, such as
-Os,  in the help description. It might look something like:

help
         You can use this to easily set custom gcc CFLAGS to be used
         for the entire kernel build process (including modules).

         Examples include:
         ~"-Os" to optimize for size, i.e. for an embedded system or for
         more efficient cache usage
         ~"-s" to strip all symbol table and relocation information

         Other compiler flags can be used for increasing or reducing
         optimisation, enabling debugging, cross compilation
         and so on.  Please use "info gcc" or "man gcc" for more
         reference.

         If unsure, leave blank.

And for LDFLAGS, examples include:
          ~"-S" to strip all debugging symbols, which are usually unnecessary
          unless you intend to debug the kernel
          ~"-s" to strip all symbol information from the kernel

And for MAKEFLAGS, examples could include:
          ~"-j{n}" where n is the number of jobs you'd like to run for
          make.  This will make the kernel building process be greatly
          faster.  A good rule of thumb is for n to be 1 + the number of
          processor cores that are on the compiling machine.
          ~"-K" to attempt to continue compilation, even if errors are
          encountered, running until all other compilation paths (that
          do not depend on any that have errored) complete.

These are of course, just a few examples, but it serves to show the idea.


Glad you agree. ;)

Is anyone else out there reading these messages?  Cleaning and
"upgrading" the kernel's configuration and build systems is something
that could both use a lot of input and a lot of helping hands.  ;)  If
you've any patches for usability, aesthetics, optimization,
configuration or build robustness, etc., now would be the time to
share.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] More accessible usage of custom flags, Nicholas Marquez, (Sat Feb 16, 7:52 pm)
Re: [PATCH] More accessible usage of custom flags, Alexey Dobriyan, (Sun Feb 17, 3:37 am)
Re: [PATCH] More accessible usage of custom flags, Nicholas Marquez, (Sun Feb 17, 9:34 am)
Re: [PATCH] More accessible usage of custom flags, Nicholas Marquez, (Sat Feb 23, 2:28 pm)
Re: [PATCH] More accessible usage of custom flags, Nick Andrew, (Sat Feb 23, 3:04 pm)
Re: [PATCH] More accessible usage of custom flags, Nicholas Marquez, (Sat Feb 23, 3:28 pm)
Re: [PATCH] More accessible usage of custom flags, Nick Andrew, (Sat Feb 23, 4:39 pm)
Re: [PATCH] More accessible usage of custom flags, Nicholas Marquez, (Sun Feb 24, 2:36 am)
Re: [PATCH] More accessible usage of custom flags, Nick Andrew, (Sun Feb 24, 5:50 am)
Re: [PATCH] More accessible usage of custom flags, Nicholas Marquez, (Sun Feb 24, 1:00 pm)
Re: [PATCH] More accessible usage of custom flags, Bill Davidsen, (Thu Feb 28, 12:45 pm)