Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

error during compilation if two copies of cortex-m-rt are being linked #106

Merged
merged 1 commit into from
Sep 6, 2018

Conversation

japaric
Copy link
Member

@japaric japaric commented Sep 6, 2018

linking two copies into the final binary produces a confusing linker error
message. This improves the situation by producing an error at compile time.

This will have to be backported into the v0.5.x series or you won't get the new
error message.

r? @rust-embedded/cortex-m (anyone)

linking two copies into the final binary produces a confusing linker error
message. This improves the situation by producing an error at compile time.

This will have to be backported into the v0.5.x series or you won't get the new
error message.
@japaric japaric requested a review from a team as a code owner September 6, 2018 20:42
@adamgreig
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Sep 6, 2018
106: error during compilation if two copies of cortex-m-rt are being linked r=adamgreig a=japaric

linking two copies into the final binary produces a confusing linker error
message. This improves the situation by producing an error at compile time.

This will have to be backported into the v0.5.x series or you won't get the new
error message.

r? @rust-embedded/cortex-m (anyone)

Co-authored-by: Jorge Aparicio <[email protected]>
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
name = "cortex-m-rt"
readme = "README.md"
repository = "https://github.com/japaric/cortex-m-rt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be changed to https://github.com/rust-embedded/cortex-m-rt at some point?

@therealprof
Copy link
Contributor

I've a feeling we're going to bump the version at least one more time today. Maybe be careful with single change version bumps? ;)

@bors
Copy link
Contributor

bors bot commented Sep 6, 2018

Build succeeded

@bors bors bot merged commit dae63ef into master Sep 6, 2018
@bors bors bot deleted the link-once branch September 6, 2018 20:53
@japaric
Copy link
Member Author

japaric commented Sep 6, 2018

@japaric
Copy link
Member Author

japaric commented Sep 7, 2018

Thinking more about it: v0.6.x still uses the same symbols and linker sections as v0.5.x so instead of making it an error to use both we could use the semver-trick to make them work together (i.e. having both minor versions in the dependency graph doesn't cause any error). I'll try that and see if it works ...

@japaric
Copy link
Member Author

japaric commented Sep 7, 2018

I'll try that and see if it works ...

After a few failed attempts I got this working. The problem is that if I make the release right now existing code that's using v0.5.x will start compiling v0.6.x and they may run into #105. #105 will need to be fixed before I release v0.5.7.

@japaric
Copy link
Member Author

japaric commented Sep 8, 2018

Published: https://crates.io/crates/cortex-m-rt/0.5.7 which is compatible with v0.6.x

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants