summaryrefslogtreecommitdiffstats
path: root/make/custom
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2006-11-30 06:46:38 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2006-11-30 06:46:38 +0000
commit0c642539f20904a139fb2851d18d9a55ffce8729 (patch)
treeeddbdfa1e4148db59036b942264e79bc3eb605e0 /make/custom
parent43ea3692ceb89bb1de2bbaa0a63ada28380c39c2 (diff)
downloadrtems-0c642539f20904a139fb2851d18d9a55ffce8729.tar.bz2
Cleanup.
Diffstat (limited to '')
-rw-r--r--make/custom/Cygwin-posix.cfg3
-rw-r--r--make/custom/FreeBSD-posix.cfg3
-rw-r--r--make/custom/HPUX9-posix.cfg3
-rw-r--r--make/custom/Linux-posix.cfg3
-rw-r--r--make/custom/Solaris-posix.cfg3
-rw-r--r--make/custom/armulator.cfg11
-rw-r--r--make/custom/av5282.cfg2
-rw-r--r--make/custom/bare.cfg3
-rw-r--r--make/custom/c3xsim.cfg3
-rw-r--r--make/custom/c4xsim.cfg3
-rw-r--r--make/custom/csb336.cfg11
-rw-r--r--make/custom/csb337.cfg5
-rw-r--r--make/custom/csb350.cfg3
-rw-r--r--make/custom/csb360.cfg2
-rw-r--r--make/custom/dmv152.cfg3
-rw-r--r--make/custom/eZKit533.cfg3
-rw-r--r--make/custom/edb7312.cfg11
-rw-r--r--make/custom/ep1a.cfg7
-rw-r--r--make/custom/erc32.cfg3
-rw-r--r--make/custom/erc32nfp.cfg3
-rw-r--r--make/custom/gba.cfg9
-rw-r--r--make/custom/gen405.cfg3
-rw-r--r--make/custom/gen5200.cfg3
-rw-r--r--make/custom/gen68302.cfg3
-rw-r--r--make/custom/gen68340.cfg3
-rw-r--r--make/custom/gen68360.cfg3
-rw-r--r--make/custom/genmongoosev.cfg3
-rw-r--r--make/custom/gensh1.cfg7
-rw-r--r--make/custom/gensh2.cfg9
-rw-r--r--make/custom/gensh4.cfg6
-rw-r--r--make/custom/gp32.cfg5
-rw-r--r--make/custom/h8sim.cfg3
-rw-r--r--make/custom/helas403.cfg3
-rw-r--r--make/custom/hurricane.cfg3
-rw-r--r--make/custom/i386ex.cfg4
-rw-r--r--make/custom/idp.cfg3
-rw-r--r--make/custom/jmr3904.cfg3
-rw-r--r--make/custom/leon2.cfg3
-rw-r--r--make/custom/leon3.cfg3
-rw-r--r--make/custom/mbx821_002b.cfg2
-rw-r--r--make/custom/mbx8xx.cfg3
-rw-r--r--make/custom/mcf5206elite.cfg3
-rw-r--r--make/custom/mcf5235.cfg2
-rw-r--r--make/custom/mcp750.cfg13
-rw-r--r--make/custom/mpc8260ads.cfg3
-rw-r--r--make/custom/mrm332.cfg2
-rw-r--r--make/custom/mtx603e.cfg13
-rw-r--r--make/custom/mvme136.cfg3
-rw-r--r--make/custom/mvme147.cfg3
-rw-r--r--make/custom/mvme162.cfg3
-rw-r--r--make/custom/mvme162lx.cfg3
-rw-r--r--make/custom/mvme167.cfg2
-rw-r--r--make/custom/mvme2100.cfg13
-rw-r--r--make/custom/mvme2307.cfg7
-rw-r--r--make/custom/mvme5500.cfg8
-rw-r--r--make/custom/ods68302.cfg6
-rw-r--r--make/custom/pc386.cfg4
-rw-r--r--make/custom/psim.cfg3
-rw-r--r--make/custom/rbtx4925.cfg3
-rw-r--r--make/custom/rbtx4938.cfg3
-rw-r--r--make/custom/score603e.cfg3
-rw-r--r--make/custom/shsim.cfg3
-rw-r--r--make/custom/sim68000.cfg6
-rw-r--r--make/custom/simcpu32.cfg6
-rw-r--r--make/custom/simsh4.cfg6
-rw-r--r--make/custom/simsh7032.cfg7
-rw-r--r--make/custom/simsh7045.cfg7
-rw-r--r--make/custom/ss555.cfg6
-rw-r--r--make/custom/ts_386ex.cfg4
69 files changed, 67 insertions, 250 deletions
diff --git a/make/custom/Cygwin-posix.cfg b/make/custom/Cygwin-posix.cfg
index 853f0c61a7..07922136bf 100644
--- a/make/custom/Cygwin-posix.cfg
+++ b/make/custom/Cygwin-posix.cfg
@@ -14,8 +14,7 @@ RTEMS_BSP_FAMILY=posix
include $(RTEMS_ROOT)/make/custom/default.cfg
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2
define make-exe
diff --git a/make/custom/FreeBSD-posix.cfg b/make/custom/FreeBSD-posix.cfg
index 2509a028a7..3c5f61658a 100644
--- a/make/custom/FreeBSD-posix.cfg
+++ b/make/custom/FreeBSD-posix.cfg
@@ -11,8 +11,7 @@ RTEMS_BSP_FAMILY=posix
include $(RTEMS_ROOT)/make/custom/default.cfg
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2
define make-exe
diff --git a/make/custom/HPUX9-posix.cfg b/make/custom/HPUX9-posix.cfg
index ff3b5a2a30..af7b33bffe 100644
--- a/make/custom/HPUX9-posix.cfg
+++ b/make/custom/HPUX9-posix.cfg
@@ -15,8 +15,7 @@ RTEMS_BSP_FAMILY=posix
include $(RTEMS_ROOT)/make/custom/default.cfg
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2
define make-exe
diff --git a/make/custom/Linux-posix.cfg b/make/custom/Linux-posix.cfg
index 6a4b26e6a3..5c9279ecc7 100644
--- a/make/custom/Linux-posix.cfg
+++ b/make/custom/Linux-posix.cfg
@@ -16,8 +16,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
CPU_CFLAGS = -D_BSD_SOURCE -D_POSIX_C_SOURCE
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2
define make-exe
diff --git a/make/custom/Solaris-posix.cfg b/make/custom/Solaris-posix.cfg
index 82bbc30e3d..9ebe4cddb4 100644
--- a/make/custom/Solaris-posix.cfg
+++ b/make/custom/Solaris-posix.cfg
@@ -16,8 +16,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
CPU_CFLAGS += -Dsolaris2 -D__EXTENSIONS__
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2
define make-exe
diff --git a/make/custom/armulator.cfg b/make/custom/armulator.cfg
index 1a96a9587f..f5d6ee4ae8 100644
--- a/make/custom/armulator.cfg
+++ b/make/custom/armulator.cfg
@@ -18,18 +18,9 @@ RTEMS_BSP_FAMILY=armulator
#CPU_CFLAGS = -mcpu=arm7tdmi
# CPU_CFLAGS = -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler (at least
-# -O2 so far.
-#CFLAGS_OPTIMIZE_V=
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1
-#CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
diff --git a/make/custom/av5282.cfg b/make/custom/av5282.cfg
index a31eacc5d2..7f24a41b81 100644
--- a/make/custom/av5282.cfg
+++ b/make/custom/av5282.cfg
@@ -21,7 +21,7 @@ RTEMS_BSP_FAMILY=av5282
CPU_CFLAGS = -m528x
-# optimize flag: typically -0, could use -O4 or -fast, -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V= -O4 -fomit-frame-pointer
ifndef MTARGET
diff --git a/make/custom/bare.cfg b/make/custom/bare.cfg
index bb7b24827a..288d99da50 100644
--- a/make/custom/bare.cfg
+++ b/make/custom/bare.cfg
@@ -15,8 +15,7 @@ CPU_CFLAGS=$(BARE_CPU_CFLAGS)
include $(RTEMS_ROOT)/make/custom/default.cfg
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# this target has no start file
diff --git a/make/custom/c3xsim.cfg b/make/custom/c3xsim.cfg
index 2967b8d5fd..51cbb6356f 100644
--- a/make/custom/c3xsim.cfg
+++ b/make/custom/c3xsim.cfg
@@ -12,8 +12,7 @@ CPU_CFLAGS = -mcpu=32
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=c4xsim
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# -O4 is broken for the moment on the C4x gcc
#CFLAGS_OPTIMIZE_V=-O4
CFLAGS_OPTIMIZE_V=-O1
diff --git a/make/custom/c4xsim.cfg b/make/custom/c4xsim.cfg
index eeb2fb3527..bdd9e27ab4 100644
--- a/make/custom/c4xsim.cfg
+++ b/make/custom/c4xsim.cfg
@@ -12,8 +12,7 @@ CPU_CFLAGS=-mcpu=40 #-msmall
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=c4xsim
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# -O4 is broken for the moment on the C4x gcc
#CFLAGS_OPTIMIZE_V=-O4
CFLAGS_OPTIMIZE_V=-O1
diff --git a/make/custom/csb336.cfg b/make/custom/csb336.cfg
index 6b436c005e..9813fa0a53 100644
--- a/make/custom/csb336.cfg
+++ b/make/custom/csb336.cfg
@@ -18,19 +18,10 @@ RTEMS_BSP_FAMILY=csb336
CPU_CFLAGS = -mcpu=arm920 -mstructure-size-boundary=8
#CPU_CFLAGS += -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler (at least
-# -O2 so far.
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O3
#CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1
-#CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
-
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
diff --git a/make/custom/csb337.cfg b/make/custom/csb337.cfg
index e4bba3092f..a07a7adfa8 100644
--- a/make/custom/csb337.cfg
+++ b/make/custom/csb337.cfg
@@ -17,10 +17,7 @@ RTEMS_BSP_FAMILY=csb337
#
CPU_CFLAGS = -mcpu=arm920 -mstructure-size-boundary=8
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler (at least
-# -O2 so far.
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O2 -g
diff --git a/make/custom/csb350.cfg b/make/custom/csb350.cfg
index 3be6ac21a5..02fb011705 100644
--- a/make/custom/csb350.cfg
+++ b/make/custom/csb350.cfg
@@ -18,8 +18,7 @@ RTEMS_BSP_FAMILY=csb350
# gcc 3.1 and newer
CPU_CFLAGS=-mips32 -G0 -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O2 -g
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/csb360.cfg b/make/custom/csb360.cfg
index 01e1a5960a..f96211e4bf 100644
--- a/make/custom/csb360.cfg
+++ b/make/custom/csb360.cfg
@@ -19,7 +19,7 @@ RTEMS_BSP_FAMILY=csb360
#
CPU_CFLAGS = -m5200
-# optimize flag: typically -0, could use -O4 or -fast
+# optimize flag: typically -O2
# It looks like any optimization level > 0 causes problems
# with gcc-3.4.0. Until they are fixed, we'll use -O0
CFLAGS_OPTIMIZE_V=-O0 -fomit-frame-pointer
diff --git a/make/custom/dmv152.cfg b/make/custom/dmv152.cfg
index 96e0cf5307..6bde1524d2 100644
--- a/make/custom/dmv152.cfg
+++ b/make/custom/dmv152.cfg
@@ -19,8 +19,7 @@ RTEMS_BSP_FAMILY=dmv152
CPU_CFLAGS =
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# Here is the rule to actually build a $(ARCH)/foo.exe
diff --git a/make/custom/eZKit533.cfg b/make/custom/eZKit533.cfg
index d165551c45..21b76e2e03 100644
--- a/make/custom/eZKit533.cfg
+++ b/make/custom/eZKit533.cfg
@@ -17,8 +17,7 @@ RTEMS_BSP_FAMILY=eZKit533
#
CPU_CFLAGS=
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# CFLAGS_OPTIMIZE_V=-O4 -mleaf-procedures
#CFLAGS_OPTIMIZE_V=-O4 -g
#CFLAGS_OPTIMIZE_V=-O2 -g
diff --git a/make/custom/edb7312.cfg b/make/custom/edb7312.cfg
index 30b60f5793..ca2a9bb457 100644
--- a/make/custom/edb7312.cfg
+++ b/make/custom/edb7312.cfg
@@ -18,19 +18,10 @@ RTEMS_BSP_FAMILY=edb7312
CPU_CFLAGS = -mcpu=$(RTEMS_CPU_MODEL) -mstructure-size-boundary=8
# CPU_CFLAGS += -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler (at least
-# -O2 so far.
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O3
#CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1
-#CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
-
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
diff --git a/make/custom/ep1a.cfg b/make/custom/ep1a.cfg
index 880684de5d..963a3a6d5a 100644
--- a/make/custom/ep1a.cfg
+++ b/make/custom/ep1a.cfg
@@ -16,16 +16,11 @@ RTEMS_BSP_FAMILY=ep1a
#
CPU_CFLAGS = -mcpu=603e -Dmpc603e -Dppc603e -mmultiple -mstring -mstrict-align
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# NOTE: some level of -O may be actually required by inline assembler
#CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
CFLAGS_OPTIMIZE_V = -O4
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
diff --git a/make/custom/erc32.cfg b/make/custom/erc32.cfg
index 27eb5ef0de..5a8f1b2fbd 100644
--- a/make/custom/erc32.cfg
+++ b/make/custom/erc32.cfg
@@ -15,8 +15,7 @@ RTEMS_BSP_FAMILY=erc32
CPU_CFLAGS = -mcpu=cypress
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/erc32nfp.cfg b/make/custom/erc32nfp.cfg
index 7cef835eaf..775068d530 100644
--- a/make/custom/erc32nfp.cfg
+++ b/make/custom/erc32nfp.cfg
@@ -16,8 +16,7 @@ RTEMS_BSP_FAMILY=erc32
CPU_CFLAGS = -mcpu=cypress -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/gba.cfg b/make/custom/gba.cfg
index d154fc1e5f..9e40b7439b 100644
--- a/make/custom/gba.cfg
+++ b/make/custom/gba.cfg
@@ -18,17 +18,10 @@ RTEMS_BSP_FAMILY=gba
#CPU_CFLAGS = -mcpu=$(RTEMS_CPU_MODEL) -mthumb -mthumb-interwork -msoft-float -mstructure-size-boundary=8
CPU_CFLAGS = -mcpu=$(RTEMS_CPU_MODEL) -msoft-float -mstructure-size-boundary=8
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O3
CXXFLAGS_OPTIMIZE_V=-O3
-# debug flags: typically none, but at least -O1 is required due to
-# this BSP using inlined code
-CFLAGS_DEBUG_V=-O1 -ggdb
-CXXFLAGS_DEBUG_V=-O1 -ggdb
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-Wl,-Map,$(basename $@).map -o $(basename $@).elf \
diff --git a/make/custom/gen405.cfg b/make/custom/gen405.cfg
index 311d5180a8..ec6e3a0293 100644
--- a/make/custom/gen405.cfg
+++ b/make/custom/gen405.cfg
@@ -24,8 +24,7 @@ RTEMS_BSP_FAMILY=gen405
#
CPU_CFLAGS = -mcpu=403 -D_OLD_EXCEPTIONS -Dppc405
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# NOTE: some level of -O may be actually required by inline assembler
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions -g
diff --git a/make/custom/gen5200.cfg b/make/custom/gen5200.cfg
index 250bdcf745..493e7bd6c4 100644
--- a/make/custom/gen5200.cfg
+++ b/make/custom/gen5200.cfg
@@ -18,8 +18,7 @@ RTEMS_BSP_FAMILY=gen5200
# CPU_CFLAGS = -mcpu=$(8XX_CPU_TYPE) -mstrict-align
CPU_CFLAGS = -mcpu=603e -mstrict-align -D$(RTEMS_BOARD_MODEL)
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# NOTE: some level of -O may be actually required by inline assembler
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions -g
diff --git a/make/custom/gen68302.cfg b/make/custom/gen68302.cfg
index b023bf1629..170ea9e27b 100644
--- a/make/custom/gen68302.cfg
+++ b/make/custom/gen68302.cfg
@@ -20,8 +20,7 @@ RTEMS_BSP_FAMILY=gen68302
# CPU_CFLAGS = -m68302 -msoft-float
CPU_CFLAGS = -m68302
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/gen68340.cfg b/make/custom/gen68340.cfg
index ef4154463e..278be8117c 100644
--- a/make/custom/gen68340.cfg
+++ b/make/custom/gen68340.cfg
@@ -15,8 +15,7 @@ RTEMS_BSP_FAMILY=gen68340
CPU_CFLAGS = -mcpu32
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/gen68360.cfg b/make/custom/gen68360.cfg
index e24112cce8..e757a38123 100644
--- a/make/custom/gen68360.cfg
+++ b/make/custom/gen68360.cfg
@@ -26,8 +26,7 @@ else
CPU_CFLAGS = -mcpu32
endif
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/genmongoosev.cfg b/make/custom/genmongoosev.cfg
index dcafdc0e36..61635907b2 100644
--- a/make/custom/genmongoosev.cfg
+++ b/make/custom/genmongoosev.cfg
@@ -17,8 +17,7 @@ RTEMS_BSP_FAMILY=genmongoosev
#
CPU_CFLAGS=-mips1 -G0
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O2 -g
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/gensh1.cfg b/make/custom/gensh1.cfg
index 5ed09c7c7e..df03bb1558 100644
--- a/make/custom/gensh1.cfg
+++ b/make/custom/gensh1.cfg
@@ -22,12 +22,7 @@ RTEMS_BSP_FAMILY=gensh1
#
CPU_CFLAGS=-m1
-# debug flags: typically none, but we use -O1 as it produces better code
-# CFLAGS_DEBUG_V = -O1
-CFLAGS_DEBUG_V =
-
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O4
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/gensh2.cfg b/make/custom/gensh2.cfg
index cbbdd954cc..1fc22deca7 100644
--- a/make/custom/gensh2.cfg
+++ b/make/custom/gensh2.cfg
@@ -22,14 +22,7 @@ RTEMS_BSP_FAMILY=gensh2
#
CPU_CFLAGS= -m2
-# debug flags: opt. is needed to fit in RAM. '-O1' has shown bad side-
-# effects by failing to set up some hardware I/O registers in
-# c/src/lib/libbsp/sh/gensh2/startup/hw_init.c (and perhaps elsewhere),
-# which prevented proper chip initialization and muted SCI1 output.
-CFLAGS_DEBUG_V = -O4 -g
-
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O4
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/gensh4.cfg b/make/custom/gensh4.cfg
index cf0affcf59..019ae2ecfb 100644
--- a/make/custom/gensh4.cfg
+++ b/make/custom/gensh4.cfg
@@ -29,11 +29,7 @@ RTEMS_BSP_FAMILY=gensh4
# It works with SH4_FPSCR_PR bit set
CPU_CFLAGS= -m4 -ml
-# debug flags:
-CFLAGS_DEBUG_V = -O0 -ggdb
-
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O4
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/gp32.cfg b/make/custom/gp32.cfg
index 0b5d9b16ba..dc9ded1e75 100644
--- a/make/custom/gp32.cfg
+++ b/make/custom/gp32.cfg
@@ -17,10 +17,7 @@ RTEMS_BSP_FAMILY=gp32
#
CPU_CFLAGS = -mcpu=arm920t -mstructure-size-boundary=32 -O3
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler (at least
-# -O2 so far.
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=
define make-exe
diff --git a/make/custom/h8sim.cfg b/make/custom/h8sim.cfg
index fbdfe048aa..c616a8816d 100644
--- a/make/custom/h8sim.cfg
+++ b/make/custom/h8sim.cfg
@@ -17,8 +17,7 @@ RTEMS_BSP_FAMILY=h8sim
#
CPU_CFLAGS=-mh -mint32
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# CFLAGS_OPTIMIZE_V=-O4 -mleaf-procedures
CFLAGS_OPTIMIZE_V=-O0
diff --git a/make/custom/helas403.cfg b/make/custom/helas403.cfg
index 74d752ff88..605474a628 100644
--- a/make/custom/helas403.cfg
+++ b/make/custom/helas403.cfg
@@ -18,8 +18,7 @@ RTEMS_BSP_FAMILY=helas403
#
CPU_CFLAGS = -mcpu=403 -D_OLD_EXCEPTIONS -Dppc403
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# NOTE: some level of -O may be actually required by inline assembler
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
diff --git a/make/custom/hurricane.cfg b/make/custom/hurricane.cfg
index e6f3375fe1..b092b0aea6 100644
--- a/make/custom/hurricane.cfg
+++ b/make/custom/hurricane.cfg
@@ -15,8 +15,7 @@ RTEMS_BSP_FAMILY=hurricane
# and (hopefully) optimize for it.
CPU_CFLAGS = -mips3 -G0 -EL
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/i386ex.cfg b/make/custom/i386ex.cfg
index dd677510e6..576ef28a6d 100644
--- a/make/custom/i386ex.cfg
+++ b/make/custom/i386ex.cfg
@@ -17,9 +17,7 @@ RTEMS_BSP_FAMILY=i386ex
#
CPU_CFLAGS = -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# -fomit-frame-pointer breaks debugging and C++ exceptions
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4
# Something like this should produce a map file but this does not work.
diff --git a/make/custom/idp.cfg b/make/custom/idp.cfg
index 64005e01a0..ee96a1dbc4 100644
--- a/make/custom/idp.cfg
+++ b/make/custom/idp.cfg
@@ -17,8 +17,7 @@ RTEMS_BSP_FAMILY=idp
#
CPU_CFLAGS = -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/jmr3904.cfg b/make/custom/jmr3904.cfg
index 0fe2e14d09..7184b35495 100644
--- a/make/custom/jmr3904.cfg
+++ b/make/custom/jmr3904.cfg
@@ -20,8 +20,7 @@ RTEMS_BSP_FAMILY=jmr3904
# gcc 3.1 and newer
CPU_CFLAGS=-march=r3900 -Wa,-xgot -G0
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O2
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/leon2.cfg b/make/custom/leon2.cfg
index 67507e350b..d4d6b60f38 100644
--- a/make/custom/leon2.cfg
+++ b/make/custom/leon2.cfg
@@ -20,8 +20,7 @@ RTEMS_BSP_FAMILY=leon2
#CPU_CFLAGS = -mcpu=cypress $(MSOFT_FLOAT)
CPU_CFLAGS = -mcpu=cypress -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O2
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/leon3.cfg b/make/custom/leon3.cfg
index 563a0e9199..7651a0e71d 100644
--- a/make/custom/leon3.cfg
+++ b/make/custom/leon3.cfg
@@ -22,8 +22,7 @@ RTEMS_BSP_FAMILY=leon3
#CPU_CFLAGS = -mcpu=cypress $(MSOFT_FLOAT)
CPU_CFLAGS = -mcpu=cypress -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O2
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/mbx821_002b.cfg b/make/custom/mbx821_002b.cfg
index ed638e081e..234dfb75cb 100644
--- a/make/custom/mbx821_002b.cfg
+++ b/make/custom/mbx821_002b.cfg
@@ -11,3 +11,5 @@ RTEMS_MBX_MODEL=mbx821_002b
8XX_CPU_TYPE=821
include $(RTEMS_ROOT)/make/custom/mbx8xx.cfg
+
+CFLAGS_OPTIMIZE_V=-O2
diff --git a/make/custom/mbx8xx.cfg b/make/custom/mbx8xx.cfg
index 61244e3783..64bf9d253a 100644
--- a/make/custom/mbx8xx.cfg
+++ b/make/custom/mbx8xx.cfg
@@ -45,11 +45,8 @@ RTEMS_BSP_FAMILY=mbx8xx
#
CPU_CFLAGS = -mcpu=$(8XX_CPU_TYPE) -Dmpc$(8XX_CPU_TYPE) -D$(RTEMS_MBX_MODEL)
-CFLAGS_DEBUG_V += -ggdb
-CXXFLAGS_DEBUG_V += -ggdb
# optimize flag: typically -O, could use -O4 or -fast
-# -O4 is ok for RTEMS
# NOTE: some level of -O may be actually required by inline assembler
# CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
diff --git a/make/custom/mcf5206elite.cfg b/make/custom/mcf5206elite.cfg
index 776a50c13c..a52de7e05e 100644
--- a/make/custom/mcf5206elite.cfg
+++ b/make/custom/mcf5206elite.cfg
@@ -19,8 +19,7 @@ RTEMS_BSP_FAMILY=mcf5206elite
#
CPU_CFLAGS = -m5200
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/mcf5235.cfg b/make/custom/mcf5235.cfg
index e7e61ce0b6..8cea39df8d 100644
--- a/make/custom/mcf5235.cfg
+++ b/make/custom/mcf5235.cfg
@@ -21,7 +21,7 @@ RTEMS_BSP_FAMILY=mcf5235
CPU_CFLAGS = -m528x
-# optimize flag: typically -0, could use -O4 or -fast, -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V= -O4 -fomit-frame-pointer
diff --git a/make/custom/mcp750.cfg b/make/custom/mcp750.cfg
index 9dfff20898..19f2be80ee 100644
--- a/make/custom/mcp750.cfg
+++ b/make/custom/mcp750.cfg
@@ -17,20 +17,9 @@ RTEMS_BSP_FAMILY=motorola_powerpc
#
CPU_CFLAGS = -mcpu=750 -Dmpc750
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler (at least
-# -O2 so far.
-# NOTE2 Apparently nobody really knows the status or r2 and r13.
-# As far as I know, small data are pointer impose a very specific compliation
-# model => not used.
-# Currently the sdata2 and sbss2 sections are empty => r2 is not used...
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).nxe $(LINK_OBJS) $(LINK_LIBS)
diff --git a/make/custom/mpc8260ads.cfg b/make/custom/mpc8260ads.cfg
index ec74d4b03d..68685f57e7 100644
--- a/make/custom/mpc8260ads.cfg
+++ b/make/custom/mpc8260ads.cfg
@@ -19,8 +19,7 @@ RTEMS_BSP_FAMILY=mpc8260ads
# CPU_CFLAGS = -mcpu=$(8XX_CPU_TYPE) -mstrict-align
CPU_CFLAGS = -mcpu=603e -mstrict-align -Dmpc8260
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# NOTE: some level of -O may be actually required by inline assembler
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions -g
diff --git a/make/custom/mrm332.cfg b/make/custom/mrm332.cfg
index f449e675c1..b109eabf32 100644
--- a/make/custom/mrm332.cfg
+++ b/make/custom/mrm332.cfg
@@ -16,7 +16,7 @@ RTEMS_BSP_FAMILY=mrm332
# and (hopefully) optimize for it.
CPU_CFLAGS = -mcpu32
-# optimize flag: typically -0, could use -O4 or -fast, -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/mtx603e.cfg b/make/custom/mtx603e.cfg
index 460b572895..92da685114 100644
--- a/make/custom/mtx603e.cfg
+++ b/make/custom/mtx603e.cfg
@@ -16,20 +16,9 @@ RTEMS_BSP_FAMILY=motorola_powerpc
# and (hopefully) optimize for it.
CPU_CFLAGS = -mcpu=603e -Dmpc603e -Dppc603e
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler (at least
-# -O2 so far.
-# NOTE2 Apparently nobody really knows the status or r2 and r13.
-# As far as I know, small data are pointer impose a very specific compliation
-# model => not used.
-# Currently the sdata2 and sbss2 sections are empty => r2 is not used...
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).nxe $(LINK_OBJS) $(LINK_LIBS)
diff --git a/make/custom/mvme136.cfg b/make/custom/mvme136.cfg
index 38bf33cd56..1ccea1fd40 100644
--- a/make/custom/mvme136.cfg
+++ b/make/custom/mvme136.cfg
@@ -18,8 +18,7 @@ RTEMS_BSP_FAMILY=mvme136
#
CPU_CFLAGS =
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/mvme147.cfg b/make/custom/mvme147.cfg
index af8e9d922f..41feb8564d 100644
--- a/make/custom/mvme147.cfg
+++ b/make/custom/mvme147.cfg
@@ -15,8 +15,7 @@ RTEMS_BSP_FAMILY=mvme147
# default flags
CPU_CFLAGS=
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/mvme162.cfg b/make/custom/mvme162.cfg
index 9e1eb0317e..639732904b 100644
--- a/make/custom/mvme162.cfg
+++ b/make/custom/mvme162.cfg
@@ -20,8 +20,7 @@ RTEMS_BSP_FAMILY=mvme162
CPU_CFLAGS = -m68040
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/mvme162lx.cfg b/make/custom/mvme162lx.cfg
index 67604081b4..b3380a9062 100644
--- a/make/custom/mvme162lx.cfg
+++ b/make/custom/mvme162lx.cfg
@@ -26,8 +26,7 @@ RTEMS_BSP_FAMILY=mvme162
#
CPU_CFLAGS = -m68040 -msoft-float
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/mvme167.cfg b/make/custom/mvme167.cfg
index 6a0ade8455..310f5ea360 100644
--- a/make/custom/mvme167.cfg
+++ b/make/custom/mvme167.cfg
@@ -23,10 +23,8 @@ RTEMS_BSP_FAMILY=mvme167
CPU_CFLAGS = -m68040
-CFLAGS_DEBUG_V += -ggdb
# optimize flag: typically -O, could use -O4 or -fast
-# -O4 is ok for RTEMS
CFLAGS_OPTIMIZE_V=-O4 -fno-omit-frame-pointer
# Here is the rule to actually build a $(ARCH)/foo.exe
diff --git a/make/custom/mvme2100.cfg b/make/custom/mvme2100.cfg
index c31dfdd150..7378e20362 100644
--- a/make/custom/mvme2100.cfg
+++ b/make/custom/mvme2100.cfg
@@ -16,20 +16,9 @@ RTEMS_BSP_FAMILY=motorola_powerpc
# and (hopefully) optimize for it.
CPU_CFLAGS = -mcpu=603e -Dmpc603e -Dppc603e
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE2: some level of -O may be actually required by inline assembler (at least
-# -O2 so far.
-# NOTE2 Apparently nobody really knows the status or r2 and r13.
-# As far as I know, small data are pointer impose a very specific compliation
-# model => not used.
-# Currently the sdata2 and sbss2 sections are empty => r2 is not used...
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).nxe $(LINK_OBJS) $(LINK_LIBS)
diff --git a/make/custom/mvme2307.cfg b/make/custom/mvme2307.cfg
index 0ccd627d53..3559470ff2 100644
--- a/make/custom/mvme2307.cfg
+++ b/make/custom/mvme2307.cfg
@@ -18,16 +18,11 @@ RTEMS_BSP_FAMILY=motorola_powerpc
CPU_CFLAGS = -mcpu=604 -mmultiple -mstring -mstrict-align -meabi
#-msdata=eabi
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# NOTE: some level of -O may be actually required by inline assembler
#CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
CFLAGS_OPTIMIZE_V = -O4
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).nxe $(LINK_OBJS) $(LINK_LIBS)
diff --git a/make/custom/mvme5500.cfg b/make/custom/mvme5500.cfg
index 0f9f0c1ae5..51a3a901a7 100644
--- a/make/custom/mvme5500.cfg
+++ b/make/custom/mvme5500.cfg
@@ -19,16 +19,10 @@ RTEMS_BSP_FAMILY=mvme5500
CPU_CFLAGS = -mcpu=7450 -Dmpc7455 -mno-altivec -mabi=altivec -mvrsave=no -mmultiple -mstring -mstrict-align
#T. Straumann; disable sdata=eabi for now until CEXP supports it -meabi -msdata=eabi
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# NOTE: some level of -O may be actually required by inline assembler
+# optimize flag: typically -O2
#CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
CFLAGS_OPTIMIZE_V = -O4
-# debug flags: typically none, but at least -O1 is required due to this
-# BSP using inlined code
-CFLAGS_DEBUG_V = -O1
-
define make-exe
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
diff --git a/make/custom/ods68302.cfg b/make/custom/ods68302.cfg
index b2e2e2fecc..c42e91ca97 100644
--- a/make/custom/ods68302.cfg
+++ b/make/custom/ods68302.cfg
@@ -24,13 +24,9 @@ RTEMS_BSP_FAMILY=ods68302
# CPU_CFLAGS = -m68302 -msoft-float
CPU_CFLAGS = -m68302
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
-# debugging please
-CFLAGS_DEBUG_V =
-
# The following are definitions of make-exe which will work using ld as
# is currently required. It is expected that as of gcc 2.8, the end user
# will be able to override parts of the compilers specs and link using gcc.
diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg
index 4021faadb4..e965bb701e 100644
--- a/make/custom/pc386.cfg
+++ b/make/custom/pc386.cfg
@@ -20,9 +20,7 @@ RTEMS_BSP_FAMILY=pc386
# NOTE: CPU_CFLAGS is set by pc386 variants.
# CPU_CFLAGS =
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# -fomit-frame-pointer breaks debugging and C++ exceptions
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4
# Here is the rule to actually build a $(ARCH)/foo.exe
diff --git a/make/custom/psim.cfg b/make/custom/psim.cfg
index 9f66ce7243..85a787fafc 100644
--- a/make/custom/psim.cfg
+++ b/make/custom/psim.cfg
@@ -18,8 +18,7 @@ RTEMS_BSP_FAMILY=psim
CPU_CFLAGS = -mcpu=603e -Dppc603e
#-ffunction-sections
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# NOTE: some level of -O may be actually required by inline assembler
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
diff --git a/make/custom/rbtx4925.cfg b/make/custom/rbtx4925.cfg
index ec8557486d..e0076f492b 100644
--- a/make/custom/rbtx4925.cfg
+++ b/make/custom/rbtx4925.cfg
@@ -15,8 +15,7 @@ RTEMS_BSP_FAMILY=rbtx4925
# and (hopefully) optimize for it.
CPU_CFLAGS = -mips3 -G0 -EL
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/rbtx4938.cfg b/make/custom/rbtx4938.cfg
index cc169c1105..f8589a6d06 100644
--- a/make/custom/rbtx4938.cfg
+++ b/make/custom/rbtx4938.cfg
@@ -15,8 +15,7 @@ RTEMS_BSP_FAMILY=rbtx4938
# and (hopefully) optimize for it.
CPU_CFLAGS = -mips3 -G0 -EL
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-fomit-frame-pointer
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/score603e.cfg b/make/custom/score603e.cfg
index d764842d4c..f57e2fe497 100644
--- a/make/custom/score603e.cfg
+++ b/make/custom/score603e.cfg
@@ -22,8 +22,7 @@ RTEMS_BSP_FAMILY=score603e
#
CPU_CFLAGS = -mcpu=603e -Dmpc603e -Dppc603e -mmultiple -mstring -mstrict-align
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# NOTE: some level of -O may be actually required by inline assembler
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
# CFLAGS_OPTIMIZE_V=-O0
diff --git a/make/custom/shsim.cfg b/make/custom/shsim.cfg
index a9919c70e5..2726eb3c52 100644
--- a/make/custom/shsim.cfg
+++ b/make/custom/shsim.cfg
@@ -17,8 +17,7 @@ RTEMS_BSP_FAMILY=shsim
#
CPU_CFLAGS=-m1
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
# CFLAGS_OPTIMIZE_V=-O4 -mleaf-procedures
CFLAGS_OPTIMIZE_V=-O2 -g
diff --git a/make/custom/sim68000.cfg b/make/custom/sim68000.cfg
index 58d58f7cc1..48c74b7fca 100644
--- a/make/custom/sim68000.cfg
+++ b/make/custom/sim68000.cfg
@@ -13,13 +13,9 @@ CPU_CFLAGS = -m68000
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=sim68000
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
-# debugging please
-CFLAGS_DEBUG_V =
-
# The following are definitions of make-exe which will work using ld as
# is currently required. It is expected that as of gcc 2.8, the end user
# will be able to override parts of the compilers specs and link using gcc.
diff --git a/make/custom/simcpu32.cfg b/make/custom/simcpu32.cfg
index d9c6bcc639..c548591960 100644
--- a/make/custom/simcpu32.cfg
+++ b/make/custom/simcpu32.cfg
@@ -13,13 +13,9 @@ CPU_CFLAGS = -mcpu32
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=sim68000
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
-# debugging please
-CFLAGS_DEBUG_V =
-
# The following are definitions of make-exe which will work using ld as
# is currently required. It is expected that as of gcc 2.8, the end user
# will be able to override parts of the compilers specs and link using gcc.
diff --git a/make/custom/simsh4.cfg b/make/custom/simsh4.cfg
index 0002a6c948..d8fa0fdfb9 100644
--- a/make/custom/simsh4.cfg
+++ b/make/custom/simsh4.cfg
@@ -29,11 +29,7 @@ RTEMS_BSP_FAMILY=simsh4
CPU_CFLAGS= -m4 -ml
-# debug flags:
-CFLAGS_DEBUG_V = -O0 -ggdb
-
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O4
# The following are definitions of make-exe which will work using ld as
diff --git a/make/custom/simsh7032.cfg b/make/custom/simsh7032.cfg
index caf2673799..1db61f14ce 100644
--- a/make/custom/simsh7032.cfg
+++ b/make/custom/simsh7032.cfg
@@ -19,12 +19,7 @@ RTEMS_CPU_MODEL=sh7032
#
CPU_CFLAGS=-m1
-# debug flags: typically none, but we use -O1 as it produces better code
-# CFLAGS_DEBUG_V = -O1
-CFLAGS_DEBUG_V =
-
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O4
# Miscellaneous additions go here
diff --git a/make/custom/simsh7045.cfg b/make/custom/simsh7045.cfg
index 5282917a31..c2a40bf9eb 100644
--- a/make/custom/simsh7045.cfg
+++ b/make/custom/simsh7045.cfg
@@ -19,12 +19,7 @@ RTEMS_CPU_MODEL=sh7045
#
CPU_CFLAGS=-m2
-# debug flags: typically none, but we use -O1 as it produces better code
-# CFLAGS_DEBUG_V = -O1
-CFLAGS_DEBUG_V =
-
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O4
# Miscellaneous additions go here
diff --git a/make/custom/ss555.cfg b/make/custom/ss555.cfg
index 5b87f74a0c..5855acb760 100644
--- a/make/custom/ss555.cfg
+++ b/make/custom/ss555.cfg
@@ -22,13 +22,7 @@ RTEMS_BSP_FAMILY=ss555
#
CPU_CFLAGS = -mcpu=$(GCC_CPU_MODEL) -D$(RTEMS_CPU_MODEL) -D$(RTEMS_BSP_FAMILY)
-# Debugging flags: If we debug with optimization on, single-stepping
-# sometimes looks a little odd, but there won't be any surprises later.
-CFLAGS_DEBUG_V += -O4 -ggdb
-CXXFLAGS_DEBUG_V += -O4 -ggdb
-
# optimize flag: typically -O, could use -O4 or -fast
-# -O4 is ok for RTEMS
# NOTE: some level of -O may be actually required by inline assembler
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
CXXFLAGS_OPTIMIZE_V=-O4
diff --git a/make/custom/ts_386ex.cfg b/make/custom/ts_386ex.cfg
index 71932c2fd7..dedc19a33b 100644
--- a/make/custom/ts_386ex.cfg
+++ b/make/custom/ts_386ex.cfg
@@ -18,9 +18,7 @@ RTEMS_BSP_FAMILY=ts_386ex
#
CPU_CFLAGS =-msoft-float -mno-fp-ret-in-387
-# optimize flag: typically -0, could use -O4 or -fast
-# -O4 is ok for RTEMS
-# -fomit-frame-pointer breaks debugging and C++ exceptions
+# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V= -O4
# Something like this should produce a map file but this does not work.