forked from Minki/linux
c93a0368aa
header-test-y does not work with headers in sub-directories.
For example, you may want to write a Makefile, like this:
include/linux/Kbuild:
header-test-y += mtd/nand.h
This entry will create a wrapper include/linux/mtd/nand.hdrtest.c
with the following content:
#include "mtd/nand.h"
To make this work, we need to add $(srctree)/include/linux to the
header search path. It would be tedious to add ccflags-y.
Instead, we could change the *.hdrtest.c rule to wrap:
#include "nand.h"
This works for in-tree build since #include "..." searches in the
relative path from the header with this directive. For O=... build,
we need to add $(srctree)/include/linux/mtd to the header search path,
which will be even more tedious.
After all, I thought it would be handier to compile headers directly
without creating wrappers.
I added a new build rule to compile %.h into %.h.s
The target is %.h.s instead of %.h.o because it is slightly faster.
Also, as for GCC, an empty assembly is smaller than an empty object.
I wrote the build rule:
$(CC) $(c_flags) -S -o $@ -x c /dev/null -include $<
instead of:
$(CC) $(c_flags) -S -o $@ -x c $<
Both work fine with GCC, but the latter is bad for Clang.
This comes down to the difference in the -Wunused-function policy.
GCC does not warn about unused 'static inline' functions at all.
Clang does not warn about the ones in included headers, but does
about the ones in the source. So, we should handle headers as
headers, not as source files.
In fact, this has been hidden since commit abb2ea7dfd
("compiler,
clang: suppress warning for unused static inline functions"), but we
should not rely on that.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Jani Nikula <jani.nikula@intel.com>
265 lines
2.6 KiB
Plaintext
265 lines
2.6 KiB
Plaintext
*.a
|
|
*.aux
|
|
*.bc
|
|
*.bin
|
|
*.bz2
|
|
*.c.[012]*.*
|
|
*.cis
|
|
*.cpio
|
|
*.csp
|
|
*.dsp
|
|
*.dvi
|
|
*.elf
|
|
*.eps
|
|
*.fw
|
|
*.gcno
|
|
*.gcov
|
|
*.gen.S
|
|
*.gif
|
|
*.grep
|
|
*.grp
|
|
*.gz
|
|
*.html
|
|
*.i
|
|
*.jpeg
|
|
*.ko
|
|
*.ll
|
|
*.log
|
|
*.lst
|
|
*.lzma
|
|
*.lzo
|
|
*.mo
|
|
*.moc
|
|
*.mod.c
|
|
*.o
|
|
*.o.*
|
|
*.order
|
|
*.orig
|
|
*.out
|
|
*.patch
|
|
*.pdf
|
|
*.plist
|
|
*.png
|
|
*.pot
|
|
*.ps
|
|
*.rej
|
|
*.s
|
|
*.sgml
|
|
*.so
|
|
*.so.dbg
|
|
*.symtypes
|
|
*.tab.c
|
|
*.tab.h
|
|
*.tex
|
|
*.ver
|
|
*.xml
|
|
*.xz
|
|
*_MODULES
|
|
*_vga16.c
|
|
*~
|
|
\#*#
|
|
*.9
|
|
.*
|
|
.*.d
|
|
.mm
|
|
53c700_d.h
|
|
CVS
|
|
ChangeSet
|
|
GPATH
|
|
GRTAGS
|
|
GSYMS
|
|
GTAGS
|
|
Image
|
|
Module.markers
|
|
Module.symvers
|
|
PENDING
|
|
SCCS
|
|
System.map*
|
|
TAGS
|
|
aconf
|
|
af_names.h
|
|
aic7*reg.h*
|
|
aic7*reg_print.c*
|
|
aic7*seq.h*
|
|
aicasm
|
|
aicdb.h*
|
|
altivec*.c
|
|
asm-offsets.h
|
|
asm_offsets.h
|
|
autoconf.h*
|
|
av_permissions.h
|
|
bbootsect
|
|
bin2c
|
|
binkernel.spec
|
|
bootsect
|
|
bounds.h
|
|
bsetup
|
|
btfixupprep
|
|
build
|
|
bvmlinux
|
|
bzImage*
|
|
capability_names.h
|
|
capflags.c
|
|
classlist.h*
|
|
comp*.log
|
|
compile.h*
|
|
conf
|
|
config
|
|
config-*
|
|
config.mak
|
|
config.mak.autogen
|
|
conmakehash
|
|
consolemap_deftbl.c*
|
|
cpustr.h
|
|
crc32table.h*
|
|
cscope.*
|
|
defkeymap.c
|
|
devlist.h*
|
|
devicetable-offsets.h
|
|
dnotify_test
|
|
dslm
|
|
dtc
|
|
elf2ecoff
|
|
elfconfig.h*
|
|
evergreen_reg_safe.h
|
|
fixdep
|
|
flask.h
|
|
fore200e_mkfirm
|
|
fore200e_pca_fw.c*
|
|
gconf
|
|
gconf-cfg
|
|
gen-devlist
|
|
gen_crc32table
|
|
gen_init_cpio
|
|
generated
|
|
genheaders
|
|
genksyms
|
|
*_gray256.c
|
|
hpet_example
|
|
hugepage-mmap
|
|
hugepage-shm
|
|
ihex2fw
|
|
inat-tables.c
|
|
initramfs_list
|
|
int16.c
|
|
int1.c
|
|
int2.c
|
|
int32.c
|
|
int4.c
|
|
int8.c
|
|
kallsyms
|
|
keywords.c
|
|
ksym.c*
|
|
ksym.h*
|
|
*lex.c
|
|
*lex.*.c
|
|
linux
|
|
logo_*.c
|
|
logo_*_clut224.c
|
|
logo_*_mono.c
|
|
mach-types
|
|
mach-types.h
|
|
machtypes.h
|
|
map
|
|
map_hugetlb
|
|
mconf
|
|
mconf-cfg
|
|
miboot*
|
|
mk_elfconfig
|
|
mkboot
|
|
mkbugboot
|
|
mkcpustr
|
|
mkdep
|
|
mkprep
|
|
mkregtable
|
|
mktables
|
|
mktree
|
|
mkutf8data
|
|
modpost
|
|
modules.builtin
|
|
modules.builtin.modinfo
|
|
modules.order
|
|
modversions.h*
|
|
nconf
|
|
nconf-cfg
|
|
ncscope.*
|
|
offset.h
|
|
oui.c*
|
|
page-types
|
|
parse.c
|
|
parse.h
|
|
patches*
|
|
pca200e.bin
|
|
pca200e_ecd.bin2
|
|
perf.data
|
|
perf.data.old
|
|
perf-archive
|
|
piggyback
|
|
piggy.gzip
|
|
piggy.S
|
|
pnmtologo
|
|
ppc_defs.h*
|
|
pss_boot.h
|
|
qconf
|
|
qconf-cfg
|
|
r100_reg_safe.h
|
|
r200_reg_safe.h
|
|
r300_reg_safe.h
|
|
r420_reg_safe.h
|
|
r600_reg_safe.h
|
|
randomize_layout_hash.h
|
|
randomize_layout_seed.h
|
|
recordmcount
|
|
relocs
|
|
rlim_names.h
|
|
rn50_reg_safe.h
|
|
rs600_reg_safe.h
|
|
rv515_reg_safe.h
|
|
series
|
|
setup
|
|
setup.bin
|
|
setup.elf
|
|
sortextable
|
|
sImage
|
|
sm_tbl*
|
|
split-include
|
|
syscalltab.h
|
|
tables.c
|
|
tags
|
|
test_get_len
|
|
tftpboot.img
|
|
timeconst.h
|
|
times.h*
|
|
trix_boot.h
|
|
utsrelease.h*
|
|
vdso-syms.lds
|
|
vdso.lds
|
|
vdso32-int80-syms.lds
|
|
vdso32-syms.lds
|
|
vdso32-syscall-syms.lds
|
|
vdso32-sysenter-syms.lds
|
|
vdso32.lds
|
|
vdso32.so.dbg
|
|
vdso64.lds
|
|
vdso64.so.dbg
|
|
version.h*
|
|
vmImage
|
|
vmlinux
|
|
vmlinux-*
|
|
vmlinux.aout
|
|
vmlinux.bin.all
|
|
vmlinux.lds
|
|
vmlinuz
|
|
voffset.h
|
|
vsyscall.lds
|
|
vsyscall_32.lds
|
|
wanxlfw.inc
|
|
uImage
|
|
unifdef
|
|
utf8data.h
|
|
wakeup.bin
|
|
wakeup.elf
|
|
wakeup.lds
|
|
zImage*
|
|
zoffset.h
|