Added an optional package DevelopmentPowerPC

* haiku-devlibs-ppc-gcc4 zip archive contains libroot and glue (but no stdc++).
* fixed /boot/develop/lib/$arch symlink to point to the right dir instead of current.
* setgcc now handles the ppc arch and updates the arch link /boot/develop/lib.
This commit is contained in:
Jérôme Duval
2012-03-18 15:36:26 +01:00
parent 026d20288d
commit f659f955ba
3 changed files with 34 additions and 5 deletions
+13 -4
View File
@@ -2,8 +2,9 @@
#
# setgcc [ <arch> ] [ <gcc> ]
abiDir=/boot/develop/abi/
abiDir=/boot/develop/abi
abiLink=$abiDir/current
libDir=/boot/develop/lib
usage()
{
@@ -13,7 +14,7 @@ Usage: $0 [ <arch> ] [ <gcc> ]
Sets the current gcc version, respectively prints it, if no arguments are
given.
<arch> - The architecture to set. Supported values: "x86".
<arch> - The architecture to set. Supported values: "x86", "ppc".
<gcc> - The major gcc version to set. Supported values: "gcc2", "gcc4".
EOF
@@ -46,6 +47,7 @@ while [ $# -gt 0 ]; do
case $1 in
-h,--help) usage; exit;;
x86) arch=$1;;
ppc) arch=$1;;
gcc2|gcc4) gcc=$1;;
*) usage; exit 1;;
esac
@@ -76,8 +78,8 @@ if [ -z "$gcc" ]; then
fi
fi
# check whether the gcc exits
if [ ! -e $abiDir/$arch/$gcc/tools/current/bin/gcc ]; then
# check whether the gcc exists
if [ ! -e $abiDir/$arch/$gcc/tools/current/bin/*gcc ]; then
echo "Can't set GCC $arch/$gcc -- not installed." >&2
exit 1
fi
@@ -87,3 +89,10 @@ fi
echo "Failed to set GCC $arch/$gcc." >&2
exit 1
}
# create the lib symlink
libLink=$libDir/$arch
( rm -f $libLink && ln -sf $abiDir/$arch/$gcc/lib $libLink ) || {
echo "Failed to set lib $arch/$gcc." >&2
exit 1
}