summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-04-06 23:21:40 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-04-06 23:21:40 -0700
commit876da980f8de024f01efd8d9d86aba66f7cd3b4a (patch)
treefd24c9c860b03376fec333affc2a5ea0cd3cb7f2
parent7452b7bd70f01fb96f13269250bda32507ce0cf1 (diff)
downloademacs-876da980f8de024f01efd8d9d86aba66f7cd3b4a.tar.gz
Fix --enable-profiling bug introduced by 2013-02-25 change.
This bug was introduced by my 2013-02-25 change that simplified data_start configuration. Without this change, on GNU/Linux an Emacs configured with --enable-profiling fails immediately due to a profiler signal. * configure.ac (LD_SWITCH_SYSTEM_TEMACS): Append -pg if profiling and if not on GNU/Linux or FreeBSD. * lib/Makefile.am (AM_CFLAGS): Add $(PROFILING_CFLAGS), so that lib/*.o is profiled too. * src/Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link with these flags. On platforms where special flags are needed when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS. (ALL_CFLAGS): Remove $(PROFILING_CFLAGS). (.c.o, .m.o): Compile with $(PROFILING_CFLAGS). Fixes: debbugs:13783
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac7
-rw-r--r--lib/Makefile.am2
-rw-r--r--src/ChangeLog13
-rw-r--r--src/Makefile.in6
5 files changed, 32 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d4f0c82592..2dd796962d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
+ * configure.ac (LD_SWITCH_SYSTEM_TEMACS): Append -pg if profiling
+ and if not on GNU/Linux or FreeBSD.
+ * lib/Makefile.am (AM_CFLAGS): Add $(PROFILING_CFLAGS), so that
+ lib/*.o is profiled too.
+
2013-03-30 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
diff --git a/configure.ac b/configure.ac
index 0cff34b8a16..2d8c4c3473d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4185,6 +4185,13 @@ case "$opsys" in
*) LD_SWITCH_SYSTEM_TEMACS= ;;
esac
+if test x$ac_enable_profiling != x ; then
+ case $opsys in
+ *freebsd | gnu-linux) ;;
+ *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
+ esac
+fi
+
AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
## Common for all window systems
diff --git a/lib/Makefile.am b/lib/Makefile.am
index a341609e895..d8979a1cf74 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -4,7 +4,7 @@ MOSTLYCLEANDIRS =
MOSTLYCLEANFILES =
noinst_LIBRARIES =
-AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
+AM_CFLAGS = $(PROFILING_CFLAGS) $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src
include gnulib.mk
diff --git a/src/ChangeLog b/src/ChangeLog
index e39a104e135..75a7388f2c4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
+2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
+ This bug was introduced by my 2013-02-25 change that simplified
+ data_start configuration. Without this change, on GNU/Linux
+ an Emacs configured with --enable-profiling fails immediately
+ due to a profiler signal.
+ * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
+ with these flags. On platforms where special flags are needed
+ when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
+ (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
+ (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
+
2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
Get rid of some platform-specific functions examining window
diff --git a/src/Makefile.in b/src/Makefile.in
index 31de9714c65..c6a067a1ade 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -317,7 +317,7 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
$(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
$(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \
$(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
- $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) $(PROFILING_CFLAGS) \
+ $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \
$(LIBGNUTLS_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
@@ -325,10 +325,10 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
.SUFFIXES: .m
.c.o:
@$(MKDEPDIR)
- $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+ $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $<
.m.o:
@$(MKDEPDIR)
- $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
+ $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $(PROFILING_CFLAGS) $<
## lastfile must follow all files whose initialized data areas should
## be dumped as pure by dump-emacs.