Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2629

Show
Ignore:
Timestamp:
10/05/07 05:40:22 (1 year ago)
Author:
larsivi
Message:

Added workaround check for bug in DMD 1.020 and 1.021, closes #561

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/build-tango.sh

    r2591 r2629  
    2929 
    3030UNAME=`uname` 
     31INLINE="-inline" 
     32DMDVERSION= 
     33 
     34# Various functions to workaround bugs in the compilers 
     35dmdversion() { 
     36    DMDVERSION=`$DC | head -1 | cut -c 26-` 
     37    echo ">> Using $DMDVERSION" 
     38} 
     39 
     40dmdbugs() { 
     41    dmdversion 
     42    if [ "$DMDVERSION" = "1.020" -o "$DMDVERSION" = "1.021" ] 
     43    then 
     44        INLINE=""     
     45        echo ">> Removing -inline due to bugzilla 668" 
     46    fi 
     47} 
     48 
     49compilerbugs() { 
     50    echo ">> Checking compiler version $DC"  
     51    if [ "$DC" = "dmd" ] 
     52    then 
     53        dmdbugs 
     54    fi 
     55} 
    3156 
    3257# This filter can probably be improved quite a bit, but should work 
     
    6893    if filter $OBJNAME 
    6994    then 
    70         $DC -c -v1 -inline -release -O -version=Posix -version=Tango -of$OBJNAME $FILENAME 
     95        $DC -c -v1 $INLINE -release -O -version=Posix -version=Tango -of$OBJNAME $FILENAME 
    7196        ar -r lib/$LIB $OBJNAME 2>&1 | grep -v "ranlib: .* has no symbols" 
    7297        rm $OBJNAME 
     
    84109        return 
    85110    fi 
     111 
     112    # Check if the compiler used has known bugs 
     113    compilerbugs 
    86114 
    87115    if [ ! -e "$3" ]