simple C compiler
git clone git://
Log | Files | Refs | README | LICENSE

commit cbc25129f24988965a55c87501f7e36cbd6fc245
parent d87648e6d3b8b6d2f6f430a7ef1c4f378feeae09
Author: Roberto E. Vargas Caballero <>
Date:   Tue, 26 Jan 2016 14:24:36 +0100

[cc2-i386] Emit .extern for external variables

This is not needed with gas, because it is totally stupid and
it sets as external by default all the symbols, but it is a good
idea to use it if we want to move to other assembler in the future.

Mcc2/arch/i386-sysv/code.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cc2/arch/i386-sysv/code.c b/cc2/arch/i386-sysv/code.c @@ -164,8 +164,9 @@ label(Symbol *sym) segment(seg); switch (sym->kind) { - case LOCAL: case EXTRN: + printf("\t.extern\t%s\n", name); + case LOCAL: return; case GLOB: printf("\t.globl\t%s\n", name);