lkml.org 
[lkml]   [2012]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC][PATCH 4/6] x86, boot: Restrict CFLAGS for hostprogs
    Date
    From: Matt Fleming <matt.fleming@intel.com>

    Currently tools/build has access to all the kernel headers in
    $(srctree). This is unnecessary and could potentially allow
    tools/build to erroneously include kernel headers when it should only
    be including userspace-exported headers.

    Unfortunately, mkcpustr still needs access to some of the asm kernel
    headers, so explicitly special case that hostprog.

    Cc: H. Peter Anvin <hpa@zytor.com>
    Signed-off-by: Matt Fleming <matt.fleming@intel.com>
    ---
    arch/x86/boot/Makefile | 5 +++--
    1 files changed, 3 insertions(+), 2 deletions(-)

    diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
    index 95365a8..3e02148 100644
    --- a/arch/x86/boot/Makefile
    +++ b/arch/x86/boot/Makefile
    @@ -37,8 +37,9 @@ setup-y += video-bios.o
    targets += $(setup-y)
    hostprogs-y := mkcpustr tools/build

    -HOST_EXTRACFLAGS += $(LINUXINCLUDE)
    -
    +HOSTCFLAGS_mkcpustr.o := -I$(srctree)/arch/$(SRCARCH)/include
    +HOST_EXTRACFLAGS += -I$(objtree)/include -I$(srctree)/tools/include \
    + -include $(srctree)/include/linux/kconfig.h
    $(obj)/cpu.o: $(obj)/cpustr.h

    quiet_cmd_cpustr = CPUSTR $@
    --
    1.7.4.4


    \
     
     \ /
      Last update: 2012-02-28 14:41    [W:0.019 / U:60.520 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site