Giter Club home page Giter Club logo

Comments (8)

japaric avatar japaric commented on July 2, 2024

LLVM's compiler-rt doesn't really support the ARM Cortex-M architecture. This crate compiles all the intrinsics that don't fail to compile to that architecture regardless of whether the intrinsic is actually "used" (i.e. LLVM lowers some Rust code to that intrinsic). I'd be okay with removing this intrinsic (enable_execute_stack) if it doesn't compile on Debian but I'll add it back if we later find out that LLVM lowers some Rust code to that intrinsic.

from compiler-rt.rs.

thejpster avatar thejpster commented on July 2, 2024

Well I wasn't sure if I even needed compiler-rt.rs, but your xargo example for building copper for an STM32 seemed to include it so I figured I'd add it.

from compiler-rt.rs.

japaric avatar japaric commented on July 2, 2024

Well I wasn't sure if I even needed compiler-rt.rs

Nah, you can actually get quite far without it (unless you need to do floating point operations on a device without FPU like Cortex-M0 or Cortex-M0).

your xargo example for building copper for an STM32 seemed to include it so I figured I'd add it.

Did it? Which one? I'm sure the copper book examples don't use compiler-rt.rs -- all the example use target spec files with no-compilert-rt set to true.

from compiler-rt.rs.

thejpster avatar thejpster commented on July 2, 2024

On the xargo README.

https://camo.githubusercontent.com/b9f45b5ed49d6970b512e9a985297873970e8e42/687474703a2f2f692e696d6775722e636f6d2f705549666e77752e6a7067

from compiler-rt.rs.

japaric avatar japaric commented on July 2, 2024

Oh, that copper; I thought you mean the book. cu needs very little of compiler-rt.rs; I might rewrite the needed intrinsics in Rust so cu can drop its dependency on compiler-rt -- that would make building cu simpler.

from compiler-rt.rs.

thejpster avatar thejpster commented on July 2, 2024

Well I wasn't sure if I even needed compiler-rt.rs

Having said that, I was working through porting Phil Oppermann's bump and heap allocators to my bare metal ARM project this evening and I found I needed __aeabi_memclr4 and __aeabi_memmove. I've diverted them to the rlibc equivalents for now but I think fixing this would be useful.

from compiler-rt.rs.

thejpster avatar thejpster commented on July 2, 2024

This came about because RUST_TARGET_PATH wasn't set, so the build script couldn't actually see my target file, and so it didn't realise this was an os=none build.

from compiler-rt.rs.

japaric avatar japaric commented on July 2, 2024

I found I needed __aeabi_memclr4 and __aeabi_memmove

I'm porting compiler-rt to Rust as part of rust-lang/rust#35437. My work so far is in this repo. I just started but the crate already provides these two symbols. If you want to switch to it, check japaric-archived/cu#37

from compiler-rt.rs.

Related Issues (3)

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.