Skip to content
Snippets Groups Projects
  • Bruce Ashfield's avatar
    99c41dad
    perf: add SLANG_INC for slang.h · 99c41dad
    Bruce Ashfield authored
    
    1/1 [
    Author: Liang Li
    Email: liang.li@windriver.com
    Subject: perf: add SLANG_INC for slang.h
    Date: Wed, 22 Aug 2012 16:04:50 +0800
    
    CFLAGS was previously hard coded to contain "-I/usr/include/slang" to
    work with hosts that have "/usr/include/slang/slang.h" as well as hosts
    that have "/usr/include/slang.h". This path can cause compile warnings
    like:
    
    cc1: warning: '/usr/include/slang' doesn't exists.
    
    or
    
    cc1: warning: include location "/usr/include/slang" is unsafe for
    cross-compilation [-Wpoison-system-directories]
    
    Then in some cases warnings become errors if WERROR is enabled hence
    build errors.
    
    To fix this issue, we can use -idirafter to downgrade the priority of the
    default hard coded path. We can also make the slang include directory
    a variable, to allow the user to specify SLANG_INC and set their own
    include location. And add a '=' prefix to indicate better
    compatibility with sysroot/cross compile cases.
    
    Signed-off-by: default avatarLiang Li <liang.li@windriver.com>
    ]
    
    Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@windriver.com>
    99c41dad
    History
    perf: add SLANG_INC for slang.h
    Bruce Ashfield authored
    
    1/1 [
    Author: Liang Li
    Email: liang.li@windriver.com
    Subject: perf: add SLANG_INC for slang.h
    Date: Wed, 22 Aug 2012 16:04:50 +0800
    
    CFLAGS was previously hard coded to contain "-I/usr/include/slang" to
    work with hosts that have "/usr/include/slang/slang.h" as well as hosts
    that have "/usr/include/slang.h". This path can cause compile warnings
    like:
    
    cc1: warning: '/usr/include/slang' doesn't exists.
    
    or
    
    cc1: warning: include location "/usr/include/slang" is unsafe for
    cross-compilation [-Wpoison-system-directories]
    
    Then in some cases warnings become errors if WERROR is enabled hence
    build errors.
    
    To fix this issue, we can use -idirafter to downgrade the priority of the
    default hard coded path. We can also make the slang include directory
    a variable, to allow the user to specify SLANG_INC and set their own
    include location. And add a '=' prefix to indicate better
    compatibility with sysroot/cross compile cases.
    
    Signed-off-by: default avatarLiang Li <liang.li@windriver.com>
    ]
    
    Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@windriver.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.