Commit e670c6d6 authored by claes's avatar claes

pwra_env.sh 'set base' cross compilation bugfix

parent 8a293c33
......@@ -28,7 +28,7 @@ pwra_set_func()
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
echo "Base $baseroot doesn't exist"
else
elif [ "$3" != "cross" ]; then
if [ ! -e $baseroot/$os/$hw/exp/exe/pwrp_env.sh ]; then
echo "Not a base directory: $baseroot"
return
......
......@@ -28,7 +28,7 @@ pwra_set_func()
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
echo "Base $baseroot doesn't exist"
else
elif [ "$3" != "cross" ]; then
if [ ! -e $baseroot/$os/$hw/exp/exe/pwrp_env.sh ]; then
echo "Not a base directory: $baseroot"
return
......@@ -116,14 +116,21 @@ EOF
pwra_parse ()
{
unamestr=`eval uname`
machine=`eval uname -m`
if [ "$machine" != "x86_64" ]; then
machine="x86"
if [ $unamestr == "Darwin" ]; then
os="os_macos"
hw="hw_x86_64"
elif [ $unamestr == "FreeBSD" ]; then
os="os_freebsd"
hw="hw_x86_64"
else
if [ $machine != "x86_64" ]; then
machine="x86"
fi
os="os_linux"
hw="hw_"$machine
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
#mysql_socket="--socket /var/lib/mysql/mysql.sock"
local cmd
......
......@@ -28,7 +28,7 @@ pwra_set_func()
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
echo "Base $baseroot doesn't exist"
else
elif [ "$3" != "cross" ]; then
if [ ! -e $baseroot/$os/$hw/exp/exe/pwrp_env.sh ]; then
echo "Not a base directory: $baseroot"
return
......@@ -116,14 +116,21 @@ EOF
pwra_parse ()
{
unamestr=`eval uname`
machine=`eval uname -m`
if [ "$machine" != "x86_64" ]; then
machine="x86"
if [ $unamestr == "Darwin" ]; then
os="os_macos"
hw="hw_x86_64"
elif [ $unamestr == "FreeBSD" ]; then
os="os_freebsd"
hw="hw_x86_64"
else
if [ $machine != "x86_64" ]; then
machine="x86"
fi
os="os_linux"
hw="hw_"$machine
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
#mysql_socket="--socket /var/lib/mysql/mysql.sock"
local cmd
......
......@@ -28,7 +28,7 @@ pwra_set_func()
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
echo "Base $baseroot doesn't exist"
else
elif [ "$3" != "cross" ]; then
if [ ! -e $baseroot/$os/$hw/exp/exe/pwrp_env.sh ]; then
echo "Not a base directory: $baseroot"
return
......
......@@ -28,7 +28,7 @@ pwra_set_func()
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
echo "Base $baseroot doesn't exist"
else
elif [ "$3" != "cross" ]; then
if [ ! -e $baseroot/$os/$hw/exp/exe/pwrp_env.sh ]; then
echo "Not a base directory: $baseroot"
return
......@@ -116,14 +116,21 @@ EOF
pwra_parse ()
{
unamestr=`eval uname`
machine=`eval uname -m`
if [ "$machine" != "x86_64" ]; then
machine="x86"
if [ $unamestr == "Darwin" ]; then
os="os_macos"
hw="hw_x86_64"
elif [ $unamestr == "FreeBSD" ]; then
os="os_freebsd"
hw="hw_x86_64"
else
if [ $machine != "x86_64" ]; then
machine="x86"
fi
os="os_linux"
hw="hw_"$machine
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
#mysql_socket="--socket /var/lib/mysql/mysql.sock"
local cmd
......
......@@ -2607,7 +2607,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
fprintf( fp, "let OpSys_ARM_LINUX=256\n\n");
if ( strcmp( release, "") != 0)
fprintf( fp, "source $pwra_db/pwra_env.sh set base %s\n\n", release);
fprintf( fp, "source $pwra_db/pwra_env.sh set base %s cross\n\n", release);
if ( strcmp( cc, "") != 0) {
fprintf( fp, "export pwre_cc=%s\n", cc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment