Ignore:
Timestamp:
05/03/2006 10:03:58 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
b414549
Parents:
65d83a6
Message:

POC for optimizations code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    r65d83a6 r17c7894  
    199199
    200200
    201 
    202 
    203201#----------------------------------#
    204202wrt_target() {                     # Create target and initialize log file
     
    260258
    261259
    262 
    263260#----------------------------------#
    264261wrt_target_vars() {                # Target vars for hlfs (cross-build method)
     
    271268) >> $MKFILE.tmp
    272269
     270}
     271
     272
     273#----------------------------------#
     274wrt_optimize() {                   # Apply pkg specific opt's to build
     275#----------------------------------#
     276  local pkg=$1
     277  local optLvl optVal OPT_VAR
     278
     279  optLvl=`awk -v pkg="$pkg" '$1 == pkg { print $2 }' $JHALFSDIR/opt_override`
     280  if [[ "$optLvl" = "" ]] ; then
     281    optLvl=$DEF_OPT_LVL;
     282  fi
     283
     284  for OPT_VAR in CFLAGS CXXFLAGS LDFLAGS; do
     285    eval optVal=\$${OPT_VAR}_$optLvl
     286
     287    if [[ "$optVal" != "unset" ]]; then
     288     case $pkg in
     289       *zlib* ) [[ "$OPT_VAR" != "LDFLAGS" ]] && optVal="$optVal -fPIC" ;;
     290     esac
     291(
     292cat << EOF
     293        @echo "export $OPT_VAR=\"$optVal\"" >> envars
     294EOF
     295) >> $MKFILE.tmp
     296    else
     297      continue
     298    fi
     299  done
    273300}
    274301
Note: See TracChangeset for help on using the changeset viewer.