* [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split @ 2023-04-10 8:32 James Hilliard 2023-04-10 16:40 ` Yann E. MORIN 2023-04-11 7:40 ` Arnout Vandecappelle 0 siblings, 2 replies; 6+ messages in thread From: James Hilliard @ 2023-04-10 8:32 UTC (permalink / raw) To: buildroot; +Cc: James Hilliard Set HOST_LDFLAGS RUSTFLAGS via the host-config feature, see: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#host-config We have to enable this nightly feature first using: CARGO_UNSTABLE_HOST_CONFIG="true" Separately set target RUSTFLAGS for the target triple specific env variable. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- Changes v2 -> v3: - rebase Changes v1 -> v2: - add RUSTFLAGS to HOST_PKG_CARGO_ENV --- package/pkg-cargo.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk index 5600c8e97e..264bf5a1ae 100644 --- a/package/pkg-cargo.mk +++ b/package/pkg-cargo.mk @@ -34,7 +34,10 @@ PKG_COMMON_CARGO_ENV = \ # using nighly features on stable releases, i.e features that are not # yet considered stable. # -# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" "enables the nightly +# CARGO_UNSTABLE_HOST_CONFIG="true" enables the host specific +# configuration feature +# +# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" enables the nightly # configuration option target-applies-to-host value to be set # # CARGO_TARGET_APPLIES_TO_HOST="false" is actually setting the value @@ -43,9 +46,11 @@ PKG_COMMON_CARGO_ENV = \ PKG_CARGO_ENV = \ $(PKG_COMMON_CARGO_ENV) \ __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" \ + CARGO_UNSTABLE_HOST_CONFIG="true" \ CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" \ CARGO_TARGET_APPLIES_TO_HOST="false" \ CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" \ + CARGO_HOST_RUSTFLAGS="$(addprefix -C link-args=,$(HOST_LDFLAGS))" \ CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc # @@ -53,7 +58,8 @@ PKG_CARGO_ENV = \ # and should be removed when fixed upstream # ifeq ($(NORMALIZED_ARCH),arm) - PKG_CARGO_ENV += RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" + PKG_CARGO_ENV += \ + CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" endif HOST_PKG_CARGO_ENV = \ -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split 2023-04-10 8:32 [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split James Hilliard @ 2023-04-10 16:40 ` Yann E. MORIN 2023-04-10 19:02 ` Arnout Vandecappelle 2023-04-11 7:40 ` Arnout Vandecappelle 1 sibling, 1 reply; 6+ messages in thread From: Yann E. MORIN @ 2023-04-10 16:40 UTC (permalink / raw) To: James Hilliard; +Cc: buildroot James, all, On 2023-04-10 02:32 -0600, James Hilliard spake thusly: > Set HOST_LDFLAGS RUSTFLAGS via the host-config feature, see: > https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#host-config > > We have to enable this nightly feature first using: > CARGO_UNSTABLE_HOST_CONFIG="true" > > Separately set target RUSTFLAGS for the target triple specific env > variable. > > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> FTR, Arnout did a review of a previous iteration, and proposed a commt log with a lot more details and explanations on the actual reasons why we have to do this change: https://lore.kernel.org/buildroot/0a2e0dd8-b579-644a-9d83-af88e40d40de@mind.be/ Could you please reveview what he wrote, and incorporate that in your commit log (and amend/extend further if needed), and then respin, please? Regards, Yann E. MORIN. > --- > Changes v2 -> v3: > - rebase > Changes v1 -> v2: > - add RUSTFLAGS to HOST_PKG_CARGO_ENV > --- > package/pkg-cargo.mk | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk > index 5600c8e97e..264bf5a1ae 100644 > --- a/package/pkg-cargo.mk > +++ b/package/pkg-cargo.mk > @@ -34,7 +34,10 @@ PKG_COMMON_CARGO_ENV = \ > # using nighly features on stable releases, i.e features that are not > # yet considered stable. > # > -# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" "enables the nightly > +# CARGO_UNSTABLE_HOST_CONFIG="true" enables the host specific > +# configuration feature > +# > +# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" enables the nightly > # configuration option target-applies-to-host value to be set > # > # CARGO_TARGET_APPLIES_TO_HOST="false" is actually setting the value > @@ -43,9 +46,11 @@ PKG_COMMON_CARGO_ENV = \ > PKG_CARGO_ENV = \ > $(PKG_COMMON_CARGO_ENV) \ > __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" \ > + CARGO_UNSTABLE_HOST_CONFIG="true" \ > CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" \ > CARGO_TARGET_APPLIES_TO_HOST="false" \ > CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" \ > + CARGO_HOST_RUSTFLAGS="$(addprefix -C link-args=,$(HOST_LDFLAGS))" \ > CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc > > # > @@ -53,7 +58,8 @@ PKG_CARGO_ENV = \ > # and should be removed when fixed upstream > # > ifeq ($(NORMALIZED_ARCH),arm) > - PKG_CARGO_ENV += RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" > + PKG_CARGO_ENV += \ > + CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" > endif > > HOST_PKG_CARGO_ENV = \ > -- > 2.34.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split 2023-04-10 16:40 ` Yann E. MORIN @ 2023-04-10 19:02 ` Arnout Vandecappelle 2023-04-10 20:19 ` James Hilliard 0 siblings, 1 reply; 6+ messages in thread From: Arnout Vandecappelle @ 2023-04-10 19:02 UTC (permalink / raw) To: Yann E. MORIN, James Hilliard; +Cc: buildroot On 10/04/2023 18:40, Yann E. MORIN wrote: > James, all, > > On 2023-04-10 02:32 -0600, James Hilliard spake thusly: >> Set HOST_LDFLAGS RUSTFLAGS via the host-config feature, see: >> https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#host-config >> >> We have to enable this nightly feature first using: >> CARGO_UNSTABLE_HOST_CONFIG="true" >> >> Separately set target RUSTFLAGS for the target triple specific env >> variable. >> >> Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > > FTR, Arnout did a review of a previous iteration, and proposed a commt > log with a lot more details and explanations on the actual reasons why > we have to do this change: > > https://lore.kernel.org/buildroot/0a2e0dd8-b579-644a-9d83-af88e40d40de@mind.be/ Actually, that was supposed to be a reply to this v3, my bad... @james just confirmation that my proposed commit log is enough, I already have it lined up for pushing. Regards, Arnout > > Could you please reveview what he wrote, and incorporate that in your > commit log (and amend/extend further if needed), and then respin, > please? > > Regards, > Yann E. MORIN. > >> --- >> Changes v2 -> v3: >> - rebase >> Changes v1 -> v2: >> - add RUSTFLAGS to HOST_PKG_CARGO_ENV >> --- >> package/pkg-cargo.mk | 10 ++++++++-- >> 1 file changed, 8 insertions(+), 2 deletions(-) >> >> diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk >> index 5600c8e97e..264bf5a1ae 100644 >> --- a/package/pkg-cargo.mk >> +++ b/package/pkg-cargo.mk >> @@ -34,7 +34,10 @@ PKG_COMMON_CARGO_ENV = \ >> # using nighly features on stable releases, i.e features that are not >> # yet considered stable. >> # >> -# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" "enables the nightly >> +# CARGO_UNSTABLE_HOST_CONFIG="true" enables the host specific >> +# configuration feature >> +# >> +# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" enables the nightly >> # configuration option target-applies-to-host value to be set >> # >> # CARGO_TARGET_APPLIES_TO_HOST="false" is actually setting the value >> @@ -43,9 +46,11 @@ PKG_COMMON_CARGO_ENV = \ >> PKG_CARGO_ENV = \ >> $(PKG_COMMON_CARGO_ENV) \ >> __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" \ >> + CARGO_UNSTABLE_HOST_CONFIG="true" \ >> CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" \ >> CARGO_TARGET_APPLIES_TO_HOST="false" \ >> CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" \ >> + CARGO_HOST_RUSTFLAGS="$(addprefix -C link-args=,$(HOST_LDFLAGS))" \ >> CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc >> >> # >> @@ -53,7 +58,8 @@ PKG_CARGO_ENV = \ >> # and should be removed when fixed upstream >> # >> ifeq ($(NORMALIZED_ARCH),arm) >> - PKG_CARGO_ENV += RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" >> + PKG_CARGO_ENV += \ >> + CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" >> endif >> >> HOST_PKG_CARGO_ENV = \ >> -- >> 2.34.1 >> >> _______________________________________________ >> buildroot mailing list >> buildroot@buildroot.org >> https://lists.buildroot.org/mailman/listinfo/buildroot > _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split 2023-04-10 19:02 ` Arnout Vandecappelle @ 2023-04-10 20:19 ` James Hilliard 0 siblings, 0 replies; 6+ messages in thread From: James Hilliard @ 2023-04-10 20:19 UTC (permalink / raw) To: Arnout Vandecappelle; +Cc: Yann E. MORIN, buildroot On Mon, Apr 10, 2023 at 1:02 PM Arnout Vandecappelle <arnout@mind.be> wrote: > > > > On 10/04/2023 18:40, Yann E. MORIN wrote: > > James, all, > > > > On 2023-04-10 02:32 -0600, James Hilliard spake thusly: > >> Set HOST_LDFLAGS RUSTFLAGS via the host-config feature, see: > >> https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#host-config > >> > >> We have to enable this nightly feature first using: > >> CARGO_UNSTABLE_HOST_CONFIG="true" > >> > >> Separately set target RUSTFLAGS for the target triple specific env > >> variable. > >> > >> Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > > > > FTR, Arnout did a review of a previous iteration, and proposed a commt > > log with a lot more details and explanations on the actual reasons why > > we have to do this change: > > > > https://lore.kernel.org/buildroot/0a2e0dd8-b579-644a-9d83-af88e40d40de@mind.be/ > > Actually, that was supposed to be a reply to this v3, my bad... > > @james just confirmation that my proposed commit log is enough, I already have > it lined up for pushing. Yep, looks good to me. > > Regards, > Arnout > > > > > Could you please reveview what he wrote, and incorporate that in your > > commit log (and amend/extend further if needed), and then respin, > > please? > > > > Regards, > > Yann E. MORIN. > > > >> --- > >> Changes v2 -> v3: > >> - rebase > >> Changes v1 -> v2: > >> - add RUSTFLAGS to HOST_PKG_CARGO_ENV > >> --- > >> package/pkg-cargo.mk | 10 ++++++++-- > >> 1 file changed, 8 insertions(+), 2 deletions(-) > >> > >> diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk > >> index 5600c8e97e..264bf5a1ae 100644 > >> --- a/package/pkg-cargo.mk > >> +++ b/package/pkg-cargo.mk > >> @@ -34,7 +34,10 @@ PKG_COMMON_CARGO_ENV = \ > >> # using nighly features on stable releases, i.e features that are not > >> # yet considered stable. > >> # > >> -# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" "enables the nightly > >> +# CARGO_UNSTABLE_HOST_CONFIG="true" enables the host specific > >> +# configuration feature > >> +# > >> +# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" enables the nightly > >> # configuration option target-applies-to-host value to be set > >> # > >> # CARGO_TARGET_APPLIES_TO_HOST="false" is actually setting the value > >> @@ -43,9 +46,11 @@ PKG_COMMON_CARGO_ENV = \ > >> PKG_CARGO_ENV = \ > >> $(PKG_COMMON_CARGO_ENV) \ > >> __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" \ > >> + CARGO_UNSTABLE_HOST_CONFIG="true" \ > >> CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" \ > >> CARGO_TARGET_APPLIES_TO_HOST="false" \ > >> CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" \ > >> + CARGO_HOST_RUSTFLAGS="$(addprefix -C link-args=,$(HOST_LDFLAGS))" \ > >> CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc > >> > >> # > >> @@ -53,7 +58,8 @@ PKG_CARGO_ENV = \ > >> # and should be removed when fixed upstream > >> # > >> ifeq ($(NORMALIZED_ARCH),arm) > >> - PKG_CARGO_ENV += RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" > >> + PKG_CARGO_ENV += \ > >> + CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" > >> endif > >> > >> HOST_PKG_CARGO_ENV = \ > >> -- > >> 2.34.1 > >> > >> _______________________________________________ > >> buildroot mailing list > >> buildroot@buildroot.org > >> https://lists.buildroot.org/mailman/listinfo/buildroot > > _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split 2023-04-10 8:32 [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split James Hilliard 2023-04-10 16:40 ` Yann E. MORIN @ 2023-04-11 7:40 ` Arnout Vandecappelle 2023-04-23 9:04 ` Peter Korsgaard 1 sibling, 1 reply; 6+ messages in thread From: Arnout Vandecappelle @ 2023-04-11 7:40 UTC (permalink / raw) To: James Hilliard, buildroot On 10/04/2023 10:32, James Hilliard wrote: > Set HOST_LDFLAGS RUSTFLAGS via the host-config feature, see: > https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#host-config > > We have to enable this nightly feature first using: > CARGO_UNSTABLE_HOST_CONFIG="true" > > Separately set target RUSTFLAGS for the target triple specific env > variable. > > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Applied to master after a complete rewrite of the commit message, thanks. Regards, Arnout > --- > Changes v2 -> v3: > - rebase > Changes v1 -> v2: > - add RUSTFLAGS to HOST_PKG_CARGO_ENV > --- > package/pkg-cargo.mk | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk > index 5600c8e97e..264bf5a1ae 100644 > --- a/package/pkg-cargo.mk > +++ b/package/pkg-cargo.mk > @@ -34,7 +34,10 @@ PKG_COMMON_CARGO_ENV = \ > # using nighly features on stable releases, i.e features that are not > # yet considered stable. > # > -# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" "enables the nightly > +# CARGO_UNSTABLE_HOST_CONFIG="true" enables the host specific > +# configuration feature > +# > +# CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" enables the nightly > # configuration option target-applies-to-host value to be set > # > # CARGO_TARGET_APPLIES_TO_HOST="false" is actually setting the value > @@ -43,9 +46,11 @@ PKG_COMMON_CARGO_ENV = \ > PKG_CARGO_ENV = \ > $(PKG_COMMON_CARGO_ENV) \ > __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" \ > + CARGO_UNSTABLE_HOST_CONFIG="true" \ > CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST="true" \ > CARGO_TARGET_APPLIES_TO_HOST="false" \ > CARGO_BUILD_TARGET="$(RUSTC_TARGET_NAME)" \ > + CARGO_HOST_RUSTFLAGS="$(addprefix -C link-args=,$(HOST_LDFLAGS))" \ > CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_LINKER=$(notdir $(TARGET_CROSS))gcc > > # > @@ -53,7 +58,8 @@ PKG_CARGO_ENV = \ > # and should be removed when fixed upstream > # > ifeq ($(NORMALIZED_ARCH),arm) > - PKG_CARGO_ENV += RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" > + PKG_CARGO_ENV += \ > + CARGO_TARGET_$(call UPPERCASE,$(RUSTC_TARGET_NAME))_RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" > endif > > HOST_PKG_CARGO_ENV = \ _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split 2023-04-11 7:40 ` Arnout Vandecappelle @ 2023-04-23 9:04 ` Peter Korsgaard 0 siblings, 0 replies; 6+ messages in thread From: Peter Korsgaard @ 2023-04-23 9:04 UTC (permalink / raw) To: Arnout Vandecappelle; +Cc: James Hilliard, buildroot >>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: > On 10/04/2023 10:32, James Hilliard wrote: >> Set HOST_LDFLAGS RUSTFLAGS via the host-config feature, see: >> https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#host-config >> We have to enable this nightly feature first using: >> CARGO_UNSTABLE_HOST_CONFIG="true" >> Separately set target RUSTFLAGS for the target triple specific env >> variable. >> Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > Applied to master after a complete rewrite of the commit message, thanks. Committed to 2023.02.x, thanks. -- Bye, Peter Korsgaard _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-23 9:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-04-10 8:32 [Buildroot] [PATCH v3 1/1] package/pkg-cargo: ensure host/target rustflags are properly split James Hilliard 2023-04-10 16:40 ` Yann E. MORIN 2023-04-10 19:02 ` Arnout Vandecappelle 2023-04-10 20:19 ` James Hilliard 2023-04-11 7:40 ` Arnout Vandecappelle 2023-04-23 9:04 ` Peter Korsgaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox