tccasm: Detect (but ignore) the .file directive
Some patches, to allow tcc to compile asm sources generated by gcc and help tcc with the autoconf stuff used in Wine ( http://source.winehq.org/git/wine.git/ ) -- By by ... Detlef
This commit is contained in:
parent
197a6acb30
commit
9ff7a0bc98
2 changed files with 19 additions and 0 deletions
18
tccasm.c
18
tccasm.c
|
@ -537,6 +537,24 @@ static void asm_parse_directive(TCCState *s1)
|
||||||
use_section(s1, sname);
|
use_section(s1, sname);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case TOK_ASM_file:
|
||||||
|
{
|
||||||
|
char filename[512];
|
||||||
|
|
||||||
|
filename[0] = '\0';
|
||||||
|
next();
|
||||||
|
|
||||||
|
if (tok == TOK_STR)
|
||||||
|
pstrcat(filename, sizeof(filename), tokc.cstr->data);
|
||||||
|
else
|
||||||
|
pstrcat(filename, sizeof(filename), get_tok_str(tok, NULL));
|
||||||
|
|
||||||
|
if (s1->warn_unsupported)
|
||||||
|
warning("ignoring .file %s", filename);
|
||||||
|
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case TOK_SECTION1:
|
case TOK_SECTION1:
|
||||||
{
|
{
|
||||||
char sname[256];
|
char sname[256];
|
||||||
|
|
1
tcctok.h
1
tcctok.h
|
@ -249,6 +249,7 @@
|
||||||
DEF_ASM(string)
|
DEF_ASM(string)
|
||||||
DEF_ASM(asciz)
|
DEF_ASM(asciz)
|
||||||
DEF_ASM(ascii)
|
DEF_ASM(ascii)
|
||||||
|
DEF_ASM(file)
|
||||||
DEF_ASM(globl)
|
DEF_ASM(globl)
|
||||||
DEF_ASM(global)
|
DEF_ASM(global)
|
||||||
DEF_ASM(text)
|
DEF_ASM(text)
|
||||||
|
|
Loading…
Reference in a new issue