aboutsummaryrefslogtreecommitdiff
path: root/libgloss/arc/hl.specs
diff options
context:
space:
mode:
authorVladimir Isaev <vvisaev@gmail.com>2024-05-21 10:56:49 +0100
committerJeff Johnston <jjohnstn@redhat.com>2024-05-22 14:25:44 -0400
commit6d5331054ee3c957a4d3c8df05321f670c962020 (patch)
tree5c60c2803923a50dba14b1b6fa230889a8d839a9 /libgloss/arc/hl.specs
parent25d110dcbdb3a1a02b11f8c53504a27efcda9e82 (diff)
downloadnewlib-6d5331054ee3c957a4d3c8df05321f670c962020.zip
newlib-6d5331054ee3c957a4d3c8df05321f670c962020.tar.gz
newlib-6d5331054ee3c957a4d3c8df05321f670c962020.tar.bz2
arc: libgloss: Introduce hostlink interface
There is a special interface built in ARC simulators (such as nSIM) called MetaWare hostlink IO which can be used to implement system calls. This commit adds support for this interface to the ARC port of libgloss. Here is an example of using this interface: $ arc-elf32-gcc -mcpu=hs -specs=hl.specs main.c -o main $ nsimdrv -tcf $NSIM_HOME/etc/tcf/templates/hs48_full.tcf main Hello, World! Signed-off-by: Vladimir Isaev <vvisaev@gmail.com>
Diffstat (limited to 'libgloss/arc/hl.specs')
-rw-r--r--libgloss/arc/hl.specs14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgloss/arc/hl.specs b/libgloss/arc/hl.specs
new file mode 100644
index 0000000..9bb5b79
--- /dev/null
+++ b/libgloss/arc/hl.specs
@@ -0,0 +1,14 @@
+%rename link_gcc_c_sequence hl_link_gcc_c_sequence
+%rename startfile hl_startfile
+
+*hl_libgloss:
+-lhl
+
+*hl_libc:
+%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano}
+
+*link_gcc_c_sequence:
+%(hl_link_gcc_c_sequence) --start-group %G %(hl_libc) %(hl_libgloss) --end-group
+
+*startfile:
+%(hl_startfile) arc-main-helper%O%s