Created
March 4, 2015 23:53
-
-
Save amadio/25f788949f5202ee2c6c to your computer and use it in GitHub Desktop.
Simple script to cross-compile stuff for the Xeon Phi in a prefix
This file contains 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 | |
MICDIR=${HOME}/mic | |
# must copy MIC libs to ${MICDIR}/opt/intel/lib | |
LIBFLAGS="-L${MICDIR}/opt/intel/lib -L${MICDIR}/usr/lib" | |
FEATURES='-news -binchecks' ROOT=/ EPREFIX=${MICDIR} \ | |
CC=icc CXX=icpc MPI_C=mpiicc MPI_CXX=mpiicpc LD=xild AR=xiar \ | |
CPPFLAGS="-I${MICDIR}/usr/include" \ | |
CFLAGS="-mmic -fPIC -I${MICDIR}/usr/include" \ | |
CXXFLAGS="-mmic -fPIC -I${MICDIR}/usr/include" \ | |
FFLAGS="-mmic -fPIC -I${MICDIR}/usr/include" \ | |
LDFLAGS="${LIBFLAGS} -Wl,--rpath,${MICDIR}/opt/intel/lib -Wl,--rpath,${MICDIR}/usr/lib" \ | |
CBUILD=x86_64-pc-linux-gnu \ | |
CHOST=x86_64-k1om-linux-gnu \ | |
CTARGET=x86_64-k1om-linux-gnu emerge $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment