Просмотр исходного кода

Add --with-mic-params and --with-host-param parameters to mic-configure

Samuel Thibault лет назад: 9
Родитель
Сommit
fefd03500d
2 измененных файлов с 14 добавлено и 3 удалено
  1. 4 1
      doc/doxygen/chapters/18mic_scc_support.doxy
  2. 10 2
      mic-configure

+ 4 - 1
doc/doxygen/chapters/18mic_scc_support.doxy

@@ -18,7 +18,10 @@ cross-compilation toolchain, for instance <c>/usr/linux-k1om-4.7/bin</c>
 The script <c>mic-configure</c> can then be used to achieve the two compilations: it basically
 calls <c>configure</c> as appropriate from two new directories: <c>build_mic</c> and
 <c>build_host</c>. <c>make</c> and <c>make install</c> can then be used as usual and will
-recurse into both directories.
+recurse into both directories. If different configuration options are needed
+for the host and for the mic, one can use <c>--with-host-param=--with-fxt</b>
+for instance to specify the <c>--with-fxt</c> option for the host only, or
+<c>--with-mic-param=--with-fxt</b> for the mic only.
 
 \section PortingApplicationsToMICSCC Porting Applications To MIC Xeon Phi / SCC
 

+ 10 - 2
mic-configure

@@ -12,6 +12,8 @@ prefix="/usr/local"
 coi_dir="/opt/intel/mic/coi"
 scif_dir="/opt/intel/mic/scif"
 mic_host="x86_64-k1om-linux"
+host_params=""
+mic_params=""
 native_mic=0
 for arg in $*
 do
@@ -31,6 +33,12 @@ do
 	        --enable-native-mic)
 		        native_mic=1
 		        ;;
+		--with-mic-param=*)
+			mic_params="$mic_params ${arg#--with-mic-param=}"
+			;;
+		--with-host-param=*)
+			host_params="$host_params ${arg#--with-host-param=}"
+			;;
 	esac
 done
 
@@ -102,9 +110,9 @@ do
 		C_INCLUDE_PATH=$SINK_C_INCLUDE_PATH \
 		CPLUS_INCLUDE_PATH=$SINK_CPLUS_INCLUDE_PATH \
 		PKG_CONFIG_PATH=$SINK_PKG_CONFIG_PATH \
-		$command $* $params
+		$command $* $params $mic_params
 	else
-		$command $* $params
+		$command $* $params $host_params
 	fi
 	if [ "$?" != 0 ]
 	then