aboutsummaryrefslogtreecommitdiff
path: root/include/linux/compiler-gcc3.h
AgeCommit message (Collapse)AuthorFilesLines
2013-02-21compiler-gcc{3,4}.h: Use GCC_VERSION macroDaniel Santos1-4/+4
Using GCC_VERSION reduces complexity, is easier to read and is GCC's recommended mechanism for doing version checks. (Just don't ask me why they didn't define it in the first place.) This also makes it easy to merge compiler-gcc{,3,4}.h should somebody want to. Signed-off-by: Daniel Santos <[email protected]> Acked-by: David Rientjes <[email protected]> Acked-by: Borislav Petkov <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Joe Perches <[email protected]> Cc: Josh Triplett <[email protected]> Cc: Paul Gortmaker <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22include/linux/compiler-gcc*.h: unify macro definitionsBorislav Petkov1-8/+0
Unify identical gcc3.x and gcc4.x macros. Signed-off-by: Borislav Petkov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-18gcov: add gcov profiling infrastructurePeter Oberparleiter1-0/+6
Enable the use of GCC's coverage testing tool gcov [1] with the Linux kernel. gcov may be useful for: * debugging (has this code been reached at all?) * test improvement (how do I change my test to cover these lines?) * minimizing kernel configurations (do I need this option if the associated code is never run?) The profiling patch incorporates the following changes: * change kbuild to include profiling flags * provide functions needed by profiling code * present profiling data as files in debugfs Note that on some architectures, enabling gcc's profiling option "-fprofile-arcs" for the entire kernel may trigger compile/link/ run-time problems, some of which are caused by toolchain bugs and others which require adjustment of architecture code. For this reason profiling the entire kernel is initially restricted to those architectures for which it is known to work without changes. This restriction can be lifted once an architecture has been tested and found compatible with gcc's profiling. Profiling of single files or directories is still available on all platforms (see config help text). [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html Signed-off-by: Peter Oberparleiter <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Huang Ying <[email protected]> Cc: Li Wei <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Rusty Russell <[email protected]> Cc: WANG Cong <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-01-02Disallow gcc versions 3.{0,1}Ingo Molnar1-0/+4
GCC 3.0 and 3.1 are too old to build a working kernel. Signed-off-by: Ingo Molnar <[email protected]> [ This check got dropped as obsolete when I simplified the gcc header inclusion mess in f153b82121b0366fe0e5f9553545cce237335175, but Willy Tarreau reports actually having those old versions still.. -Linus ] Signed-off-by: Linus Torvalds <[email protected]>
2009-01-02Sanitize gcc version header includesLinus Torvalds1-3/+0
- include the gcc version-dependent header files from the generic gcc header file, rather than the other way around (iow: don't make the non-gcc header file have to know about gcc versions) - don't include compiler-gcc4.h for gcc 5 (for whenever it gets released). That's just confusing and made us do odd things in the gcc4 header file (testing that we really had version 4!) - generate the name from the __GNUC__ version directly, rather than having a mess of #if conditionals. Signed-off-by: Linus Torvalds <[email protected]>
2008-01-28remove __attribute_used__Adrian Bunk1-2/+0
Remove the deprecated __attribute_used__. [Introduce __section in a few places to silence checkpatch /sam] Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-10-17Force erroneous inclusions of compiler-*.h files to be errorsRobert P. J. Day1-1/+3
Replace worthless comments with actual preprocessor errors when including the wrong versions of the compiler.h files. [[email protected]: make it work] Signed-off-by: Robert P. J. Day <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-05-09compiler: introduce __used and __maybe_unusedDavid Rientjes1-2/+4
__used is defined to be __attribute__((unused)) for all pre-3.3 gcc compilers to suppress warnings for unused functions because perhaps they are referenced only in inline assembly. It is defined to be __attribute__((used)) for gcc 3.3 and later so that the code is still emitted for such functions. __maybe_unused is defined to be __attribute__((unused)) for both function and variable use if it could possibly be unreferenced due to the evaluation of preprocessor macros. Function prototypes shall be marked with __maybe_unused if the actual definition of the function is dependant on preprocessor macros. No update to compiler-intel.h is necessary because ICC supports both __attribute__((used)) and __attribute__((unused)) as specified by the gcc manual. __attribute_used__ is deprecated and will be removed once all current code is converted to using __used. Cc: Rusty Russell <[email protected]> Cc: Adrian Bunk <[email protected]> Signed-off-by: David Rientjes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-05-07Add unitialized_var() macro for suppressing gcc warningsBorislav Petkov1-0/+6
Introduce a macro for suppressing gcc from generating a warning about a probable uninitialized state of a variable. Example: - spinlock_t *ptl; + spinlock_t *uninitialized_var(ptl); Not a happy solution, but those warnings are obnoxious. - Using the usual pointlessly-set-it-to-zero approach wastes several bytes of text. - Using a macro means we can (hopefully) do something else if gcc changes cause the `x = x' hack to stop working - Using a macro means that people who are worried about hiding true bugs can easily turn it off. Signed-off-by: Borislav Petkov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-01-14[PATCH] Make __always_inline actually force always inliningIngo Molnar1-0/+1
This patch is the first in a series that tries to optimize the kernel in terms of size (and thus cache behavior, both cpu and pagecache). This first patch changes __always_inline to be a forced inline instead of the "regular" inline it was on everything except alpha. This forced inline matches the intention of the define better as a matter of documentation. There is no change in behavior by this patch, since "inline" currently is mapped to a forced inline anyway. Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-01-08[PATCH] remove gcc-2 checksAndrew Morton1-17/+0
Remove various things which were checking for gcc-1.x and gcc-2.x compilers. From: Adrian Bunk <[email protected]> Some documentation updates and removes some code paths for gcc < 3.2. Acked-by: Russell King <[email protected]> Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+32
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!