Skip to content

Add a new --cross-prefix option to configure for pwsh users. - #1273

Open
AraHaan wants to merge 1 commit into
madler:developfrom
AraHaan:patch-1
Open

Add a new --cross-prefix option to configure for pwsh users.#1273
AraHaan wants to merge 1 commit into
madler:developfrom
AraHaan:patch-1

Conversation

@AraHaan

@AraHaan AraHaan commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Added the --cross-prefix option into the configure script with comments explaining why.

@madler I am sorry for this PR but I needed this option to properly build a static lib for linking into my shared library for x86, x64, arm, and arm64 builds of gcc/g++ using cross-compiler packages.

Sadly since after forever when one needs to install the cross compilers it results in:

  • uninstall of gcc-multilib, normal gcc, and g++
  • install of the cross compiler (since they conflict with gcc-multilib so marks them for removal which breaks normal $CC.
    • This means that once they install a single cross-compiler package they must replace all of the C/C++ compilers with cross-compilers for x86, x64, arm, arm64, longarch64, etc.

The fix:

  • Adding a --cross-prefix option to configure to resolve this issue.

Added the --cross-prefix option into the configure script with comments explaining why.
@mtl1979

mtl1979 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This doesn't work as related variables are already set when command-line options are parsed. This means the variables need to be set again to reflect the changed target architecture.

@AraHaan

AraHaan commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Which is fine as normally I run ./configure again per cross compiler.

@mtl1979

mtl1979 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Which is fine as normally I run ./configure again per cross compiler.

I mean variables AR, RANLIB and NM are still set to host versions of the tools instead of target versions... Although that might make no difference for some targets when the host tools can handle multiple architectures, it is still possible failure point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants