Skip to content

Conversation

@jyn514
Copy link
Contributor

@jyn514 jyn514 commented Dec 12, 2025

Fixes #1618.

Additionally fixes the behavior when invoked with 0 arguments:
${@} is a single word, regardless of how many arguments were passed to
the program. To expand it as an array, it must be $@.
See https://www.gnu.org/software/bash/manual/html_node/Shell-Expansions.html.

docker/musl-gcc.sh: line 73: @: unbound variable
docker/freebsd-gcc.sh: line 16: @: unbound variable

These are used very far down in the toolchain, where output is
unexpected and often noisy due to how often these tools are invoked.
Avoid printing unnecessary info.
`${@}` is a single word, regardless of how many arguments were passed to
the program. To expand it as an array, it must be `$@`.
See https://www.gnu.org/software/bash/manual/html_node/Shell-Expansions.html.

Fixes the following errors when invoked with 0 arguments:
```
docker/musl-gcc.sh: line 73: @: unbound variable
docker/freebsd-gcc.sh: line 16: @: unbound variable
```
@jyn514 jyn514 requested a review from a team as a code owner December 12, 2025 18:50
@jyn514
Copy link
Contributor Author

jyn514 commented Dec 12, 2025

I do want to note that the bug that musl-gcc exists to workaround was fixed in 1.65, which was released in November 2022, more than three years ago.

@Emilgardis Emilgardis added the no-ci-targets PRs that do not affect or should skip any cross-compilation targets. label Dec 12, 2025
Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

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

let's merge this even though it's not required for newer versions :)

thank you!

@Emilgardis Emilgardis enabled auto-merge December 12, 2025 18:55
@Emilgardis Emilgardis added this pull request to the merge queue Dec 12, 2025
Merged via the queue into cross-rs:main with commit 72664dd Dec 12, 2025
20 checks passed
@jyn514
Copy link
Contributor Author

jyn514 commented Dec 12, 2025

thanks for the review! i'm hoping this in combination with a few other changes will let me turn rust-lang/rust#136096 back on in a release or two :)

@jyn514 jyn514 deleted the gcc-wrappers branch December 12, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-ci-targets PRs that do not affect or should skip any cross-compilation targets.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linker wrapper script for musl outputs garbage due to set -x

2 participants