summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/bsp_specs8
-rw-r--r--c/src/lib/libbsp/i386/force386/bsp_specs9
-rw-r--r--c/src/lib/libbsp/i386/i386ex/bsp_specs9
-rw-r--r--c/src/lib/libbsp/i386/pc386/bsp_specs9
-rw-r--r--c/src/lib/libbsp/i960/cvme961/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/efi332/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/efi68k/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/idp/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/mvme147/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/bsp_specs9
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/bsp_specs12
-rw-r--r--c/src/lib/libbsp/m68k/ods68302/bsp_specs9
-rw-r--r--c/src/lib/libbsp/mips/p4000/bsp_specs9
-rw-r--r--c/src/lib/libbsp/mips64orion/p4000/bsp_specs9
-rw-r--r--c/src/lib/libbsp/powerpc/papyrus/bsp_specs9
-rw-r--r--c/src/lib/libbsp/sparc/erc32/bsp_specs9
-rw-r--r--c/src/make/compilers/gcc-target-default.cfg4
-rw-r--r--make/Templates/Makefile.leaf7
-rw-r--r--make/compilers/gcc-target-default.cfg4
23 files changed, 157 insertions, 40 deletions
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/bsp_specs b/c/src/lib/libbsp/hppa1.1/simhppa/bsp_specs
index 1090312e05..fe6aa2a53d 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/bsp_specs
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/bsp_specs
@@ -8,10 +8,14 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/i386/force386/bsp_specs b/c/src/lib/libbsp/i386/force386/bsp_specs
index 5e84733426..61dac86b53 100644
--- a/c/src/lib/libbsp/i386/force386/bsp_specs
+++ b/c/src/lib/libbsp/i386/force386/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/i386/i386ex/bsp_specs b/c/src/lib/libbsp/i386/i386ex/bsp_specs
index 5e84733426..61dac86b53 100644
--- a/c/src/lib/libbsp/i386/i386ex/bsp_specs
+++ b/c/src/lib/libbsp/i386/i386ex/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/i386/pc386/bsp_specs b/c/src/lib/libbsp/i386/pc386/bsp_specs
index 5e84733426..61dac86b53 100644
--- a/c/src/lib/libbsp/i386/pc386/bsp_specs
+++ b/c/src/lib/libbsp/i386/pc386/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/i960/cvme961/bsp_specs b/c/src/lib/libbsp/i960/cvme961/bsp_specs
index 40e8c13291..4ee806f718 100644
--- a/c/src/lib/libbsp/i960/cvme961/bsp_specs
+++ b/c/src/lib/libbsp/i960/cvme961/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
diff --git a/c/src/lib/libbsp/m68k/dmv152/bsp_specs b/c/src/lib/libbsp/m68k/dmv152/bsp_specs
index 5e84733426..61dac86b53 100644
--- a/c/src/lib/libbsp/m68k/dmv152/bsp_specs
+++ b/c/src/lib/libbsp/m68k/dmv152/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/efi332/bsp_specs b/c/src/lib/libbsp/m68k/efi332/bsp_specs
index 290bf0af40..0e65618e1a 100644
--- a/c/src/lib/libbsp/m68k/efi332/bsp_specs
+++ b/c/src/lib/libbsp/m68k/efi332/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start332.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start332.o%s} \
+%{qrtems_debug: start332_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/efi68k/bsp_specs b/c/src/lib/libbsp/m68k/efi68k/bsp_specs
index a01455935e..2e248c6d82 100644
--- a/c/src/lib/libbsp/m68k/efi68k/bsp_specs
+++ b/c/src/lib/libbsp/m68k/efi68k/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start68k.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start68k.o%s} \
+%{qrtems_debug: start68k_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/gen68302/bsp_specs b/c/src/lib/libbsp/m68k/gen68302/bsp_specs
index 13e5c56dae..110e993dc5 100644
--- a/c/src/lib/libbsp/m68k/gen68302/bsp_specs
+++ b/c/src/lib/libbsp/m68k/gen68302/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start302.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start302.o%s} \
+%{qrtems_debug: start302_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/gen68360/bsp_specs b/c/src/lib/libbsp/m68k/gen68360/bsp_specs
index 241d30f5cc..8d99d81446 100644
--- a/c/src/lib/libbsp/m68k/gen68360/bsp_specs
+++ b/c/src/lib/libbsp/m68k/gen68360/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start360.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start360.o%s} \
+%{qrtems_debug: start360_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/idp/bsp_specs b/c/src/lib/libbsp/m68k/idp/bsp_specs
index 5e84733426..61dac86b53 100644
--- a/c/src/lib/libbsp/m68k/idp/bsp_specs
+++ b/c/src/lib/libbsp/m68k/idp/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/mvme136/bsp_specs b/c/src/lib/libbsp/m68k/mvme136/bsp_specs
index 5e84733426..61dac86b53 100644
--- a/c/src/lib/libbsp/m68k/mvme136/bsp_specs
+++ b/c/src/lib/libbsp/m68k/mvme136/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/mvme147/bsp_specs b/c/src/lib/libbsp/m68k/mvme147/bsp_specs
index 5e84733426..61dac86b53 100644
--- a/c/src/lib/libbsp/m68k/mvme147/bsp_specs
+++ b/c/src/lib/libbsp/m68k/mvme147/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/mvme147s/bsp_specs b/c/src/lib/libbsp/m68k/mvme147s/bsp_specs
index 5e84733426..61dac86b53 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/bsp_specs
+++ b/c/src/lib/libbsp/m68k/mvme147s/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/mvme162/bsp_specs b/c/src/lib/libbsp/m68k/mvme162/bsp_specs
index adbc3bc847..2ee8ccda4d 100644
--- a/c/src/lib/libbsp/m68k/mvme162/bsp_specs
+++ b/c/src/lib/libbsp/m68k/mvme162/bsp_specs
@@ -7,11 +7,19 @@
*cpp:
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
+*link:
+%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
+
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start.o%s} \
+%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/m68k/ods68302/bsp_specs b/c/src/lib/libbsp/m68k/ods68302/bsp_specs
index be234a5855..110e993dc5 100644
--- a/c/src/lib/libbsp/m68k/ods68302/bsp_specs
+++ b/c/src/lib/libbsp/m68k/ods68302/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: start302.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: start302.o%s} \
+%{qrtems_debug: start302_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/mips/p4000/bsp_specs b/c/src/lib/libbsp/mips/p4000/bsp_specs
index c5d2427716..3f488f47b6 100644
--- a/c/src/lib/libbsp/mips/p4000/bsp_specs
+++ b/c/src/lib/libbsp/mips/p4000/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: idt_csu.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: idt_csu.o%s} \
+%{qrtems_debug: idt_csu_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/mips64orion/p4000/bsp_specs b/c/src/lib/libbsp/mips64orion/p4000/bsp_specs
index c5d2427716..3f488f47b6 100644
--- a/c/src/lib/libbsp/mips64orion/p4000/bsp_specs
+++ b/c/src/lib/libbsp/mips64orion/p4000/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: idt_csu.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: idt_csu.o%s} \
+%{qrtems_debug: idt_csu_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/lib/libbsp/powerpc/papyrus/bsp_specs b/c/src/lib/libbsp/powerpc/papyrus/bsp_specs
index 0a7a234098..5720274009 100644
--- a/c/src/lib/libbsp/powerpc/papyrus/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/papyrus/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: ecrti%O%s --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: ecrti%O%s --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: }
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: } \
+%{qrtems_debug: }}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -u download_entry -N -e start}
diff --git a/c/src/lib/libbsp/sparc/erc32/bsp_specs b/c/src/lib/libbsp/sparc/erc32/bsp_specs
index b5eba3e2f1..51f7ff15ac 100644
--- a/c/src/lib/libbsp/sparc/erc32/bsp_specs
+++ b/c/src/lib/libbsp/sparc/erc32/bsp_specs
@@ -8,10 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
-%{!qrtems: %(old_lib)} %{qrtems: --start-group -lrtemsall -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}
+%{!qrtems: %(old_lib)} %{qrtems: --start-group \
+%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
+-lc -lgcc --end-group \
+%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
-%{!qrtems: %(old_startfile)} %{qrtems: startsis.o%s}
+%{!qrtems: %(old_startfile)} %{qrtems: \
+%{!qrtems_debug: startsis.o%s} \
+%{qrtems_debug: startsis_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
diff --git a/c/src/make/compilers/gcc-target-default.cfg b/c/src/make/compilers/gcc-target-default.cfg
index 32f40c5e96..c832a08143 100644
--- a/c/src/make/compilers/gcc-target-default.cfg
+++ b/c/src/make/compilers/gcc-target-default.cfg
@@ -71,6 +71,10 @@ endif
# debug flag; typically -g
CFLAGS_DEBUG_V+=-g -Wno-unused
+ifeq ($(RTEMS_USE_GCC272),no)
+CFLAGS_DEBUG_V+=-qrtems_debug
+endif
+
# when debugging, optimize flag: typically empty
# some compilers do allow optimization with their "-g"
#CFLAGS_DEBUG_OPTIMIZE_V=
diff --git a/make/Templates/Makefile.leaf b/make/Templates/Makefile.leaf
index 6f098d4b50..8d610b1c0e 100644
--- a/make/Templates/Makefile.leaf
+++ b/make/Templates/Makefile.leaf
@@ -45,6 +45,13 @@ DEFINES +=
CPPFLAGS +=
CFLAGS +=
+#
+# CFLAGS_DEBUG_V are used when the `make debug' target is built.
+# To link your application with the non-optimized RTEMS routines,
+# uncomment the following line:
+# CFLAGS_DEBUG_V += -qrtems_debug
+#
+
LD_PATHS += xxx-your-EXTRA-library-paths-go-here, if any
LD_LIBS += xxx-your-libraries-go-here eg: -lvx
LDFLAGS +=
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index 32f40c5e96..c832a08143 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/make/compilers/gcc-target-default.cfg
@@ -71,6 +71,10 @@ endif
# debug flag; typically -g
CFLAGS_DEBUG_V+=-g -Wno-unused
+ifeq ($(RTEMS_USE_GCC272),no)
+CFLAGS_DEBUG_V+=-qrtems_debug
+endif
+
# when debugging, optimize flag: typically empty
# some compilers do allow optimization with their "-g"
#CFLAGS_DEBUG_OPTIMIZE_V=