-
Notifications
You must be signed in to change notification settings - Fork 6
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
How to compile a compiler that runs on other architectures #7
Comments
Sorry, the reminder email got lost among many others, and I just noticed it now. To compile the Windows toolchain, you can use the MinGW cross-compiler on Linux to generate a compiler that can run on Windows. First, install the cross-compilation toolchain on Linux, for example, using "apt install g++-mingw-w64-x86-64". Then, add the "--host=mingw" option to your script. If you have any other questions, please feel free to ask again. |
It was great! I managed to implement a cross-compile on Ubuntu 22.04 for Linux, Windows, and macos running on x86 platforms where the target product is x86, which required some modifications to the build python scripts, and I'll be coming up with a pr to use to refine the project later. I am a bit confused though, I found out that the binary distribution has a version of libc called Thank you for your reply and I wish you all the best in your work life! |
Thank you for your contribution to the script. Minilibc is not an open-source project. Its advantage lies in having a relatively compact code, but it also has some drawbacks, such as incomplete support for new language standards like c11. newlib is another bare-metal toolchain that is similar to the minilibc toolchain in functionality, but with better support for language standards. Can it meet your requirements? |
Hi @Cooper-Qu and @HalfSweet I've tried to compile with mingw but I get the error:
when running the command:
Those are all the installed packages in the ubuntu docker container: apt-get install -y autoconf automake autotools-dev nano curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686 Can you give me some instructions on how to compile for mingw host? Thanks a lot |
I want to cross-compile compilers that run on other architectures, currently my environment is Ubuntu on AMD64, can I compile compilers that run on Windows on AMD64 on this?
I tried to change the
--host
parameter in the script, but it doesn't seem to work, the compiled Xuantie-800-gcc-elf-newlib-Win32 is still an executable under LinuxThe text was updated successfully, but these errors were encountered: