Last active
January 1, 2016 01:39
-
-
Save kuzetsa/8074134 to your computer and use it in GitHub Desktop.
See first comment for usage info.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# kuzetsa's cross-compiler emerge (xmerge) wrapper | |
ARCH=x86 | |
CHOST="i686-pc-mingw32" | |
PORTAGE_TMPDIR="$(portageq envvar PORTAGE_TMPDIR)/${CHOST}" | |
mkdir -p ${PORTAGE_TMPDIR}/portage/ | |
SYSROOT="/usr/${CHOST}/" | |
PORTAGE_CONFIGROOT="${SYSROOT}" | |
ROOT="/balloon/crossdev/BUILD" | |
CBUILD=$(portageq envvar CHOST) | |
export CBUILD PORTAGE_CONFIGROOT ROOT PORTAGE_TMPDIR | |
i686-pc-mingw32-emerge $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change the line:
ROOT="/balloon/crossdev/BUILD"
That is where the packages will get "installed" when built using this wrapper script.
I named this file "xmerge" and keep it in my ~/
Whenever I need to cross compile something (such as windows binary for cgminer)
I just do like this:
~/xmerge cgminer
and that's it. it produces the binaries and all the dlls and such and puts them in:
/balloon/crossdev/BUILD
if you're building for something other than windows (mingw32 target) just be sure to change the lines with
CHOST= ...
as well as the last line which does invokes the cross-emerge itself:
i686-pc-mingw32-emerge $*