[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Makefile] asm: handle comments when creating header file
Jan, All, > On 10 Jan 2018, at 16:02, Jan Beulich <JBeulich@xxxxxxxx> wrote: > >>>> On 10.01.18 at 16:14, <nmanthey@xxxxxxxxxx> wrote: >> In the early steps of compilation, the asm header files are created, such >> as include/asm-$(TARGET_ARCH)/asm-offsets.h. These files depend on the >> assembly file arch/$(TARGET_ARCH)/asm-offsets.s, which is generated >> before. Depending on the used assembler, there might be comments in the >> assembly files. >> >> This commit adds handling comments in the assembler during the creation of >> the asm header files. > > I have a hard time seeing how ... > >> --- a/xen/Makefile >> +++ b/xen/Makefile >> @@ -189,7 +189,7 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: >> arch/$(TARGET_ARCH)/asm-offsets.s >> echo "#ifndef __ASM_OFFSETS_H__"; \ >> echo "#define __ASM_OFFSETS_H__"; \ >> echo ""; \ >> - sed -rne "/==>/{s:.*==>(.*)<==.*:\1:; s: [\$$#]: :; p;}"; \ > > ... this pattern could match any comment that we currently have. > Would you mind clarifying what it is that is actually broken (and > hence wants/needs fixing)? > Re-adding the new line: + sed -rne "/^[^#].*==>/{s:.*==>(.*)<==.*:\1:; s: [\$$#]: :; p;}"; \ The change "handles comments" by not printing those to the generated header file, where they would confuse the preprocessor (as "#" starts comments at the assembler level). It seems perfectly ok if this matches any existing comments as none such should get printed to the header file. The problems showed up when using goto-gcc (a compiler for subsequent use of static analysis tooling), which embeds additional information in the comments. Hope this helps, Michael Amazon Web Services UK Limited. Registered in England and Wales with registration number 08650665 and which has its registered office at 60 Holborn Viaduct, London EC1A 2FD, United Kingdom. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |