Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygwin mingw cross compiler worked #1054

Open
jpgpng opened this issue Sep 6, 2022 · 6 comments
Open

Cygwin mingw cross compiler worked #1054

jpgpng opened this issue Sep 6, 2022 · 6 comments

Comments

@jpgpng
Copy link

jpgpng commented Sep 6, 2022

Cygwin's cmake is the one faulty here. So, just don't use it. This means don't use the Cygwin shell altogether. We will use the setup like #1049 except instead of the mingw64 bin directory, we add the Cygwin's bin directory to Windows PATH.

The external cmake will have problem detecting the C and C++ compilers from Cygwin. So we help it by specifying these environment variables (we are using Windows' Command Prompt here):

set CC=x86_64-w64-mingw32-gcc
set CXX=x86_64-w64-mingw32-g++

The rest is the same as #1049

@VictorMiasnikov
Copy link
Contributor

VictorMiasnikov commented Sep 6, 2022

Cygwin's cmake is the one faulty here. So, just don't use it. This means don't use the Cygwin shell altogether. We will use the setup like #1049 except instead of the mingw64 bin directory, we add the Cygwin's bin directory to Windows PATH.

The external cmake will have problem detecting the C and C++ compilers from Cygwin. So we help it by specifying these environment variables (we are using Windows' Command Prompt here):

set CC=x86_64-w64-mingw32-gcc
set CXX=x86_64-w64-mingw32-g++

The rest is the same as #1049

This is about cm3 AMD64_MINGW target? But "source pseudo-OS" is "mingw from Cygwin"?

@jpgpng
Copy link
Author

jpgpng commented Sep 6, 2022

This about cm3 AMD64_MINGW target? But "source pseudo-OS" is "mingw from Cygwin"?

Yes. It's a cross compiler, cross compile from Cygwin to mingw.

@VictorMiasnikov
Copy link
Contributor

VictorMiasnikov commented Sep 6, 2022 via email

@jpgpng
Copy link
Author

jpgpng commented Sep 8, 2022

I just find out that it's using Cygwin's native binutils but not the cross compiler's binutils. I have no idea why this hackish setup worked. It could be the two binutils are not very different from each other.

@VictorMiasnikov
Copy link
Contributor

I reopen Issues N1052. I will add Mini-HowTo to it.

@VictorMiasnikov
Copy link
Contributor

Please, see cm3 AMD64_CYGWIN mini-HowTo #1052 (comment)

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

No branches or pull requests

2 participants