GithubHelp home page GithubHelp logo

Comments (1)

jrtc27 avatar jrtc27 commented on August 23, 2024

All you need is to point --sysroot at the CheriBSD rootfs directory, i.e. ~/cheri/output/rootfs-riscv64-purecap (~/cheri/output/sdk/sysroot-riscv64-purecap should also work, but it's not what cheribuild tends to use) and -B at ~/cheri/output/sdk/bin, plus any other compiler flags needed to set the triple, architecture, ABI, etc. For example, a minimal correct use would be:

-target riscv64-unknown-freebsd14 --sysroot=$HOME/cheri/output/rootfs-riscv64-purecap -B$HOME/cheri/output/sdk/bin -march=rv64imafdcxcheri -mabi=l64pc128d -mno-relax

~/cheri/output/sdk/utils/cheribsd-riscv64-purecap-clang exists as a convenient wrapper for users to use rather than having to specify those command-line arguments manually (it automatically picks up the set of arguments in ~/cheri/output/sdk/bin/cheribsd-riscv64-purecap.cfg, which you will note is the same as I gave above), though that is intended for users, not machines, to use, i.e. it is not guaranteed to be a stable interface (and hence why it's in utils/ not bin/).

  • I tried installing the cheribsd-sdk-native target
    But GDB failed to configure, complaining of missing GMP

Give cheribsd-sdk-native is not a thing that exists, I don't know if this was you trying to build gdb-native or cross-compile GDB for RISC-V. For the former it should pick up gmp from the system, but I guess there's a chance it's broken. gmp-native does exist as a target you can build for that though. If you're cross-compiling then you will of course need a cross-compiled gmp, for which you can use gmp-<target> to match gdb-<target>.

from cheribuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.