[haiku-commits] r37560 - haiku/trunk/data/bin

  • From: mattmadia@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 18 Jul 2010 04:12:16 +0200 (CEST)

Author: mmadia
Date: 2010-07-18 04:12:16 +0200 (Sun, 18 Jul 2010)
New Revision: 37560
Changeset: http://dev.haiku-os.org/changeset/37560

Modified:
   haiku/trunk/data/bin/installoptionalpackage
Log:
Added a small sanity check for improperly built images.
Added a TODO about creating the symlinks for gcc-agnostic packages.


Modified: haiku/trunk/data/bin/installoptionalpackage
===================================================================
--- haiku/trunk/data/bin/installoptionalpackage 2010-07-18 01:35:45 UTC (rev 
37559)
+++ haiku/trunk/data/bin/installoptionalpackage 2010-07-18 02:12:16 UTC (rev 
37560)
@@ -134,6 +134,9 @@
 function InstallOptionalHaikuImagePackage()
 {
        # InstallOptionalHaikuImagePackage package : url : dirTokens : 
isCDPackage
+       #       : isGCCAgnostic
+       # TODO add support for isGCCAgnostic
+
        # Wrapper for Jam rule
        echo "Installing \$1 ..."
        cd \$tmpDir
@@ -384,24 +387,31 @@
 
 function DetectSystemConfiguration()
 {
-       # Determine which GCC we're running and if we're a hybrid
-       if [ -d "$libDir"/gcc4 ] ; then
+
+       # Determine which GCC we're running
+       if [ -f "$libDir"/libsupc++.so ] ; then
+               HAIKU_GCC_VERSION[1]=4
+       else
                HAIKU_GCC_VERSION[1]=2
+       fi
+
+       # Test for hybrid
+       if [ -d "$libDir"/gcc4 -a -d "$libDir"/gcc2 ]; then
+               echo "Sorry, but your build appears to be broken ..."
+               echo "Both gcc2 and gcc4 subdirs exist."
+               exit 1
+       elif [ -d "$libDir"/gcc4 -o -d "$libDir"/gcc2 ]; then
                isHybridBuild=1
-       elif [ -d "$libDir"/gcc2 ] ; then
-               HAIKU_GCC_VERSION[1]=4
-               isHybridBuild=1
-       elif [ -f "$libDir"/libsupc++.so ] ; then
-               HAIKU_GCC_VERSION[1]=4
-               isHybridBuild=""
        else
-               HAIKU_GCC_VERSION[1]=2
                isHybridBuild=""
        fi
 
        # Determine the Architecture.
        if [ `uname -m` == "BePC" ] ; then
                TARGET_ARCH='x86'
+       else
+               echo "Sorry, x86 only for now."
+               exit 1
        fi
 }
 


Other related posts:

  • » [haiku-commits] r37560 - haiku/trunk/data/bin - mattmadia