diff --git a/support/functions/_profiles b/support/functions/_profiles index 9431d7e..4d5b679 100644 --- a/support/functions/_profiles +++ b/support/functions/_profiles @@ -98,7 +98,7 @@ _tc_info="Native System Compiler \ $(gcc --version)"; _libsearchdir="/lib"; _menuname="native"; -_sysroot="/"; +_sysroot="/usr/include"; EOF cd "$workdir"; }; diff --git a/support/functions/_toolchain b/support/functions/_toolchain index a5f8d3a..372a7a8 100644 --- a/support/functions/_toolchain +++ b/support/functions/_toolchain @@ -157,24 +157,31 @@ _toolchain_check(){ _nl; exit; fi; + + echo -e "$w_l Compiler Info -----> $C$1$w_l\n ====================\n"; + if [ -z "$sysroot" ] && [ ! "$1" == "native" ];then compilername="$_compiler""gcc"; [ ${#_realcompiler} -gt 4 ] && compilername="$_realcompiler"; version=$("./$compilername" -dumpversion); machine=$("./$compilername" -dumpmachine); sr=$("./$compilername" -print-sysroot 2>/dev/null); sysroot=${sr#"$tcdir/$1/bin/../"}; - [ -z "$sysroot" ] && sysroot="$r_l$txt_too_old"; - echo -e "$w_l Compiler Info -----> $C$1$w_l\n ====================\n"; echo -e "$w_l GCC Version :$y_l $version"; echo -e "$w_l GCC Binary :$y_l $machine""-gcc"; + sysroot="$r_l$txt_too_old"; echo -e "$w_l GCC Sysroot :$y_l $sysroot"; cd "$sr"; for e in "${headervars[@]}";do temp=$(find * |grep -m1 "$e"); [ ${#temp} -gt 8 ] && echo -e "$w_l Header File :$y_l $e$g_l\t$txt_found" || echo -e "$w_l Header File :$y_l $e$r_l\t($txt_not_found)"; done; + fi + if [ "$1" == "native" ];then + echo -e "$w_l GCC Version :$y_l $(gcc --version |head -n 1 )"; + echo -e "$w_l GCC Binary :$y_l $(gcc -dumpmachine )"; + fi echo -e "\n$w_l Sysroot config ----> $C$_sysroot$w_l\n ====================\n"; - cd "$tcdir/$1/$_sysroot"; + [ "$1" == "native" ] && cd "$_sysroot" || cd "$tcdir/$1/$_sysroot"; for e in "${headervars[@]}";do temp=$(find * |grep -m1 "$e"); [ ${#temp} -gt 8 ] && echo -e "$w_l Header File :$y_l $e$g_l\t$txt_found" || echo -e "$w_l Header File :$y_l $e$r_l\t($txt_not_found)";