Skip to content

Commit 531c149

Browse files
author
gingold
committed
Add support for leon4.
TN: P118-006 git-svn-id: svn+ssh://svn.us.adacore.com/Dev/trunk/bb-runtimes@319591 f8352e7e-cb20-0410-8ce7-b5d9e71c585c
1 parent 1968d4e commit 531c149

File tree

3 files changed

+72
-2
lines changed

3 files changed

+72
-2
lines changed

build-all.sh

+23
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,21 @@ build_full_leon3()
366366
do_ravenscar leon3-elf ravenscar-full/leon3 --cross-dir=$CROSS_DIR
367367
}
368368

369+
build_zfp_leon4()
370+
{
371+
do_zfp leon3-elf zfp/leon4 --cross-dir=$CROSS_DIR
372+
}
373+
374+
build_sfp_leon4()
375+
{
376+
do_ravenscar leon3-elf ravenscar-sfp/leon4 --cross-dir=$CROSS_DIR
377+
}
378+
379+
build_full_leon4()
380+
{
381+
do_ravenscar leon3-elf ravenscar-full/leon4 --cross-dir=$CROSS_DIR
382+
}
383+
369384
build_zfp_x86_linux()
370385
{
371386
do_zfp x86-linux zfp/x86-linux
@@ -636,6 +651,14 @@ else
636651
*) echo "Unknown command $opt for target $target"; exit 2;;
637652
esac
638653
;;
654+
leon4)
655+
case $opt in
656+
zfp) build_zfp_leon4 ;;
657+
sfp) build_sfp_leon4 ;;
658+
full) build_full_leon4 ;;
659+
*) echo "Unknown command $opt for target $target"; exit 2;;
660+
esac
661+
;;
639662

640663
# Misc
641664
x86-linux)

build-rts.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ case $config in
359359
*xtratum/leon3)
360360
gnat_target=erc32-elf
361361
;;
362-
*/leon3)
362+
*/leon3 | */leon4)
363363
gnat_target=leon3-elf
364364
;;
365365
*/mcm)
@@ -1154,12 +1154,15 @@ case $config in
11541154
"zfp/erc32" \
11551155
| "zfp/leon" \
11561156
| "zfp/leon3" \
1157+
| "zfp/leon4" \
11571158
| "ravenscar-sfp/erc32" \
11581159
| "ravenscar-sfp/leon" \
11591160
| "ravenscar-sfp/leon3" \
1161+
| "ravenscar-sfp/leon4" \
11601162
| "ravenscar-full/erc32" \
11611163
| "ravenscar-full/leon" \
1162-
| "ravenscar-full/leon3")
1164+
| "ravenscar-full/leon3" \
1165+
| "ravenscar-full/leon4")
11631166
extra_gnat_files="$extra_gnat_files
11641167
$textio_src s-macres.ads s-macres.adb";
11651168
extra_target_pairs="$extra_target_pairs
@@ -1201,6 +1204,14 @@ case $config in
12011204
arch_files="$crossdir/leon3-elf/leon.ld
12021205
$crossdir/leon-elf/crt0.S"
12031206
;;
1207+
*/leon4)
1208+
# Like leon3 except for bbbopa.
1209+
extra_target_pairs="$extra_target_pairs
1210+
s-bbbopa.ads:s-bbbopa-leon4.ads
1211+
s-textio.adb:s-textio-leon3.adb"
1212+
arch_files="$crossdir/leon3-elf/leon.ld
1213+
$crossdir/leon-elf/crt0.S"
1214+
;;
12041215
*/erc32)
12051216
extra_target_pairs="$extra_target_pairs
12061217
s-textio.adb:s-textio-erc32.adb"

sparc/leon4/runtime.xml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" ?>
2+
3+
<gprconfig>
4+
<configuration>
5+
<config>
6+
package Compiler is
7+
Common_Required_Switches := ();
8+
9+
for Leading_Required_Switches ("Ada") use
10+
Compiler'Leading_Required_Switches ("Ada") &amp;
11+
Common_Required_Switches;
12+
13+
for Leading_Required_Switches ("C") use
14+
Compiler'Leading_Required_Switches ("C") &amp;
15+
("-DLEON", "-DLEON3") &amp;
16+
Common_Required_Switches;
17+
18+
for Leading_Required_Switches ("Asm_Cpp") use
19+
Compiler'Leading_Required_Switches ("Asm_Cpp") &amp;
20+
("-DLEON", "-DLEON3") &amp;
21+
Common_Required_Switches;
22+
end Compiler;
23+
24+
LDSCRIPT := external ("LDSCRIPT", "${RUNTIME_DIR(ada)}/arch/leon.ld");
25+
-- Linker script to use
26+
27+
package Linker is
28+
for Required_Switches use Linker'Required_Switches &amp;
29+
("-L${RUNTIME_DIR(ada)}/adalib",
30+
"-nostartfiles",
31+
"-T" &amp; LDSCRIPT, "-Wl,-u_start") &amp;
32+
Compiler.Common_Required_Switches;
33+
end Linker;
34+
</config>
35+
</configuration>
36+
</gprconfig>

0 commit comments

Comments
 (0)