[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] asm: handle comments when creating header file



commit 09fc4de4a8ebb389641b8b8a632efcb7ca880e08
Author:     Norbert Manthey <nmanthey@xxxxxxxxxx>
AuthorDate: Wed Feb 6 15:09:33 2019 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue Feb 12 10:48:40 2019 +0000

    asm: handle comments when creating header file
    
    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 toolchain, there might be comments in the
    assembly files. Especially the goto-gcc compiler of the bounded model
    checker CBMC adds comments that start with a '#' symbol at the beginning
    of the line.
    
    This commit adds handling comments in assembler during the creation of the
    asm header files, especially ignoring lines that start with '#', which
    indicate comments for both ARM and x86 assembler. The used tool goto-as
    produces exactly comments of this kind.
    
    Signed-off-by: Norbert Manthey <nmanthey@xxxxxxxxx>
    Signed-off-by: Michael Tautschnig <tautschn@xxxxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Release-acked-by: Juergen Gross <jgross@xxxxxxxx>
---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Makefile b/xen/Makefile
index 749c213488..ea82fc8ba6 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -191,7 +191,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;}"; \
+         sed -rne "/^[^#].*==>/{s:.*==>(.*)<==.*:\1:; s: [\$$#]: :; p;}"; \
          echo ""; \
          echo "#endif") <$< >$@
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.