summaryrefslogtreecommitdiff
path: root/libgcc/config.host
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-09 12:30:46 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-09 12:30:46 +0000
commita6f0616915578a047b2f21ff19f64c2631fc799a (patch)
treed044985af6a76f58c9fe909ce81f475be183312a /libgcc/config.host
parentc9dc79a6d057cc5fddfbc18d374da9761cd3a5c2 (diff)
downloadgcc-a6f0616915578a047b2f21ff19f64c2631fc799a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174843 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/config.host')
-rw-r--r--libgcc/config.host16
1 files changed, 16 insertions, 0 deletions
diff --git a/libgcc/config.host b/libgcc/config.host
index 38b0eb3726d..c2b5dbca75c 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -44,6 +44,8 @@
# The default is ".hidden".
# cpu_type The name of the cpu, if different from the first
# chunk of the canonical host name.
+# enable_execute_stack The name of a source file implementing
+# __enable_execute_stack.
# extra_parts List of extra object files that should be compiled
# for this target machine. This may be overridden
# by setting EXTRA_PARTS in a tmake_file fragment.
@@ -57,6 +59,7 @@
# "$cpu_type/t-$cpu_type".
asm_hidden_op=.hidden
+enable_execute_stack=
extra_parts=
tmake_file=
md_unwind_header=no-unwind.h
@@ -203,6 +206,19 @@ case ${host} in
esac
case ${host} in
+*-*-darwin* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris2* | \
+ alpha*-dec-osf5.1*)
+ enable_execute_stack=enable-execute-stack-mprotect.c
+ ;;
+i[34567]86-*-mingw* | x86_64-*-mingw*)
+ enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
+ ;;
+*)
+ enable_execute_stack=enable-execute-stack-empty.c;
+ ;;
+esac
+
+case ${host} in
# Support site-specific machine types.
*local*)
rest=`echo ${host} | sed -e "s/$cpu_type-//"`