changeset 50:a9a7d531e673

components: initial support for gcc
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 19 Jul 2018 19:23:19 +0000
parents 19f5e7133949
children daf96987cb39
files components/abb components/aci components/aci_dti_mng components/aciext components/alr components/atiext components/audio components/audio_bgd components/buzzer components/cc components/ccd_na7_db components/ccddata components/cci components/cci_ir components/cl components/comlib components/config_gprs_fl components/config_gprs_ir components/config_gsm_fl components/config_gsm_ir components/cst components/dar components/dar_gbl_var components/dl components/drivers_flash components/dti components/etm components/fad components/fchg components/ffs components/ffs_drv components/ffs_pcm components/frame_na7_db_fl components/frame_na7_db_ir components/gdi components/gmm components/grlc components/grlc_ir components/grr components/kpd components/l1_custom_ext components/l1_custom_int components/l1_ext components/l1_int components/l1_pei components/l2r components/llc components/lls components/main components/misc_na7_db_fl components/misc_na7_db_ir components/mm components/nucleus_flash components/nucleus_intram components/osx_na7_db components/power components/ppp components/ppp_ir components/ra components/riviera_core_flash components/riviera_cust_flash components/rlp components/rr components/rtc_drv components/sim_b_lib components/sim_drv components/sm components/sms components/sndcp components/spi_drv components/ss components/t30 components/tif_na7_db_fl components/tif_na7_db_ir components/tpudrv components/uart_b_lib components/uart_drv components/upm
diffstat 78 files changed, 87 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/components/abb	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/abb	Thu Jul 19 19:23:19 2018 +0000
@@ -8,6 +8,7 @@
 fi
 
 CFLAGS="-mn -mt -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DIDS=$IDS -DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/aci	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/aci	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building the TCS3.2 version of aci.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version aci
--- a/components/aci_dti_mng	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/aci_dti_mng	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building the TCS3.2 version of aci_dti_mng.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/aciext	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/aciext	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building the TCS3.2 version of aciext.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version aci_ext
--- a/components/alr	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/alr	Thu Jul 19 19:23:19 2018 +0000
@@ -2,6 +2,7 @@
 # with our copy of TCS211 from Sotovik
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version alr
--- a/components/atiext	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/atiext	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building the TCS3.2 version of atiext.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version ati_ext
--- a/components/audio	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/audio	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building audio.lib
 
 CFLAGS="-mn -mt -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/audio_bgd	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/audio_bgd	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building audio_bgd.lib
 
 CFLAGS="-mn -mt -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/buzzer	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/buzzer	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building buzzer.lib
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/cc	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/cc	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building cc.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version cc
--- a/components/ccd_na7_db	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ccd_na7_db	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ccd_na7_db.lib using TCS3.2 CCD source
 
 CFLAGS="-mw -x -pw2 -me -mt -o -g -mn"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/ccddata	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ccddata	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ccddata.lib using TCS3.2 CCD source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-D_TMS470 -DNEW_FRAME -DNEW_ENTITY -DCCDDATA_STATIC_DATA"
 
 # Includes
--- a/components/cci	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/cci	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building cci.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/cci_ir	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/cci_ir	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building cci_ir.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/cl	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/cl	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building cl.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/comlib	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/comlib	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building comlib.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/config_gprs_fl	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/config_gprs_fl	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building config_gprs_fl.lib for the TCS2/TCS3 hybrid configuration
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/config_gprs_ir	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/config_gprs_ir	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building config_gprs_ir.lib for the TCS2/TCS3 hybrid configuration
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/config_gsm_fl	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/config_gsm_fl	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building config_gsm_fl.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/config_gsm_ir	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/config_gsm_ir	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building config_gsm_ir.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/cst	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/cst	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building cst.lib
 
 CFLAGS="-mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/dar	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/dar	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building dar.lib
 
 CFLAGS="-mn -mt -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/dar_gbl_var	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/dar_gbl_var	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building dar_gbl_var.lib
 
 CFLAGS="-mn -mt -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/dl	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/dl	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building dl.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version dl
--- a/components/drivers_flash	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/drivers_flash	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building drivers_flash.lib
 
 CFLAGS="-me -pw2 -mn -x -mt -o2 -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
@@ -67,5 +68,6 @@
 # niq32
 
 CFLAGS="-me -pw2 -x -o -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 c_file $SRCDIR/inth/niq32.c
--- a/components/dti	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/dti	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building dti.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version dti
--- a/components/etm	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/etm	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building etm.lib
 
 CFLAGS="-mn -mt -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/fad	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/fad	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building fad.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version fad
--- a/components/fchg	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/fchg	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building FCHG SWE - an original FreeCalypso addition
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/ffs	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ffs	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ffs.lib
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/ffs_drv	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ffs_drv	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ffs_drv.lib
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/ffs_pcm	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ffs_pcm	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ffs_pcm.lib
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/frame_na7_db_fl	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/frame_na7_db_fl	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building frame_na7_db_fl.lib using the GPF source bits we got with TCS3.2
 
 CFLAGS="-mw -x -pw2 -o3 -me -mt -g -mn"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/frame_na7_db_ir	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/frame_na7_db_ir	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building frame_na7_db_ir.lib using the GPF source bits we got with TCS3.2
 
 CFLAGS="-mw -x -pw2 -o3 -me -mt -g -mn"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/gdi	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/gdi	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building gdi.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/gmm	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/gmm	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building gmm.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/grlc	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/grlc	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building grlc.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/grlc_ir	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/grlc_ir	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building grlc_ir.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/grr	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/grr	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building grr.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/kpd	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/kpd	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building kpd.lib
 
 CFLAGS="-mn -mt -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/l1_custom_ext	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/l1_custom_ext	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building l1_custom_ext.lib
 
 CFLAGS="-g -me -pw2 -mt -o -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DRV_TRACE_LEVEL_WARNING=2 -DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/l1_custom_int	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/l1_custom_int	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building l1_custom_int.lib
 
 CFLAGS="-g -me -pw2 -mt -o -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 CPPFLAGS="-DRV_TRACE_LEVEL_WARNING=2 -DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/l1_ext	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/l1_ext	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building l1_ext.lib
 
 CFLAGS="-g -me -pw2 -mt -o -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DRV_TRACE_LEVEL_WARNING=2 -DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/l1_int	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/l1_int	Thu Jul 19 19:23:19 2018 +0000
@@ -34,6 +34,7 @@
 # Compilation
 
 CFLAGS="-g -me -pw2 -mt -o -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 CPPFLAGS="-DRV_TRACE_LEVEL_WARNING=2 -DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/l1_pei	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/l1_pei	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building l1_pei.lib
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version l1 l1_pei
--- a/components/l2r	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/l2r	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building l2r.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version l2r
--- a/components/llc	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/llc	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building llc.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/lls	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/lls	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building lls.lib
 
 CFLAGS="-mn -mt -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/main	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/main	Thu Jul 19 19:23:19 2018 +0000
@@ -3,6 +3,7 @@
 # C modules
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 if [ "$TARGET" = c139 -o "$TARGET" = c11x ]
@@ -57,6 +58,11 @@
 c_file $SRCDIR/main.c
 c_file $SRCDIR/sys_dummy.c
 
+# mem_load.c and int.s are for the TMS470 version only
+
+if [ "$COMPILER" = tms470 ]
+then
+
 # Different CFLAGS for mem_load.c
 
 CFLAGS="-o -mw -me -pw2"
@@ -79,3 +85,5 @@
 ASMFLAGS="$ASMFLAGS -dWCP_PROF=0"
 
 asm_file $SRCDIR/int.s
+
+fi
--- a/components/misc_na7_db_fl	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/misc_na7_db_fl	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building misc_na7_db_fl.lib using the GPF source bits we got with TCS211
 
 CFLAGS="-mw -x -pw2 -o -me -mt -g -mn"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/misc_na7_db_ir	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/misc_na7_db_ir	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building misc_na7_db_ir.lib using the GPF source bits we got with TCS211
 
 CFLAGS="-mw -x -pw2 -o -me -mt -g -mn"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/mm	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/mm	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building mm.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version mm
--- a/components/nucleus_flash	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/nucleus_flash	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # New Selenite component: compiling Nucleus from source (XIP)
 
 CFLAGS="-mn -me -mt -o -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 SRCDIR=$SRC/nucleus
--- a/components/nucleus_intram	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/nucleus_intram	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # New Selenite component: compiling Nucleus from source (internal RAM)
 
 CFLAGS="-mn -me -mt -o -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 CPPFLAGS=
 
 SRCDIR=$SRC/nucleus
--- a/components/osx_na7_db	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/osx_na7_db	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building osx_na7_db.lib from our reconstructed osx.c source
 
 CFLAGS="-mw -x -pw2 -o -me -mt -g -mn"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/power	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/power	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building power.lib
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470 -DMMI=$MMI"
 
 if [ "$MMI" = 0 ]
--- a/components/ppp	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ppp	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ppp.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/ppp_ir	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ppp_ir	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ppp_ir.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/ra	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ra	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ra.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version ra
--- a/components/riviera_core_flash	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/riviera_core_flash	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building riviera_core_flash.lib
 
 CFLAGS="-mn -mt -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/riviera_cust_flash	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/riviera_cust_flash	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building riviera_cust_flash.lib
 
 CFLAGS="-mn -mt -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 if [ "$MMI" = 0 ]
--- a/components/rlp	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/rlp	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building rlp.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version rlp
--- a/components/rr	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/rr	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building rr.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version rr
--- a/components/rtc_drv	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/rtc_drv	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building rtc_drv.lib
 
 CFLAGS="-mn -mt -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/sim_b_lib	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/sim_b_lib	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building sim_b_lib.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version sim
--- a/components/sim_drv	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/sim_drv	Thu Jul 19 19:23:19 2018 +0000
@@ -5,6 +5,7 @@
 # CFLAGS and CPPFLAGS for sim.c
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
@@ -49,6 +50,7 @@
 # CFLAGS and CPPFLAGS for sim32.c
 
 CFLAGS="-o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/sm	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/sm	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building sm.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/sms	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/sms	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building sms.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version sms
--- a/components/sndcp	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/sndcp	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building sndcp.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/spi_drv	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/spi_drv	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building spi_drv.lib
 
 CFLAGS="-mn -mt -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/ss	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/ss	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building ss.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version ss
--- a/components/t30	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/t30	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building t30.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS=
 
 make_version t30
--- a/components/tif_na7_db_fl	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/tif_na7_db_fl	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building tif_na7_db_fl.lib using the GPF source bits we got with TCS211
 
 CFLAGS="-mw -x -pw2 -o -me -mt -g -mn"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/tif_na7_db_ir	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/tif_na7_db_ir	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building tif_na7_db_ir.lib using the GPF source bits we got with TCS211
 
 CFLAGS="-mw -x -pw2 -o -me -mt -g -mn"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 
 # Defines
 
--- a/components/tpudrv	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/tpudrv	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building tpudrv.lib
 
 CFLAGS="-g -me -pw2 -mt -o2 -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 # Includes
--- a/components/uart_b_lib	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/uart_b_lib	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building uart_b_lib.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines
 
--- a/components/uart_drv	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/uart_drv	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building uart_drv.lib
 
 CFLAGS="-mn -mt -o -x -mw -me -pw2"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 CPPFLAGS="-DTOOL_CHOICE=0 -D_TMS470"
 
 if [ "$SERIAL_DYNAMIC_SWITCH" = 1 ]
--- a/components/upm	Thu Jul 19 03:09:24 2018 +0000
+++ b/components/upm	Thu Jul 19 19:23:19 2018 +0000
@@ -1,6 +1,7 @@
 # Building upm.lib from the TCS3.2 source
 
 CFLAGS="-me -mt -o -pw2 -x -mw"
+CFLAGS_gcc="-O2 -fno-builtin -mthumb-interwork -mthumb"
 
 # Defines