lkml.org 
[lkml]   [2005]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] m32r: set CHECKFLAGS properly
    Date
    On Sep 27, 2005, at 03:10:25, Al Viro wrote:
    > You do realize that this way sparse will get neither? It does not
    > pick predefined symbols from gcc; thus the -D<your_arch>, etc.

    How about sticking this in some global Makefile somewhere? This will
    give sparse the same list of defines that GCC uses:

    CHECKFLAGS += $(shell echo | gcc -E - -dM | sed -re 's/^#define +([^ ]
    +) +(.*)$/-D\1=\2/g')

    Or you could do this:

    include/linux/checkerdefines.h:
    echo | gcc -E - -dM >$@

    And in linux/stddef.h or linux/compiler.h or something do:
    #if defined(__CHECKER__) and not defined(_LINUX_CHECKERDEFINES_H)
    # define _LINUX_CHECKERDEFINES_H 1
    # include <linux/checkerdefines.h>
    #endif

    Cheers,
    Kyle Moffett

    --
    Q: Why do programmers confuse Halloween and Christmas?
    A: Because OCT 31 == DEC 25.



    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-09-27 17:18    [W:2.486 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site