Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/c71b1ec91bb4a51e434c323a82bf4fbc046d932a
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/c71b1ec91bb4a51e434c323a82bf4fbc046d932a
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/c71b1ec91bb4a51e434c323a82bf4fbc046d932a

The branch, master has been updated
       via  c71b1ec91bb4a51e434c323a82bf4fbc046d932a (commit)
      from  8f8cda2b48d1063366302204559c1ed3362656bc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=c71b1ec91bb4a51e434c323a82bf4fbc046d932a
commit c71b1ec91bb4a51e434c323a82bf4fbc046d932a
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    add some sanity checking for HOST variable if already set in environment

diff --git a/Docs/env.sh b/Docs/env.sh
index b067da1..6fb009c 100644
--- a/Docs/env.sh
+++ b/Docs/env.sh
@@ -26,6 +26,26 @@ if [ "x${HOST}" = "x" ]; then
     else
        HOST=${TARGET_ABI}
     fi
+else
+    HOST_CC_LIST="${HOST}-cc ${HOST}-gcc 
/opt/netsurf/${HOST}/cross/bin/${HOST}-cc 
/opt/netsurf/${HOST}/cross/bin/${HOST}-gcc"
+    for HOST_CC_V in ${HOST_CC_LIST};do
+       HOST_CC=$(/bin/which ${HOST_CC_V})
+       if [ "x${HOST_CC}" != "x" ];then
+           break
+       fi
+    done
+    if [ "x${HOST_CC}" == "x" ];then
+       echo "Unable to execute host compiler for HOST=${HOST}. is it set 
correctly?"
+       return 1
+    fi
+
+    HOST_CC_MACHINE=$(${HOST_CC} -dumpmachine 2>/dev/null)
+
+    if [ "${HOST_CC_MACHINE}" != "${HOST}" ];then
+       echo "Compiler dumpmachine differes from HOST setting"
+       return 2
+    fi
+    unset HOST_CC_LIST HOST_CC_V HOST_CC HOST_CC_MACHINE
 fi
 
 if [ "x${TARGET_WORKSPACE}" = "x" ]; then


-----------------------------------------------------------------------

Summary of changes:
 Docs/env.sh |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Docs/env.sh b/Docs/env.sh
index b067da1..6fb009c 100644
--- a/Docs/env.sh
+++ b/Docs/env.sh
@@ -26,6 +26,26 @@ if [ "x${HOST}" = "x" ]; then
     else
        HOST=${TARGET_ABI}
     fi
+else
+    HOST_CC_LIST="${HOST}-cc ${HOST}-gcc 
/opt/netsurf/${HOST}/cross/bin/${HOST}-cc 
/opt/netsurf/${HOST}/cross/bin/${HOST}-gcc"
+    for HOST_CC_V in ${HOST_CC_LIST};do
+       HOST_CC=$(/bin/which ${HOST_CC_V})
+       if [ "x${HOST_CC}" != "x" ];then
+           break
+       fi
+    done
+    if [ "x${HOST_CC}" == "x" ];then
+       echo "Unable to execute host compiler for HOST=${HOST}. is it set 
correctly?"
+       return 1
+    fi
+
+    HOST_CC_MACHINE=$(${HOST_CC} -dumpmachine 2>/dev/null)
+
+    if [ "${HOST_CC_MACHINE}" != "${HOST}" ];then
+       echo "Compiler dumpmachine differes from HOST setting"
+       return 2
+    fi
+    unset HOST_CC_LIST HOST_CC_V HOST_CC HOST_CC_MACHINE
 fi
 
 if [ "x${TARGET_WORKSPACE}" = "x" ]; then


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to