From: vrokas Date: Wed, 6 Oct 2004 01:07:12 +0000 (+0000) Subject: * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=c127284f38a9daa2b6266320939ea384f89575c2;p=fw%2Fsdcc * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning sources that searched for headers in installation path, now the device/include/pic16 is used, * src/pic16/glue.c (pic16glue), * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or .line directives if not in debug mode, this suppresses assembler's warnings for ignored directives git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3525 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 37acf3dc..fd240323 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-10-06 Vangelis Rokas + + * device/lib/pic16/libsdcc/Makefile.rules: fixed bug concerning + sources that searched for headers in installation path, now the + device/include/pic16 is used, + * src/pic16/glue.c (pic16glue), + * src/pic16/pcode.c (pCode2str, genericPrint): don't print .file or + .line directives if not in debug mode, this suppresses assembler's + warnings for ignored directives + 2004-10-05 Maarten Brock * src/port.h: made reset_regparms prototype void parameter explicit. diff --git a/device/lib/pic16/libsdcc/Makefile.rules b/device/lib/pic16/libsdcc/Makefile.rules index abea515e..bf5f42fd 100644 --- a/device/lib/pic16/libsdcc/Makefile.rules +++ b/device/lib/pic16/libsdcc/Makefile.rules @@ -20,6 +20,7 @@ PRJDIR = ../../../../.. LIBC_INC_DIR = $(PRJDIR)/device/include/pic16 COMPILE_FLAGS += $(MODELFLAGS) --pomit-config-words --pomit-ivt --no-peep --i-code-in-asm +CFLAGS = --nostdinc -I$(LIBC_INC_DIR) CFILES = $(patsubst %,%.c,$(SRCS)) OFILES = $(patsubst %.c,%.o,$(CFILES)) diff --git a/src/pic16/glue.c b/src/pic16/glue.c index 5e2ddab7..b0d28866 100644 --- a/src/pic16/glue.c +++ b/src/pic16/glue.c @@ -57,7 +57,6 @@ extern set *tmpfileSet; extern set *tmpfileNameSet; extern char *iComments1; extern char *iComments2; -//extern void emitStaticSeg (memmap * map); extern int initsfpnt; @@ -1720,7 +1719,8 @@ pic16glue () pic16initialComments (asmFile); /* print module name */ - fprintf(asmFile, "#FILE\t\"%s\"\n", fullSrcFileName); + if(options.debug) + fprintf(asmFile, "\t.file\t\"%s\"\n", fullSrcFileName); /* Let the port generate any global directives, etc. */ if (port->genAssemblerPreamble) { diff --git a/src/pic16/pcode.c b/src/pic16/pcode.c index d4324d2d..66c8d0f8 100644 --- a/src/pic16/pcode.c +++ b/src/pic16/pcode.c @@ -4797,7 +4797,7 @@ char *pic16_pCode2str(char *str, size_t size, pCode *pc) break; case PC_CSOURCE: // SAFE_snprintf(&s,&size,";#CSRC\t%s %d\t%s\n", PCCS(pc)->file_name, PCCS(pc)->line_number, PCCS(pc)->line); - SAFE_snprintf(&s,&size,"%s#LINE\t%d; %s\t%s\n", (pic16_mplab_comp?";":""), + SAFE_snprintf(&s,&size,"%s\t.line\t%d; %s\t%s\n", ((pic16_mplab_comp || !options.debug)?";":""), PCCS(pc)->line_number, PCCS(pc)->file_name, PCCS(pc)->line); break; case PC_ASMDIR: @@ -4894,7 +4894,7 @@ static void genericPrint(FILE *of, pCode *pc) case PC_CSOURCE: // fprintf(of,";#CSRC\t%s %d\t\t%s\n", PCCS(pc)->file_name, PCCS(pc)->line_number, PCCS(pc)->line); - fprintf(of,"%s#LINE\t%d; %s\t%s\n", (pic16_mplab_comp?";":""), + fprintf(of,"%s\t.line\t%d; %s\t%s\n", ((pic16_mplab_comp || !options.debug)?";":""), PCCS(pc)->line_number, PCCS(pc)->file_name, PCCS(pc)->line); break;