tgl6502: Make it possible to split out discard, also enable new compiler flags
authorAlan Cox <alan@linux.intel.com>
Mon, 12 Jan 2015 21:09:21 +0000 (21:09 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 12 Jan 2015 21:09:21 +0000 (21:09 +0000)
You'll need the patch I just posted to the cc65 list to use --all-fastcall but
if you take it out all should be well with the current git snapshots

Kernel/Makefile
Kernel/platform-tgl6502/ld65.cfg

index 0fa31c5..0cb99b3 100644 (file)
@@ -42,7 +42,8 @@ else ifeq ($(CPU),6502)
 export CROSS_AS=ca65
 export CROSS_LD=cl65
 export CROSS_CC=cl65
-export CROSS_CCOPTS=-c -Or -t none -I$(ROOT_DIR)/cpu-6502 -I$(ROOT_DIR)/platform-$(TARGET) -I$(ROOT_DIR)/include
+export CROSS_CCOPTS=--all-fastcall -c -Or -t none -I$(ROOT_DIR)/cpu-6502 -I$(ROOT_DIR)/platform-$(TARGET) -I$(ROOT_DIR)/include
+export CROSS_CC_SEGDISC=--code-name DISCARD --rodata-name DISCARDDATA
 export BINEXT = .o
 else
 export CROSS_AS=m6809-unknown-as
index 6957a5d..a18cf93 100644 (file)
@@ -9,6 +9,8 @@ SEGMENTS {
        ZEROPAGE: load = RAMZ, type = zp, define = yes;
        CODE:   load = ROM0, type = ro;
        RODATA: load = ROM0, type = ro;
+       DISCARD: load = ROM0, type = ro;
+       DISCARDDATA: load = ROM0, type = ro;
        DATA:   load = ROM0, run = RAM1, type = rw, define = yes;
        BSS:    load = RAM1, type = bss, define=yes;
        COMMONDATA: load = RAM0, type= bss;