ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/configure.ac
(Generate patch)

Comparing SheepShaver/src/Unix/configure.ac (file contents):
Revision 1.51 by gbeauche, 2006-05-02T05:50:38Z vs.
Revision 1.52 by gbeauche, 2006-05-06T10:42:51Z

# Line 1485 | Line 1485 | if [[ "x$HAVE_IPA" = "xyes" ]]; then
1485    LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA"
1486   fi
1487  
1488 + dnl Check for linker script support
1489 + case $target_os:$target_cpu in
1490 + linux*:i?86)    LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1491 + linux*:x86_64)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-x86_64.ld";;
1492 + linux*:powerpc) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-ppc.ld";;
1493 + netbsd*:i?86)   LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1494 + freebsd*:i?86)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/freebsd-i386.ld";;
1495 + darwin*:*)      LINKER_SCRIPT_FLAGS="-Wl,-seg1addr,0x78048000";;
1496 + esac
1497 + if [[ -n "$LINKER_SCRIPT_FLAGS" ]]; then
1498 +  AC_CACHE_CHECK([whether linker script is usable],
1499 +    ac_cv_linker_script_works, [
1500 +    AC_LANG_SAVE
1501 +    AC_LANG_CPLUSPLUS
1502 +    saved_LDFLAGS="$LDFLAGS"
1503 +    LDFLAGS="$LDFLAGS $LINKER_SCRIPT_FLAGS"
1504 +    AC_TRY_RUN(
1505 +      [int main() {if ((char *)&main < (char *)0x70000000) return 1;}],
1506 +      [ac_cv_linker_script_works=yes],
1507 +      [ac_cv_linker_script_works=no],
1508 +      dnl When cross-compiling, assume it works
1509 +      [ac_cv_linker_script_works="guessing yes"]
1510 +    )
1511 +    AC_LANG_RESTORE
1512 +    if [[ "$ac_cv_linker_script_works" = "no" ]]; then
1513 +      LDFLAGS="$saved_LDFLAGS"
1514 +      LINKER_SCRIPT_FLAGS=""
1515 +    fi
1516 +  ])
1517 + fi
1518 + AC_TRANSLATE_DEFINE(HAVE_LINKER_SCRIPT, "$ac_cv_linker_script_works",
1519 +  [Define if there is a linker script to relocate the executable above 0x70000000.])
1520 +
1521   dnl Generate Makefile.
1522   AC_SUBST(PERL)
1523   AC_SUBST(USE_DYNGEN, [$ac_cv_use_dyngen])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines