netbsd.h (ENABLE_EXECUTE_STACK): Remove.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 9 Jun 2011 12:30:46 +0000 (12:30 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 9 Jun 2011 12:30:46 +0000 (12:30 +0000)
commit10e48e3927a74bf7b2ec7a1b68fb840f4b1be588
treed044985af6a76f58c9fe909ce81f475be183312a
parent9ef0b98eb62b22e291e4cca4537d64ea2b795c14
netbsd.h (ENABLE_EXECUTE_STACK): Remove.

2011-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
    Joseph Myers  <joseph@codesourcery.com>

gcc:
* config/alpha/netbsd.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/alpha/osf5.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/darwin.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/i386/mingw32.h (MINGW_ENABLE_EXECUTE_STACK): Remove.
(ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
[IN_LIBGCC2]: Don't include <windows.h>.
* config/i386/netbsd-elf.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/i386/netbsd64.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/netbsd.h (NETBSD_ENABLE_EXECUTE_STACK): Remove.
* config/openbsd.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/sol2.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/sparc/freebsd.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/sparc/netbsd-elf.h (ENABLE_EXECUTE_STACK): Remove.
(HAVE_ENABLE_EXECUTE_STACK): Define.
* config/alpha/alpha.c (alpha_trampoline_init): Test
HAVE_ENABLE_EXECUTE_STACK.
* config/i386/i386.c (ix86_trampoline_init): Likewise.
* config/sparc/sparc.c (sparc32_initialize_trampoline): Likewise.
(sparc64_initialize_trampoline): Likewise.
* libgcc2.c [L_enable_execute_stack]: Remove.
* system.h (ENABLE_EXECUTE_STACK): Poison.
* doc/tm.texi.in (Trampolines, ENABLE_EXECUTE_STACK): Remove.
* doc/tm.texi: Regenerate.
* Makefile.in (LIBGCC2_CFLAGS): Add -fbuilding-libgcc.

gcc/c-family:
* c.opt (fbuilding-libgcc): New option.
* c-cppbuiltin.c (c_cpp_builtins): Define
__LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.

libgcc:
* enable-execute-stack-empty.c: New file.
* enable-execute-stack-mprotect.c: New file.
* config/i386/enable-execute-stack-mingw32.c: New file.
* config.host (enable_execute_stack): New variable.
Select appropriate variants.
* configure.ac: Link enable-execute-stack.c to
$enable_execute_stack.
* configure: Regenerate.
* Makefile.in (LIB2ADD): Add enable-execute-stack.c.
(lib2funcs): Remove _enable_execute_stack.

Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r174843
31 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/c-family/ChangeLog
gcc/c-family/c-cppbuiltin.c
gcc/c-family/c.opt
gcc/config/alpha/alpha.c
gcc/config/alpha/netbsd.h
gcc/config/alpha/osf5.h
gcc/config/darwin.h
gcc/config/i386/i386.c
gcc/config/i386/mingw32.h
gcc/config/i386/netbsd-elf.h
gcc/config/i386/netbsd64.h
gcc/config/netbsd.h
gcc/config/openbsd.h
gcc/config/sol2.h
gcc/config/sparc/freebsd.h
gcc/config/sparc/netbsd-elf.h
gcc/config/sparc/sparc.c
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/libgcc2.c
gcc/system.h
libgcc/ChangeLog
libgcc/Makefile.in
libgcc/config.host
libgcc/config/i386/enable-execute-stack-mingw32.c [new file with mode: 0644]
libgcc/configure
libgcc/configure.ac
libgcc/enable-execute-stack-empty.c [new file with mode: 0644]
libgcc/enable-execute-stack-mprotect.c [new file with mode: 0644]