Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

Location:
EcnlProtoTool/trunk/tcc-0.9.27
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/tcc-0.9.27/configure

    r279 r331  
    1818
    1919# default parameters
    20 build_cross="no"
    21 use_libgcc="no"
    2220prefix=""
    2321execprefix=""
     
    3129cross_prefix=""
    3230cc="gcc"
    33 host_cc="gcc"
    3431ar="ar"
    3532strip="strip"
    36 cygwin="no"
    37 gprof="no"
    3833bigendian="no"
    3934mingw32="no"
    4035LIBSUF=".a"
    4136EXESUF=""
     37DLLSUF=".so"
    4238tcc_sysincludepaths=""
    4339tcc_libpaths=""
    4440tcc_crtprefix=""
    4541tcc_elfinterp=""
     42triplet=
    4643tcc_lddir=
    4744confvars=
    48 
    49 #cpu=`uname -m`
    50 cpu="armv7a"
     45suggest="yes"
     46cpu=
     47cpuver=
     48gcc_major=0
     49gcc_minor=0
    5150
    5251# OS specific
    53 #targetos=`uname -s`
    54 targetos=""
     52targetos=`uname`
    5553case $targetos in
    56   MINGW32*)  mingw32=yes;;
    57   DragonFly) noldl=yes;;
    58   OpenBSD)   noldl=yes;;
    59   *) ;;
     54  Darwin)
     55    confvars="$confvars OSX"
     56    DLLSUF=".dylib"
     57    ;;
     58  MINGW*|MSYS*|CYGWIN*)
     59    mingw32=yes
     60    ;;
     61  DragonFly|OpenBSD|FreeBSD|NetBSD)
     62    confvars="$confvars ldl=no"
     63    ;;
     64  *)
     65    ;;
    6066esac
    6167
    6268# find source path
    63 # XXX: we assume an absolute path is given when launching configure,
    64 # except in './configure' case.
    6569source_path=${0%configure}
    6670source_path=${source_path%/}
     
    7175fi
    7276
    73 case "$cpu" in
    74   i386|i486|i586|i686|i86pc|BePC|i686-AT386)
    75     cpu="x86"
    76   ;;
    77   x86_64)
    78     cpu="x86-64"
    79   ;;
    80   arm*)
    81     case "$cpu" in
    82       arm|armv4l)
    83         cpuver=4
    84       ;;
    85       armv5tel|armv5tejl)
    86         cpuver=5
    87       ;;
    88       armv6j|armv6l)
    89         cpuver=6
    90       ;;
    91       armv7a|armv7l)
    92         cpuver=7
    93       ;;
    94     esac
    95     cpu="armv4l"
    96   ;;
    97   alpha)
    98     cpu="alpha"
    99   ;;
    100   "Power Macintosh"|ppc|ppc64)
    101     cpu="powerpc"
    102   ;;
    103   mips)
    104     cpu="mips"
    105   ;;
    106   s390)
    107     cpu="s390"
    108   ;;
    109   *)
    110     cpu="unknown"
    111   ;;
    112 esac
    113 
    11477for opt do
    11578  eval opt=\"$opt\"
     
    143106  --cc=*) cc=`echo $opt | cut -d '=' -f 2`
    144107  ;;
     108  --ar=*) ar=`echo $opt | cut -d '=' -f 2`
     109  ;;
    145110  --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
    146111  ;;
    147112  --extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}"
    148113  ;;
    149   --extra-libs=*) extralibs=${opt#--extra-libs=}
     114  --extra-libs=*) extralibs="${opt#--extra-libs=}"
    150115  ;;
    151116  --sysincludepaths=*) tcc_sysincludepaths=`echo $opt | cut -d '=' -f 2`
     
    157122  --elfinterp=*) tcc_elfinterp=`echo $opt | cut -d '=' -f 2`
    158123  ;;
     124  --triplet=*) triplet=`echo $opt | cut -d '=' -f 2`
     125  ;;
    159126  --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
    160127  ;;
    161   --enable-gprof) gprof="yes"
    162   ;;
    163   --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
    164   ;;
    165   --enable-cygwin) mingw32="yes" ; cygwin="yes" ; cross_prefix="mingw32-" ; cpu=x86
    166   ;;
    167   --enable-cross) build_cross="yes"
    168   ;;
    169   --disable-static) disable_static="yes"
    170   ;;
    171   --disable-rpath) disable_rpath="yes"
    172   ;;
    173   --strip-binaries) strip_binaries="yes"
    174   ;;
    175   --with-libgcc) use_libgcc="yes"
    176   ;;
    177   --with-selinux) have_selinux="yes"
     128  --enable-cross) confvars="$confvars cross"
     129  ;;
     130  --disable-static) confvars="$confvars static=no"
     131  ;;
     132  --enable-static) confvars="$confvars static"
     133  ;;
     134  --disable-rpath) confvars="$confvars rpath=no"
     135  ;;
     136  --strip-binaries) confvars="$confvars strip"
     137  ;;
     138  --with-libgcc) confvars="$confvars libgcc"
     139  ;;
     140  --with-selinux) confvars="$confvars selinux"
     141  ;;
     142  --config-mingw32*) mingw32=$(echo "$opt=yes" | cut -d '=' -f 2)
     143  ;;
     144  --config-*) confvars="$confvars ${opt#--config-}"; suggest="no"
    178145  ;;
    179146  --help|-h) show_help="yes"
     
    183150  esac
    184151done
     152
     153if test -z "$cpu" ; then
     154    if test -n "$ARCH" ; then
     155        cpu="$ARCH"
     156    else
     157        cpu=`uname -m`
     158    fi
     159fi
     160
     161case "$cpu" in
     162  x86|i386|i486|i586|i686|i86pc|BePC|i686-AT386)
     163    cpu="i386"
     164  ;;
     165  x86_64|amd64|x86-64)
     166    cpu="x86_64"
     167  ;;
     168  arm*)
     169    case "$cpu" in
     170      arm|armv4l)
     171        cpuver=4
     172      ;;
     173      armv5tel|armv5tejl)
     174        cpuver=5
     175      ;;
     176      armv6j|armv6l)
     177        cpuver=6
     178      ;;
     179      armv7a|armv7l)
     180        cpuver=7
     181      ;;
     182    esac
     183    cpu="arm"
     184  ;;
     185  aarch64)
     186    cpu="aarch64"
     187  ;;
     188  alpha)
     189    cpu="alpha"
     190  ;;
     191  "Power Macintosh"|ppc|ppc64)
     192    cpu="ppc"
     193  ;;
     194  mips)
     195    cpu="mips"
     196  ;;
     197  s390)
     198    cpu="s390"
     199  ;;
     200  *)
     201    echo "Unsupported CPU"
     202    exit 1
     203  ;;
     204esac
    185205
    186206# Checking for CFLAGS
     
    190210
    191211if test "$mingw32" = "yes" ; then
    192     if test x"$tccdir" = x""; then
    193     tccdir="tcc"
    194     fi
    195     if test -z "$prefix" ; then
    196     prefix="C:/Program Files/${tccdir}"
    197     fi
    198     if test -z "$sharedir" ; then
    199     sharedir="${prefix}"
    200     fi
    201     execprefix="$prefix"
    202     bindir="${prefix}"
    203     tccdir="${prefix}"
    204     libdir="${prefix}/lib"
    205     docdir="${sharedir}/doc"
    206     mandir="${sharedir}/man"
    207     infodir="${sharedir}/info"
     212    if test "$source_path_used" = "no"; then
     213      source_path="."
     214    fi
     215    if test "$cc" = gcc; then
     216      test -z "$LDFLAGS" && LDFLAGS="-static"
     217    fi
     218    test -z "$prefix" && prefix="C:/Program Files/tcc"
     219    test -z "$tccdir" && tccdir="${prefix}"
     220    test -z "$bindir" && bindir="${tccdir}"
     221    test -z "$docdir" && docdir="${tccdir}/doc"
     222    test -z "$libdir" && libdir="${tccdir}/libtcc"
     223    confvars="$confvars WIN32"
    208224    LIBSUF=".lib"
    209225    EXESUF=".exe"
     226    DLLSUF=".dll"
    210227else
    211228    if test -z "$prefix" ; then
    212     prefix="/usr/local"
     229      prefix="/usr/local"
    213230    fi
    214231    if test -z "$sharedir" ; then
    215     sharedir="${prefix}/share"
     232      sharedir="${prefix}/share"
    216233    fi
    217234    if test x"$execprefix" = x""; then
    218     execprefix="${prefix}"
     235      execprefix="${prefix}"
    219236    fi
    220237    if test x"$libdir" = x""; then
    221     libdir="${execprefix}/lib"
     238      libdir="${execprefix}/lib"
    222239    fi
    223240    if test x"$bindir" = x""; then
    224     bindir="${execprefix}/bin"
     241      bindir="${execprefix}/bin"
     242    fi
     243    if test x"$docdir" = x""; then
     244      docdir="${sharedir}/doc"
     245    fi
     246    if test x"$mandir" = x""; then
     247      mandir="${sharedir}/man"
     248    fi
     249    if test x"$infodir" = x""; then
     250      infodir="${sharedir}/info"
    225251    fi
    226252    if test x"$tccdir" = x""; then
    227     tccdir="tcc"
    228     fi
    229     if test x"$docdir" = x""; then
    230     docdir="${sharedir}/doc/${tccdir}"
    231     fi
    232     if test x"$mandir" = x""; then
    233     mandir="${sharedir}/man"
    234     fi
    235     if test x"$infodir" = x""; then
    236     infodir="${sharedir}/info"
    237     fi
    238     tccdir="${libdir}/${tccdir}"
     253      tccdir="${libdir}/tcc"
     254    fi
     255    if test x"$includedir" = x""; then
     256      includedir="${prefix}/include"
     257    fi
    239258fi # mingw32
    240 
    241 if test x"$includedir" = x""; then
    242 includedir="${prefix}/include"
    243 fi
    244259
    245260if test x"$show_help" = "xyes" ; then
     
    252267  --prefix=PREFIX          install in PREFIX [$prefix]
    253268  --exec-prefix=EPREFIX    install architecture-dependent files in EPREFIX
    254                            [same as prefix]
     269                           [same as prefix]
    255270  --bindir=DIR             user executables in DIR [EPREFIX/bin]
    256271  --libdir=DIR             object code libraries in DIR [EPREFIX/lib]
     
    267282  --sysroot=PREFIX         prepend PREFIX to library/include paths []
    268283  --cc=CC                  use C compiler CC [$cc]
     284  --ar=AR                  create archives using AR [$ar]
    269285  --extra-cflags=          specify compiler flags [$CFLAGS]
    270286  --extra-ldflags=         specify linker options []
     287  --cpu=CPU                CPU [$cpu]
    271288  --strip-binaries         strip symbol tables from resulting binaries
    272289  --disable-static         make libtcc.so instead of libtcc.a
     290  --enable-static          make libtcc.a instead of libtcc.dll (win32)
    273291  --disable-rpath          disable use of -rpath with the above
    274   --with-libgcc            use /lib/libgcc_s.so.1 instead of libtcc.a
    275   --enable-mingw32         build windows version on linux with mingw32
    276   --enable-cygwin          build windows version on windows with cygwin
     292  --with-libgcc            use libgcc_s.so.1 instead of libtcc1.a
    277293  --enable-cross           build cross compilers
    278   --with-selinux           use mmap for exec mem [needs writable /tmp]
     294  --with-selinux           use mmap for executable memory (with tcc -run)
    279295  --sysincludepaths=...    specify system include paths, colon separated
    280296  --libpaths=...           specify system library paths, colon separated
    281297  --crtprefix=...          specify locations of crt?.o, colon separated
    282298  --elfinterp=...          specify elf interpreter
     299  --triplet=...            specify system library/include directory triplet
     300  --config-uClibc,-musl,-mingw32... enable system specific configurations
    283301EOF
    284302#echo "NOTE: The object files are build at the place where configure is launched"
     
    290308strip="${cross_prefix}${strip}"
    291309
    292 CONFTEST=./conftest$EXESUF
    293 
    294310if test -z "$cross_prefix" ; then
     311  CONFTEST=./conftest$EXESUF
    295312  if ! $cc -o $CONFTEST $source_path/conftest.c 2>/dev/null ; then
    296313    echo "configure: error: '$cc' failed to compile conftest.c."
    297314  else
    298     bigendian="$($CONFTEST bigendian)"
    299315    gcc_major="$($CONFTEST version)"
    300316    gcc_minor="$($CONFTEST minor)"
    301     if test "$mingw32" = "no" ; then
    302       triplet="$($CONFTEST triplet)"
    303       if test -f "/usr/lib/$triplet/crti.o" ; then
    304         tcc_lddir="lib/$triplet"
    305         multiarch_triplet="$triplet"
    306       elif test -f "/usr/lib64/crti.o" ; then
    307         tcc_lddir="lib64"
    308       fi
    309 
    310       if test "$cpu" = "armv4l" ; then
    311         if test "${triplet%eabihf}" != "$triplet" ; then
    312            confvars="$confvars arm_eabihf"
    313         elif test "${triplet%eabi}" != "$triplet" ; then
    314            confvars="$confvars arm_eabi"
    315         fi
    316         if grep -s -q "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo ; then
    317            confvars="$confvars arm_vfp"
     317  fi
     318  bigendian="$($CONFTEST bigendian)"
     319  if test "$mingw32" = "no" ; then
     320
     321      if test -z "$triplet"; then
     322        tt="$($CONFTEST triplet)"
     323        if test -n "$tt" -a -f "/usr/lib/$tt/crti.o" ; then
     324          triplet="$tt"
    318325        fi
    319326      fi
    320327
    321 #      multiarch_triplet=${libc_dir#*/}
    322 #      multiarch_triplet=${multiarch_triplet%/}
    323 #      tcc_lddir="${libc_dir%%/*}"
    324 #      if test -n "$multiarch_triplet" ; then
    325 #        tcc_lddir="$tcc_lddir/$multiarch_triplet"
    326 #      fi
    327 
    328       if test -f "/lib/ld-uClibc.so.0" ; then
    329         confvars="$confvars uClibc"
     328      if test -z "$triplet"; then
     329        if test $cpu = "x86_64" -o $cpu = "aarch64" ; then
     330          if test -f "/usr/lib64/crti.o" ; then
     331            tcc_lddir="lib64"
     332          fi
     333        fi
    330334      fi
    331 # gr: maybe for after the release:
    332 #       tcc_elfinterp="$(ldd $CONFTEST | grep 'ld.*.so' | sed 's,\s*\(\S\+\).*,\1,')"
    333        # echo "elfinterp           $tcc_elfinterp"
    334 
    335     fi
     335
     336      if test "$cpu" = "arm" ; then
     337        if test "${triplet%eabihf}" != "$triplet" ; then
     338           confvars="$confvars arm_eabihf"
     339        elif test "${triplet%eabi}" != "$triplet" ; then
     340           confvars="$confvars arm_eabi"
     341        fi
     342        if grep -s -q "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo ; then
     343           confvars="$confvars arm_vfp"
     344        fi
     345      fi
     346
     347      if test "$suggest" = "yes"; then
     348        if test -f "/lib/ld-uClibc.so.0" ; then
     349          echo "Perhaps you want ./configure --config-uClibc"
     350        fi
     351        if test -f "/lib/ld-musl-$cpu.so.1"; then
     352          echo "Perhaps you want ./configure --config-musl"
     353        fi
     354      fi
    336355  fi
    337356else
    338357  # if cross compiling, cannot launch a program, so make a static guess
    339358  case $cpu in
    340     powerpc|mips|s390)  bigendian=yes;;
     359    ppc|mips|s390)  bigendian=yes;;
    341360  esac
    342361fi
    343362
    344 cat <<EOF
    345 Binary  directory   $bindir
    346 TinyCC directory    $tccdir
    347 Library directory   $libdir
    348 Include directory   $includedir
    349 Manual directory    $mandir
    350 Info directory      $infodir
    351 Doc directory       $docdir
    352 Target root prefix  $sysroot
    353 Source path      $source_path
    354 C compiler       $cc
    355 Target OS        $targetos
    356 CPU              $cpu
    357 Big Endian       $bigendian
    358 gprof enabled    $gprof
    359 cross compilers  $build_cross
    360 use libgcc       $use_libgcc
    361 EOF
    362 
     363if test "$bigendian" = "yes" ; then
     364  confvars="$confvars BIGENDIAN"
     365fi
     366
     367# a final configuration tuning
     368if ! echo "$cc" | grep -q "tcc"; then
     369  OPT1="-Wdeclaration-after-statement -fno-strict-aliasing"
     370  # we want -Wno- but gcc does not always reject unknown -Wno- options
     371  OPT2="-Wpointer-sign -Wsign-compare -Wunused-result"
     372  if echo "$cc" | grep -q "clang"; then
     373    OPT1="$OPT1 -fheinous-gnu-extensions"
     374    OPT2="$OPT2 -Wstring-plus-int"
     375  fi
     376  $cc $OPT1 $OPT2 -o a.out -c -xc - < /dev/null > cc_msg.txt 2>&1
     377  for o in $OPT1; do # enable these options
     378    if ! grep -q -- $o cc_msg.txt; then CFLAGS="$CFLAGS $o"; fi
     379  done
     380  for o in $OPT2; do # disable these options
     381    if ! grep -q -- $o cc_msg.txt; then CFLAGS="$CFLAGS -Wno-${o#-W*}"; fi
     382  done
     383  # cat cc_msg.txt
     384  # echo $CFLAGS
     385  rm -f cc_msg.txt a.out
     386fi
     387
     388fcho() { if test -n "$2"; then echo "$1$2"; fi }
     389
     390fcho "Binary directory    " "$bindir"
     391fcho "TinyCC directory    " "$tccdir"
     392fcho "Library directory   " "$libdir"
     393fcho "Include directory   " "$includedir"
     394fcho "Manual directory    " "$mandir"
     395fcho "Info directory      " "$infodir"
     396fcho "Doc directory       " "$docdir"
     397fcho "Target root prefix  " "$sysroot"
     398echo "Source path         $source_path"
     399echo "C compiler          $cc ($gcc_major.$gcc_minor)"
     400echo "Target OS           $targetos"
     401echo "CPU                 $cpu"
     402fcho "Triplet             " "$triplet"
     403fcho "Config              " "${confvars# }"
    363404echo "Creating config.mak and config.h"
    364405
     
    369410tccdir=\$(DESTDIR)$tccdir
    370411libdir=\$(DESTDIR)$libdir
    371 ln_libdir=$libdir
    372412includedir=\$(DESTDIR)$includedir
    373413mandir=\$(DESTDIR)$mandir
     
    377417GCC_MAJOR=$gcc_major
    378418GCC_MINOR=$gcc_minor
    379 HOST_CC=$host_cc
    380419AR=$ar
    381420STRIP=$strip -s -R .comment -R .note
     
    384423LIBSUF=$LIBSUF
    385424EXESUF=$EXESUF
     425DLLSUF=$DLLSUF
    386426EOF
    387427
     
    393433  fi
    394434}
     435
    395436print_mak() {
    396437  if test -n "$2"; then
    397438    echo "NATIVE_DEFINES+=-D$1=\"\\\"$2\\\"\"" >> config.mak
     439  fi
     440}
     441
     442print_mak_int() {
     443  if test -n "$2"; then
     444    echo "NATIVE_DEFINES+=-D$1=$2" >> config.mak
    398445  fi
    399446}
     
    408455print_mak CONFIG_TCC_ELFINTERP "$tcc_elfinterp"
    409456print_mak CONFIG_LDDIR "$tcc_lddir"
    410 print_mak CONFIG_MULTIARCHDIR "$multiarch_triplet"
    411 
    412 echo "#define GCC_MAJOR $gcc_major" >> $TMPH
    413 echo "#define GCC_MINOR $gcc_minor" >> $TMPH
    414 
    415 if test "$cpu" = "x86" ; then
    416   echo "ARCH=i386" >> config.mak
    417   echo "#define HOST_I386 1" >> $TMPH
    418 elif test "$cpu" = "x86-64" ; then
    419   echo "ARCH=x86-64" >> config.mak
    420   echo "#define HOST_X86_64 1" >> $TMPH
    421 elif test "$cpu" = "armv4l" ; then
    422   echo "ARCH=arm" >> config.mak
    423   echo "#define HOST_ARM 1" >> $TMPH
    424   echo "#define TCC_ARM_VERSION $cpuver" >> $TMPH
    425 elif test "$cpu" = "powerpc" ; then
    426   echo "ARCH=ppc" >> config.mak
    427   echo "#define HOST_PPC 1" >> $TMPH
    428 elif test "$cpu" = "mips" ; then
    429   echo "ARCH=mips" >> config.mak
    430   echo "#define HOST_MIPS 1" >> $TMPH
    431 elif test "$cpu" = "s390" ; then
    432   echo "ARCH=s390" >> config.mak
    433   echo "#define HOST_S390 1" >> $TMPH
    434 elif test "$cpu" = "alpha" ; then
    435   echo "ARCH=alpha" >> config.mak
    436   echo "#define HOST_ALPHA 1" >> $TMPH
     457print_mak CONFIG_TRIPLET "$triplet"
     458print_mak_int TCC_CPU_VERSION "$cpuver"
     459
     460if test "$cpu" = "aarch64" ; then
     461  echo "ARCH=arm64" >> config.mak
    437462else
    438   echo "Unsupported CPU"
    439   exit 1
    440 fi
    441 
     463  echo "ARCH=$cpu" >> config.mak
     464fi
    442465echo "TARGETOS=$targetos" >> config.mak
    443466
    444467for v in $confvars ; do
    445   echo "CONFIG_$v=yes" >> config.mak
     468  if test "${v%=*}" = "$v"; then
     469    echo "CONFIG_$v=yes" >> config.mak
     470  else
     471    echo "CONFIG_$v" >> config.mak
     472  fi
    446473done
    447 if test "$noldl" = "yes" ; then
    448   echo "CONFIG_NOLDL=yes" >> config.mak
    449 fi
    450 if test "$mingw32" = "yes" ; then
    451   echo "CONFIG_WIN32=yes" >> config.mak
    452   echo "#define CONFIG_WIN32 1" >> $TMPH
    453 fi
    454 if test "$cygwin" = "yes" ; then
    455   echo "#ifndef _WIN32" >> $TMPH
    456   echo "# define _WIN32" >> $TMPH
    457   echo "#endif" >> $TMPH
    458   echo "AR=ar" >> config.mak
    459 fi
    460 if test "$bigendian" = "yes" ; then
    461   echo "WORDS_BIGENDIAN=yes" >> config.mak
    462   echo "#define WORDS_BIGENDIAN 1" >> $TMPH
    463 fi
    464 if test "$gprof" = "yes" ; then
    465   echo "TARGET_GPROF=yes" >> config.mak
    466   echo "#define HAVE_GPROF 1" >> $TMPH
    467 fi
    468 if test "$build_cross" = "yes" ; then
    469   echo "CONFIG_CROSS=yes" >> config.mak
    470 fi
    471 if test "$disable_static" = "yes" ; then
    472   echo "DISABLE_STATIC=yes" >> config.mak
    473 fi
    474 if test "$disable_rpath" = "yes" ; then
    475   echo "DISABLE_RPATH=yes" >> config.mak
    476 fi
    477 if test "$strip_binaries" = "yes" ; then
    478   echo "STRIP_BINARIES=yes" >> config.mak
    479 fi
    480 if test "$use_libgcc" = "yes" ; then
    481   echo "#define CONFIG_USE_LIBGCC" >> $TMPH
    482   echo "CONFIG_USE_LIBGCC=yes" >> config.mak
    483 fi
    484 if test "$have_selinux" = "yes" ; then
    485   echo "#define HAVE_SELINUX" >> $TMPH
    486   echo "HAVE_SELINUX=yes" >> config.mak
    487 fi
    488474
    489475version=`head $source_path/VERSION`
    490 echo "VERSION=$version" >>config.mak
     476echo "VERSION = $version" >> config.mak
    491477echo "#define TCC_VERSION \"$version\"" >> $TMPH
    492478echo "@set VERSION $version" > config.texi
    493 echo "SRC_PATH=$source_path" >>config.mak
    494479
    495480if test "$source_path_used" = "yes" ; then
    496481    case $source_path in
    497        /*) echo "top_srcdir=$source_path";;
    498         *) echo "top_srcdir=\$(TOP)/$source_path";;
     482       /*) echo "TOPSRC=$source_path";;
     483        *) echo "TOPSRC=\$(TOP)/$source_path";;
    499484     esac >>config.mak
    500485else
    501      echo 'top_srcdir=$(TOP)' >>config.mak
    502 fi
    503 echo 'top_builddir=$(TOP)' >>config.mak
     486     echo 'TOPSRC=$(TOP)' >>config.mak
     487fi
    504488
    505489diff $TMPH config.h >/dev/null 2>&1
     
    520504    case $2 in
    521505    */*) dn=${2%/*}
    522         test -d $dn || mkdir -p $dn
    523         case $1 in
    524         /*) ;;
    525           *) while test $dn ; do
    526                 tgt=../$tgt; dn=${dn#${dn%%/*}}; dn=${dn#/}
    527              done
    528              ;;
    529         esac
    530         ;;
     506        test -d $dn || mkdir -p $dn
     507        case $1 in
     508        /*) ;;
     509          *) while test $dn ; do
     510                tgt=../$tgt; dn=${dn#${dn%%/*}}; dn=${dn#/}
     511             done
     512             ;;
     513        esac
     514        ;;
    531515    esac
    532     ln -sfn $tgt $2
     516
     517    ln -sfn $tgt $2 || ( echo "ln failed. Using cp instead."; cp -f $1/$2 $2 )
    533518}
    534519
    535520if test "$source_path_used" = "yes" ; then
    536   FILES="Makefile lib/Makefile tests/Makefile tests/tests2/Makefile"
     521  FILES="Makefile lib/Makefile tests/Makefile tests/tests2/Makefile tests/pp/Makefile"
    537522  for f in $FILES ; do
    538523    fn_makelink $source_path $f
Note: See TracChangeset for help on using the changeset viewer.