Branch: Tag:

2005-06-09

2005-06-09 09:12:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Minor cleanup of AC_SYS_COMPILER_FLAG.
Obsoleted DO_IF_CPU.
Obsoleted execstack code, since it shouldn't be needed anymore.

Rev: src/configure.in:1.887

1: - AC_REVISION("$Id: configure.in,v 1.886 2005/06/08 17:27:52 grubba Exp $") + AC_REVISION("$Id: configure.in,v 1.887 2005/06/09 09:12:10 grubba Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
370:       if test x"[$]pike_cv_option_$2" = "xyes" ; then    $3="[$]$3 $1" -  case "$3" in -  OPTIMIZE) -  CFLAGS="[$]CFLAGS $1" -  ;; -  esac +  ifelse($3,OPTIMIZE,[CFLAGS="[$]CFLAGS $1"])    AC_MSG_RESULT(yes)    $5    else
409:   fi   ])    - define([DO_IF_CPU], - [ - if test "`uname -m 2>/dev/null`" = "$1" ; then - $2 - fi - ]) -  +    #############################################################################      # ABI selection.
476:    pike_disabled_option_m64=yes   fi    - # FIXME: Detect which architecture the ABI corresponds to. -  +    #############################################################################      if test "x$GCC" = "x"; then
1050:    if test "$cflags_is_set" = "no"; then    AC_SYS_COMPILER_FLAG(-pipe, pipe, OPTIMIZE)    -  #### For exec-shield in newer linux kernels. -  #### Linux's mprotect(2) is broken, so we unfortunately -  #### need to enable executabe stack. -  #### This test crashes under mingw32 so let's disable for win32 for now. -  if test "$pike_cv_sys_os" != "Windows_NT"; then -  AC_SYS_COMPILER_FLAG([[-Wa,--execstack]],executableheap,CFLAGS) +  # The following segment is obsolete, since executable memory is +  # now allocated with mmap instead of with malloc(). +  # /grubba 2005-06-09 +  # +  # #### For exec-shield in newer linux kernels. +  # #### Linux's mprotect(2) is broken, so we unfortunately +  # #### need to enable executabe stack. +  # #### This test crashes under mingw32 so let's disable for win32 for now. +  # if test "$pike_cv_sys_os" != "Windows_NT"; then +  # AC_SYS_COMPILER_FLAG([[-Wa,--execstack]],executableheap,CFLAGS) +  # fi    fi   fi - fi +       LD='$(CC) $(CFLAGS)'   LC_REQ="-lc"
1981:       DO_IF_OS(Linux,    [ -  if test "x$with_machine_code" = "xno"; then :; else -  # WORKAROUND: mprotect(PROT_EXEC) doesn't work on Linux/x86. -  # Try to set the stackexec flag on the binary. -  # First try -z execstack (ld). -  AC_SYS_COMPILER_FLAG([-z execstack], z_execstack, LDFLAGS, [ -  # No, try passing it directly to the linker. -  AC_SYS_COMPILER_FLAG([-Wl,-z,execstack], Wl_z_execstack, LDFLAGS, [ -  # No, try --execstack (gas). -  AC_SYS_COMPILER_FLAG([--execstack], execstack, CFLAGS, [ -  # No, try passing it directly to the assembler. -  AC_SYS_COMPILER_FLAG([-Wa,--execstack], Wa_execstack, CFLAGS, [ -  # No. -  # FIXME: Add support for use of chstk(1). -  PIKE_MSG_WARN([Could not find any way to enable executable stack.]) +  : +  # The following segment is obsolete, since executable memory is +  # now allocated with mmap instead of with malloc(). +  # /grubba 2005-06-09 +  # +  # if test "x$with_machine_code" = "xno"; then :; else +  # # WORKAROUND: mprotect(PROT_EXEC) doesn't work on Linux/x86. +  # # Try to set the stackexec flag on the binary. +  # # First try -z execstack (ld). +  # AC_SYS_COMPILER_FLAG([-z execstack], z_execstack, LDFLAGS, [ +  # # No, try passing it directly to the linker. +  # AC_SYS_COMPILER_FLAG([-Wl,-z,execstack], Wl_z_execstack, LDFLAGS, [ +  # # No, try --execstack (gas). +  # AC_SYS_COMPILER_FLAG([--execstack], execstack, CFLAGS, [ +  # # No, try passing it directly to the assembler. +  # AC_SYS_COMPILER_FLAG([-Wa,--execstack], Wa_execstack, CFLAGS, [ +  # # No. +  # # FIXME: Add support for use of chstk(1). +  # PIKE_MSG_WARN([Could not find any way to enable executable stack.]) +  # ]) +  # ]) +  # ]) +  # ]) +  # fi    ]) -  ]) -  ]) -  ]) -  fi -  ]) +        elif test "x${TCC-}" = xyes ; then   
2323:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.886 2005/06/08 17:27:52 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.887 2005/06/09 09:12:10 grubba Exp $.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2361:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.886 2005/06/08 17:27:52 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.887 2005/06/09 09:12:10 grubba Exp $.   # POSIX-version. Do NOT edit.   cat   EOF
2370:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.886 2005/06/08 17:27:52 grubba Exp $. + # Automatically generated by $Id: configure.in,v 1.887 2005/06/09 09:12:10 grubba Exp $.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF