changeset 110905:158de1f7d257

Pass CFLAGS to the linker. * configure.in (PROFILING_LDFLAGS): Do not define, remove all uses. * lib-src/Makefile.in (PROFILING_LDFLAGS): Remove, not needed. * msdos/sed1v2.inp (PROFILING_LDFLAGS): * msdos/sed3v2.inp (PROFILING_LDFLAGS): Remove, not defined anymore. * src/Makefile.in (temacs): Use $(ALL_CFLAGS) on the link line. (PROFILING_LDFLAGS): Remove, not needed anymore.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sun, 10 Oct 2010 08:35:04 -0700
parents e887f48abae5
children b9752b72e1ee
files ChangeLog configure configure.in lib-src/ChangeLog lib-src/Makefile.in msdos/ChangeLog msdos/sed1v2.inp msdos/sed3v2.inp src/ChangeLog src/Makefile.in
diffstat 10 files changed, 22 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Oct 10 07:47:43 2010 -0700
+++ b/ChangeLog	Sun Oct 10 08:35:04 2010 -0700
@@ -1,3 +1,7 @@
+2010-10-10  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* configure.in (PROFILING_LDFLAGS): Do not define, remove all uses.
+
 2010-10-09  Glenn Morris  <rgm@gnu.org>
 
 	* make-dist: No more doc/emacs/*.texi.in.
--- a/configure	Sun Oct 10 07:47:43 2010 -0700
+++ b/configure	Sun Oct 10 08:35:04 2010 -0700
@@ -749,7 +749,6 @@
 build_vendor
 build_cpu
 build
-PROFILING_LDFLAGS
 PROFILING_CFLAGS
 MAINT
 GZIP_INFO
@@ -3038,12 +3037,9 @@
 
 if test x$ac_enable_profiling != x ; then
    PROFILING_CFLAGS="-DPROFILING=1 -pg"
-   PROFILING_LDFLAGS="-pg"
 else
    PROFILING_CFLAGS=
-   PROFILING_LDFLAGS=
-fi
-
+fi
 
 
 # Check whether --enable-autodepend was given.
@@ -7679,7 +7675,7 @@
 tmp_CFLAGS="$CFLAGS"
 CPPFLAGS="$CPPFLAGS -x objective-c"
 CFLAGS="$CFLAGS -x objective-c"
-TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
+TEMACS_LDFLAGS2="\${LDFLAGS}"
 if test "${with_ns}" != no; then
   if test "${opsys}" = darwin; then
      NS_IMPL_COCOA=yes
--- a/configure.in	Sun Oct 10 07:47:43 2010 -0700
+++ b/configure.in	Sun Oct 10 08:35:04 2010 -0700
@@ -325,13 +325,10 @@
 [ac_enable_profiling="${enableval}"],[])
 if test x$ac_enable_profiling != x ; then
    PROFILING_CFLAGS="-DPROFILING=1 -pg"
-   PROFILING_LDFLAGS="-pg"
 else
    PROFILING_CFLAGS=
-   PROFILING_LDFLAGS=
 fi
 AC_SUBST(PROFILING_CFLAGS)
-AC_SUBST(PROFILING_LDFLAGS)
 
 AC_ARG_ENABLE(autodepend,
 [AS_HELP_STRING([--enable-autodepend],
@@ -1487,7 +1484,7 @@
 tmp_CFLAGS="$CFLAGS"
 CPPFLAGS="$CPPFLAGS -x objective-c"
 CFLAGS="$CFLAGS -x objective-c"
-TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
+TEMACS_LDFLAGS2="\${LDFLAGS}"
 dnl I don't think it's especially important, but src/Makefile.in
 dnl (now the only user of ns_appdir) used to go to the trouble of adding a
 dnl trailing "/" to it, so now we do it here.
--- a/lib-src/ChangeLog	Sun Oct 10 07:47:43 2010 -0700
+++ b/lib-src/ChangeLog	Sun Oct 10 08:35:04 2010 -0700
@@ -1,3 +1,7 @@
+2010-10-10  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* Makefile.in (PROFILING_LDFLAGS): Remove, not needed.
+
 2010-10-09  Glenn Morris  <rgm@gnu.org>
 
 	* b2m.c, b2m.pl: Remove files.
--- a/lib-src/Makefile.in	Sun Oct 10 07:47:43 2010 -0700
+++ b/lib-src/Makefile.in	Sun Oct 10 08:35:04 2010 -0700
@@ -39,7 +39,6 @@
 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
 C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
 PROFILING_CFLAGS = @PROFILING_CFLAGS@
-PROFILING_LDFLAGS = @PROFILING_LDFLAGS@
 
 # Program name transformation.
 TRANSFORM = @program_transform_name@
@@ -173,7 +172,7 @@
 	      -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src
 
 ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
-LINK_CFLAGS = ${BASE_CFLAGS} ${PROFILING_LDFLAGS} ${LDFLAGS} ${CFLAGS}
+LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
 CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
 
 LOADLIBES=$(LIBS_SYSTEM)
--- a/msdos/ChangeLog	Sun Oct 10 07:47:43 2010 -0700
+++ b/msdos/ChangeLog	Sun Oct 10 08:35:04 2010 -0700
@@ -1,3 +1,8 @@
+2010-10-10  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* sed1v2.inp (PROFILING_LDFLAGS):
+	* sed3v2.inp (PROFILING_LDFLAGS): Remove, not defined anymore.
+
 2010-10-09  Glenn Morris  <rgm@gnu.org>
 
 	* mainmake.v2 (install): Remove b2m.
--- a/msdos/sed1v2.inp	Sun Oct 10 07:47:43 2010 -0700
+++ b/msdos/sed1v2.inp	Sun Oct 10 08:35:04 2010 -0700
@@ -43,7 +43,6 @@
 /^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@//
 /^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@//
 /^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@//
-/^PROFILING_LDFLAGS *=/s/@PROFILING_LDFLAGS@//
 #/^LD_SWITCH_X_SITE *=/s/@LD_SWITCH_X_SITE@//
 /^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@//
 /^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@//
--- a/msdos/sed3v2.inp	Sun Oct 10 07:47:43 2010 -0700
+++ b/msdos/sed3v2.inp	Sun Oct 10 08:35:04 2010 -0700
@@ -41,7 +41,6 @@
 /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
 /^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@//
 /^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@//
-/^PROFILING_LDFLAGS *=/s/@PROFILING_LDFLAGS@//
 /^LOADLIBES *=/s!=.*$!=!
 /^ALLOCA *=/s!@ALLOCA@!!
 /^EXEEXT *=/s!@EXEEXT@!!
--- a/src/ChangeLog	Sun Oct 10 07:47:43 2010 -0700
+++ b/src/ChangeLog	Sun Oct 10 08:35:04 2010 -0700
@@ -1,5 +1,8 @@
 2010-10-10  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	* Makefile.in (temacs): Use $(ALL_CFLAGS) on the link line.
+	(PROFILING_LDFLAGS): Remove, not needed anymore.
+
 	* Makefile.in: Use $(...) everywhere instead of ${...}
 	(CRT_DIR): Move near potential user.
 	(START_FILE): Move near CRT_DIR, it might use it.
--- a/src/Makefile.in	Sun Oct 10 07:47:43 2010 -0700
+++ b/src/Makefile.in	Sun Oct 10 08:35:04 2010 -0700
@@ -65,7 +65,6 @@
 
 ## Flags to pass for profiling builds
 PROFILING_CFLAGS = @PROFILING_CFLAGS@
-PROFILING_LDFLAGS = @PROFILING_LDFLAGS@
 
 ## Flags to pass to the compiler to enable build warnings
 C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
@@ -114,7 +113,7 @@
 ## Flags to pass to ld only for temacs.
 TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
 
-## $LDFLAGS $PROFILING_LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason).
+## $LDFLAGS or empty if NS_IMPL_GNUSTEP (for some reason).
 TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@
 
 ## Some systems define this to request special libraries.
@@ -648,7 +647,7 @@
 
 
 temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj)
-	$(CC) $(LD_FIRSTFLAG) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \
+	$(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \
 	  -o temacs $(START_FILES) $(obj) $(otherobj) $(LIBES)
 
 ## The following oldxmenu-related rules are only (possibly) used if