Compile exceptions.cc with -fno-omit-frame-pointer on x86

Selectively using -fomit-frame-pointer when -O is used doesn't make sense
anymore, apparently since gcc 4.6, -O implies -fomit-frame-pointer.

exceptions.cc must be compiled with -fno-omit-frame-pointer on x86, as it uses
RtlCaptureContext, which requires a frame pointer.

	* Makefile.in : Remove setting -fomit-frame-pointer for compiling
	various files, it is already the default.  Set
	-fno-omit-frame-pointer for exceptions.cc on x86.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
Jon TURNEY 2015-04-04 23:31:03 +01:00 committed by Corinna Vinschen
parent 252a07b0ad
commit 4f28e8a0e5
2 changed files with 13 additions and 52 deletions

View File

@ -1,3 +1,9 @@
2015-04-04 Jon TURNEY <jon.turney@dronecode.org.uk>
* Makefile.in : Remove setting -fomit-frame-pointer for compiling
various files, it is already the default. Set
-fno-omit-frame-pointer for exceptions.cc on x86.
2015-04-03 Takashi Yano <takashi.yano@nifty.ne.jp> 2015-04-03 Takashi Yano <takashi.yano@nifty.ne.jp>
* fhandler_tty.cc (fhandler_pty_slave::read): Change calculation of * fhandler_tty.cc (fhandler_pty_slave::read): Change calculation of

View File

@ -449,59 +449,14 @@ INSTOBJS:=automode.o binmode.o textmode.o textreadmode.o
TARGET_LIBS:=$(LIB_NAME) $(CYGWIN_START) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $(INSTOBJS) $(EXTRALIBS) TARGET_LIBS:=$(LIB_NAME) $(CYGWIN_START) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $(INSTOBJS) $(EXTRALIBS)
ifneq "${filter -O%,$(CFLAGS)}" "" ifneq "${filter -O%,$(CFLAGS)}" ""
cygheap_CFLAGS:=-fomit-frame-pointer dtable_CFLAGS:=-fcheck-new
cygthread_CFLAGS:=-fomit-frame-pointer
cygtls_CFLAGS:=-fomit-frame-pointer
cygwait_CFLAGS=-fomit-frame-pointer
delqueue_CFLAGS:=-fomit-frame-pointer
devices_CFLAGS:=-fomit-frame-pointer
dir_CFLAGS:=-fomit-frame-pointer
dlfcn_CFLAGS:=-fomit-frame-pointer
dll_init_CFLAGS:=-fomit-frame-pointer
dtable_CFLAGS:=-fomit-frame-pointer -fcheck-new
fcntl_CFLAGS:=-fomit-frame-pointer
fenv_CFLAGS:=-fomit-frame-pointer
fhandler_CFLAGS:=-fomit-frame-pointer
fhandler_clipboard_CFLAGS:=-fomit-frame-pointer
fhandler_console_CFLAGS:=-fomit-frame-pointer
fhandler_disk_file_CFLAGS:=-fomit-frame-pointer
fhandler_dsp_CFLAGS:=-fomit-frame-pointer
fhandler_floppy_CFLAGS:=-fomit-frame-pointer
fhandler_netdrive_CFLAGS:=-fomit-frame-pointer
fhandler_proc_CFLAGS:=-fomit-frame-pointer
fhandler_process_CFLAGS:=-fomit-frame-pointer
fhandler_random_CFLAGS:=-fomit-frame-pointer
fhandler_raw_CFLAGS:=-fomit-frame-pointer
fhandler_registry_CFLAGS:=-fomit-frame-pointer
fhandler_serial_CFLAGS:=-fomit-frame-pointer
fhandler_socket_CFLAGS:=-fomit-frame-pointer
fhandler_syslog_CFLAGS:=-fomit-frame-pointer
fhandler_tape_CFLAGS:=-fomit-frame-pointer
fhandler_termios_CFLAGS:=-fomit-frame-pointer
fhandler_tty_CFLAGS:=-fomit-frame-pointer
fhandler_virtual_CFLAGS:=-fomit-frame-pointer
fhandler_windows_CFLAGS:=-fomit-frame-pointer
fhandler_zero_CFLAGS:=-fomit-frame-pointer
flock_CFLAGS:=-fomit-frame-pointer
grp_CFLAGS:=-fomit-frame-pointer
libstdcxx_wrapper_CFLAGS:=-fomit-frame-pointer
localtime_CFLAGS:=-fwrapv localtime_CFLAGS:=-fwrapv
malloc_CFLAGS:=-fomit-frame-pointer -O3 malloc_CFLAGS:=-O3
malloc_wrapper_CFLAGS:=-fomit-frame-pointer sync_CFLAGS:=-O3
miscfuncs_CFLAGS:=-fomit-frame-pointer ifeq ($(target_cpu),i686)
net_CFLAGS:=-fomit-frame-pointer # on x86, exceptions.cc must be compiled with a frame-pointer as it uses RtlCaptureContext()
passwd_CFLAGS:=-fomit-frame-pointer exceptions_CFLAGS:=-fno-omit-frame-pointer
path_CFLAGS=-fomit-frame-pointer endif
regcomp_CFLAGS=-fomit-frame-pointer
regerror_CFLAGS=-fomit-frame-pointer
regexec_CFLAGS=-fomit-frame-pointer
regfree_CFLAGS=-fomit-frame-pointer
shared_CFLAGS:=-fomit-frame-pointer
sync_CFLAGS:=-fomit-frame-pointer -O3
smallprint_CFLAGS:=-fomit-frame-pointer
syscalls_CFLAGS:=-fomit-frame-pointer
sysconf_CFLAGS:=-fomit-frame-pointer
uinfo_CFLAGS:=-fomit-frame-pointer
endif endif
fhandler_proc_CFLAGS+=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\"" fhandler_proc_CFLAGS+=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\""