You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2021/04/26 09:53:21 UTC

[mynewt-core] 02/02: compiler/riscv: Add alternative toolchain

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit bcb0a7f117553c34682f7073a804777fe817a53c
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Wed Apr 21 09:39:49 2021 +0200

    compiler/riscv: Add alternative toolchain
    
    riscv64 toolchain currently associated with hifive1 board
    is the original toolchain from Sifive1.
    For some time now there is alternative that has some very minor
    differences.
    This adds this alternative toolchain in case someone wants to used it.
---
 compiler/riscv-none-embed/compiler.yml | 37 ++++++++++++++++++++++++++++++++++
 compiler/riscv-none-embed/pkg.yml      | 29 ++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/compiler/riscv-none-embed/compiler.yml b/compiler/riscv-none-embed/compiler.yml
new file mode 100644
index 0000000..9301a63
--- /dev/null
+++ b/compiler/riscv-none-embed/compiler.yml
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+compiler.path.cc: "riscv-none-embed-gcc"
+compiler.path.cpp: "riscv-none-embed-g++"
+compiler.path.as: "riscv-none-embed-gcc"
+compiler.path.archive: "riscv-none-embed-ar"
+compiler.path.objdump: "riscv-none-embed-objdump"
+compiler.path.objsize: "riscv-none-embed-size"
+compiler.path.objcopy: "riscv-none-embed-objcopy"
+
+compiler.flags.base: [-Wall, -Werror, -Wno-format-truncation, -ffunction-sections, -fdata-sections, -fno-builtin-printf, -fno-common]
+compiler.flags.default: [compiler.flags.base, -O1, -ggdb]
+compiler.flags.optimized: [compiler.flags.base, -Os, -ggdb]
+compiler.flags.debug: [compiler.flags.base, -Og, -ggdb]
+
+compiler.as.flags: [-x assembler-with-cpp]
+
+compiler.ld.flags: -static -specs=nosys.specs -Wl,--gc-sections -nostartfiles
+compiler.ld.resolve_circular_deps: true
+compiler.ld.mapfile: true
diff --git a/compiler/riscv-none-embed/pkg.yml b/compiler/riscv-none-embed/pkg.yml
new file mode 100644
index 0000000..eaec54b
--- /dev/null
+++ b/compiler/riscv-none-embed/pkg.yml
@@ -0,0 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: compiler/riscv-none-embed
+pkg.type: compiler
+pkg.description: Compiler definition for riscv gcc compiler.
+pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+    - riscv
+    - compiler
+    - gcc
+    - rv32imac