From c4cd7a8c98eaf5ef8e39c76533a9277e83cf7585 Mon Sep 17 00:00:00 2001 From: MaartenBrock Date: Sat, 16 Feb 2008 21:28:52 +0000 Subject: [PATCH] * as/link/mcs51/aslink.dsp: removed SDK define * as/link/z80/clean.mk: brought in sync with other ports * as/link/z80/lklibr.c (SdccLib, fndsym): handle the dflag here too * as/hc08/Makefile.bcc, * as/mcs51/Makefile.bcc, * as/z80/Makefile.bcc: noice.c was moved to as/asxxsrc/ * src/z80/main.c (_setValues): use the now capitalized -Z, (z80_port, gbz80_port): generate debug information when asked git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5013 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 13 ++++++++++++- as/hc08/Makefile.bcc | 3 ++- as/link/mcs51/aslink.dsp | 4 ++-- as/link/z80/clean.mk | 7 +++---- as/link/z80/lklibr.c | 31 ++++++++++++++++++++++++++++++- as/mcs51/Makefile.bcc | 3 ++- as/z80/Makefile.bcc | 13 +++++++------ src/z80/main.c | 6 +++--- 8 files changed, 61 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d1b6a46..0e8c34e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,19 @@ +2008-02-16 Maarten Brock + + * as/link/mcs51/aslink.dsp: removed SDK define + * as/link/z80/clean.mk: brought in sync with other ports + * as/link/z80/lklibr.c (SdccLib, fndsym): handle the dflag here too + * as/hc08/Makefile.bcc, + * as/mcs51/Makefile.bcc, + * as/z80/Makefile.bcc: noice.c was moved to as/asxxsrc/ + * src/z80/main.c (_setValues): use the now capitalized -Z, + (z80_port, gbz80_port): generate debug information when asked + 2008-02-16 Borut Razem * as/z80/asmain.c, as/z80/asm.h, as/z80/asdata.c, as/link/z80/lkmain.c, as/z80/as_gbz80.dsp, as/z80/as_z80.dsp, - as/z80/Makefile.in. as/z80/Makefile.bcc: + as/z80/Makefile.in. as/z80/Makefile.bcc: applied patch #1893393: patch for as-z80 and link-z80 to generate cdb, thanks to Armin Diehl * as/*/asnoice.c, as/hc08/as_hc08.dsp, as/hc08/Makefile.in, diff --git a/as/hc08/Makefile.bcc b/as/hc08/Makefile.bcc index 384c518e..0ccc0a94 100644 --- a/as/hc08/Makefile.bcc +++ b/as/hc08/Makefile.bcc @@ -4,10 +4,11 @@ PRJDIR = ../.. !include $(PRJDIR)/Bcc.inc -ASOBJECTS = asmain.obj aslex.obj assubr.obj asnoice.obj \ +ASOBJECTS = asmain.obj aslex.obj assubr.obj \ asexpr.obj asdata.obj aslist.obj asout.obj \ h08ext.obj h08pst.obj h08mch.obj h08adr.obj \ ../asxxsrc/strcmpi.obj ../asxxsrc/assym.obj \ + ../asxxsrc/asnoice.obj \ ../../support/Util/dbuf.obj ../../support/Util/dbuf_string.obj ASX8051 = $(PRJDIR)/bin/asx8051.exe diff --git a/as/link/mcs51/aslink.dsp b/as/link/mcs51/aslink.dsp index c185fa6d..7dd6a6f0 100644 --- a/as/link/mcs51/aslink.dsp +++ b/as/link/mcs51/aslink.dsp @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "INDEXLIB" /D "MLH_MAP" /D "SDK" /FR /FD /GZ /c +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "INDEXLIB" /D "MLH_MAP" /FR /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "INDEXLIB" /D "MLH_MAP" /FR /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -66,7 +66,7 @@ LINK32=link.exe # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "INDEXLIB" /D "MLH_MAP" /D "SDK" /FD /c +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "INDEXLIB" /D "MLH_MAP" /FD /c # ADD CPP /nologo /W3 /GX /O2 /I ".." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "INDEXLIB" /D "MLH_MAP" /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" diff --git a/as/link/z80/clean.mk b/as/link/z80/clean.mk index b443a691..ce8ba5fa 100644 --- a/as/link/z80/clean.mk +++ b/as/link/z80/clean.mk @@ -5,15 +5,14 @@ include $(top_builddir)/Makefile.common clean: rm -f *core *[%~] *.[oa] rm -f .[a-z]*~ - rm -f $(top_builddir)/bin/link-z80$(EXEEXT) link-z80$(EXEEXT) \ - $(top_builddir)/bin/link-gbz80$(EXEEXT) link-gbz80$(EXEEXT) - rm -f *.dep + rm -f $(top_builddir)/bin/link-z80$(EXEEXT) link-z80$(EXEEXT) + rm -f $(top_builddir)/bin/link-gbz80$(EXEEXT) link-gbz80$(EXEEXT) rm -rf obj # Deleting all files created by configuring or building the program # ----------------------------------------------------------------- distclean: clean - rm -f Makefile + rm -f Makefile *.dep # Like clean but some files may still exist # ----------------------------------------- diff --git a/as/link/z80/lklibr.c b/as/link/z80/lklibr.c index d2dfcb47..31d2e897 100644 --- a/as/link/z80/lklibr.c +++ b/as/link/z80/lklibr.c @@ -559,6 +559,12 @@ int SdccLib(char * PathLib, FILE * libfp, char * DirLib, char * SymName) fseek(libfp, lbfh->offset, SEEK_SET); LoadRel(PathLib, libfp, ModName); + /* if cdb information required & .adb file present */ + if (dflag && dfp) + { + if(LoadAdb(libfp)) + SaveLinkedFilePath(DirLib); + } return 1; /*Found the symbol, so success!*/ } } @@ -699,6 +705,17 @@ int fndsym( char *name ) } else { /*For a stand alone object file*/ + /* if cdb information required & adb file present */ + if (dflag && dfp) + { + FILE *xfp = afile(lbfh->filspc, "adb",0); + if (xfp) + { + SaveLinkedFilePath(lbfh->filspc); + copyfile(dfp, xfp); + fclose(xfp); + } + } loadfile(lbfh->filspc); } ThisLibr->loaded=1; @@ -937,7 +954,7 @@ int buildlibraryindex(void) } This->next = NULL; This->loaded=-1; - This->offset=-1; /*There should be a rel file*/ + This->offset=-1; /*We have a stand alone .rel file*/ This->libspc = lbnh->libspc; This->relfil=(char *)new(strlen(relfil)+1); @@ -1174,6 +1191,18 @@ fndsym(char *name) strcpy(lbfh->relfil,relfil); fclose(fp); fclose(libfp); + + /* if cdb information required & adb file present */ + if (dflag && dfp) + { + FILE *xfp = afile(str,"adb",0); //JCF: Nov 30, 2002 + if (xfp) + { + SaveLinkedFilePath(str); + copyfile(dfp,xfp); + fclose(xfp); + } + } loadfile(str); return (1); } diff --git a/as/mcs51/Makefile.bcc b/as/mcs51/Makefile.bcc index a2a2f1c6..cc7d98b0 100644 --- a/as/mcs51/Makefile.bcc +++ b/as/mcs51/Makefile.bcc @@ -4,10 +4,11 @@ PRJDIR = ../.. !include $(PRJDIR)/Bcc.inc -ASOBJECTS = asmain.obj aslex.obj assubr.obj asnoice.obj \ +ASOBJECTS = asmain.obj aslex.obj assubr.obj \ asexpr.obj asdata.obj aslist.obj asout.obj \ i51ext.obj i51pst.obj i51mch.obj i51adr.obj \ ../asxxsrc/strcmpi.obj ../asxxsrc/assym.obj \ + ../asxxsrc/asnoice.obj \ ../../support/Util/dbuf.obj ../../support/Util/dbuf_string.obj ASX8051 = $(PRJDIR)/bin/asx8051.exe diff --git a/as/z80/Makefile.bcc b/as/z80/Makefile.bcc index 47d093a5..149e3136 100644 --- a/as/z80/Makefile.bcc +++ b/as/z80/Makefile.bcc @@ -6,13 +6,14 @@ PRJDIR = ../.. CFLAGS = $(CFLAGS) -DINDEXLIB -DMLH_MAP -DSDK -OBJECTS = asdata.obj asexpr.obj aslex.obj aslist.obj asmain.obj \ - asout.obj assubr.obj z80adr.obj z80ext.obj asnoice.obj \ - z80mch.obj z80pst.obj \ - ../asxxsrc/strcmpi.obj ../asxxsrc/assym.obj ../asxxsrc/aslex.obj \ - ../../support/Util/dbuf.obj ../../support/Util/dbuf_string.obj +OBJECTS = asdata.obj asexpr.obj aslex.obj aslist.obj asmain.obj \ + asout.obj assubr.obj z80adr.obj z80ext.obj \ + z80mch.obj z80pst.obj \ + ../asxxsrc/strcmpi.obj ../asxxsrc/assym.obj ../asxxsrc/aslex.obj \ + ../asxxsrc/asnoice.obj \ + ../../support/Util/dbuf.obj ../../support/Util/dbuf_string.obj -TARGET = $(PRJDIR)/bin/as-z80.exe +TARGET = $(PRJDIR)/bin/as-z80.exe all: $(TARGET) diff --git a/src/z80/main.c b/src/z80/main.c index dbd02319..6e5e05ed 100644 --- a/src/z80/main.c +++ b/src/z80/main.c @@ -526,7 +526,7 @@ _setValues(void) if (IS_GB) { - setMainValue ("z80outputtypeflag", "-z"); + setMainValue ("z80outputtypeflag", "-Z"); setMainValue ("z80outext", ".gb"); } else @@ -717,7 +717,7 @@ PORT z80_port = { NULL, ASMCMD, - "-plosgff", /* Options with debug */ + "-plosgffc", /* Options with debug */ "-plosgff", /* Options without debug */ 0, ".asm" @@ -838,7 +838,7 @@ PORT gbz80_port = { NULL, ASMCMD, - "-plosgff", /* Options with debug */ + "-plosgffc", /* Options with debug */ "-plosgff", /* Options without debug */ 0, ".asm", -- 2.30.2