Ignore:
Timestamp:
06/12/17 17:12:06 (3 years ago)
Author:
ak19
Message:

Developers' GS2 compile bash script now adds -fPIC to CFLAGS on unix. Else it's easy to forget to add manually to the unix env, and wastes time when compiling GS2. Untested on Macs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/makegs2.sh

    r28513 r31732  
    88gsdlhome=`pwd`
    99echo "**** GSDLHOME: $gsdlhome"
     10
     11bitness=`uname -m`
     12# if we're 64 bit, add -fPIC to CFLAGS. Check if bitness contains substring "64"
     13if [[ $bitness == *"64"* ]]; then
     14  export CFLAGS="-fPIC $CFLAGS"
     15  echo "64 bit unix system, incl -fPIC in CFLAGS so it is now: $CFLAGS"
     16fi
    1017
    1118# Compile by chaining the commands with && so it stops at that stage after an error
     
    3643    echo "@@@ Error compiling up Greenstone. Return status: $status"
    3744fi
     45if [[ $bitness == *"64"* ]]; then
     46    echo ""
     47    echo "This unix is 64 bit. So added -fPIC to CFLAGS, which is now: $CFLAGS"
     48fi
    3849echo "****************************************"   
    3950
Note: See TracChangeset for help on using the changeset viewer.