How to set Architecture for docker build to arm64?

For building single docker images: Set your environment variable using the command line or modifying your .bashrc or .zshenv file. (introduced in v19.03.0 in 03/2019) export DOCKER_DEFAULT_PLATFORM=linux/arm64 Alternatively, in the Dockerfile, include the following flag in the FROM command (for a multi-stage Dockerfile build, the flag is only needed for the first stage): FROM –platform=linux/arm64 … Read more

Golang: How to cross compile on Linux for Windows

To build from Linux to Windows, you need to set the environment variables GOOS to Windows and GOARCH to amd64. On Bash or ZSH: % GOOS=windows GOARCH=amd64 go build For more details see: https://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5 A description of possible values for GOOS and GOARCH is available here: https://golang.org/doc/install/source#environment If your package requires CGO then you need … Read more

How do I use custom assembler for clang?

try passing the –host option to configure which will cause all the cc ar etc utilities to prefix with armv7l-unknown-linux-gnueabihf- eg: ./configure –host=armv7l-unknown-linux-gnueabihf –build=i686-unknown-linux-gnu Since you are using configure with hopefully autotools take a look at: automake Cross compiling

Cross compiler prefix and path in eclipse

If you are using a Mac, you can select MacOS GCC instead of Cross GCC. If you are on Windows, you will have to install a C++ compiler. I recommend you install Cygwin, try following the directions here. https://www3.ntu.edu.sg/home/ehchua/programming/howto/eclipsecpp_howto.html Once you’ve installed the C++ compiler, restart Eclipse and try to create the project again. Hope … Read more

How do I invoke the MinGW cross-compiler on Linux?

If you look at the file lists on the Ubuntu package webserver for mingw-w64‘s constituent packages: gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-i686-dev You can see that mingw-w64 provides a toolchain, i.e. a set of alternative tools (compiler, linker, headers, etc.) used to compile your code for another system. Assuming you want to compile … Read more

tech