all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* build from source fails on fedora-12 (with gcc 4.4.2)
@ 2009-10-23  6:51 Jim Meyering
  2009-10-23 15:01 ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Meyering @ 2009-10-23  6:51 UTC (permalink / raw)
  To: Emacs development discussions

Here's the patch:

FYI, at first I thought it was a bug in gcc and reported it,
but Jakub Jelinek explained that it is a feature, and
suggested the work-around of using -P.

From 8e02dcac08aec4aa87a5130bcde547c955840dcd Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Fri, 23 Oct 2009 08:47:52 +0200
Subject: [PATCH] invoke $CPP with its -P option, to accommodate change in latest gcc

* configure.in: Use $CPP's -P option when creating Makefile and
src/Makefile.  This is required with at least by gcc 4.4.2, which
is part of fedora 12.  Otherwise, each backslash-newline pair in
the input would be mistakenly converted to a bare newline, yielding
invalid Makefiles.
* configure: Regenerate.
---
 ChangeLog    |   10 ++++++++++
 configure    |    6 ++----
 configure.in |    4 ++--
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ce05b51..7927e78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-23  Jim Meyering  <meyering@redhat.com>
+
+	invoke $CPP with its -P option, to accommodate change in latest gcc
+	* configure.in: Use $CPP's -P option when creating Makefile and
+	src/Makefile.  This is required with at least by gcc 4.4.2, which
+	is part of fedora 12.  Otherwise, each backslash-newline pair in
+	the input would be mistakenly converted to a bare newline, yielding
+	invalid Makefiles.
+	* configure: Regenerate.
+
 2009-10-19  Dan Nicolaescu  <dann@ics.uci.edu>

 	* configure.in (vax-dec-vms): Remove, not supported anymore.
diff --git a/configure b/configure
index ee6871b..a4453af 100755
--- a/configure
+++ b/configure
@@ -26762,7 +26762,7 @@ echo creating lib-src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
-  $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	\f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c
@@ -26778,7 +26778,7 @@ echo creating src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
-  $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	\f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c
@@ -26832,5 +26832,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
 $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
-
-
diff --git a/configure.in b/configure.in
index 87c820f..a110407 100644
--- a/configure.in
+++ b/configure.in
@@ -3057,7 +3057,7 @@ echo creating lib-src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
-  $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	\f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c
@@ -3073,7 +3073,7 @@ echo creating src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
-  $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
+  $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /	/' -e '/^#/d' -e '/^[ 	\f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new
   rm -f junk.c junk1.c junk2.c
--
1.6.5.1.305.g914c1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: build from source fails on fedora-12 (with gcc 4.4.2)
  2009-10-23  6:51 build from source fails on fedora-12 (with gcc 4.4.2) Jim Meyering
@ 2009-10-23 15:01 ` Chong Yidong
  2009-10-23 15:21   ` Jim Meyering
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2009-10-23 15:01 UTC (permalink / raw)
  To: Jim Meyering; +Cc: Emacs development discussions

Jim Meyering <jim@meyering.net> writes:

> Here's the patch:
>
> FYI, at first I thought it was a bug in gcc and reported it,
> but Jakub Jelinek explained that it is a feature, and
> suggested the work-around of using -P.
>
> * configure.in: Use $CPP's -P option when creating Makefile and
> src/Makefile.  This is required with at least by gcc 4.4.2, which
> is part of fedora 12.  Otherwise, each backslash-newline pair in
> the input would be mistakenly converted to a bare newline, yielding
> invalid Makefiles.

Is this backward compatible with older gcc/cpp's?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: build from source fails on fedora-12 (with gcc 4.4.2)
  2009-10-23 15:01 ` Chong Yidong
@ 2009-10-23 15:21   ` Jim Meyering
  2009-10-23 16:19     ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Meyering @ 2009-10-23 15:21 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Emacs development discussions

Chong Yidong wrote:

> Jim Meyering <jim@meyering.net> writes:
>
>> Here's the patch:
>>
>> FYI, at first I thought it was a bug in gcc and reported it,
>> but Jakub Jelinek explained that it is a feature, and
>> suggested the work-around of using -P.
>>
>> * configure.in: Use $CPP's -P option when creating Makefile and
>> src/Makefile.  This is required with at least by gcc 4.4.2, which
>> is part of fedora 12.  Otherwise, each backslash-newline pair in
>> the input would be mistakenly converted to a bare newline, yielding
>> invalid Makefiles.
>
> Is this backward compatible with older gcc/cpp's?

I verified that /usr/lib/cpp on Solaris 10 and FreeBSD 6.1 both support -P.
I think it's been in every cpp since the beginning.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: build from source fails on fedora-12 (with gcc 4.4.2)
  2009-10-23 15:21   ` Jim Meyering
@ 2009-10-23 16:19     ` Chong Yidong
  0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2009-10-23 16:19 UTC (permalink / raw)
  To: Jim Meyering; +Cc: Emacs development discussions

Jim Meyering <jim@meyering.net> writes:

> Chong Yidong wrote:
>
>> Jim Meyering <jim@meyering.net> writes:
>>
>>> Here's the patch:
>>>
>>> FYI, at first I thought it was a bug in gcc and reported it,
>>> but Jakub Jelinek explained that it is a feature, and
>>> suggested the work-around of using -P.
>>>
>>> * configure.in: Use $CPP's -P option when creating Makefile and
>>> src/Makefile.  This is required with at least by gcc 4.4.2, which
>>> is part of fedora 12.  Otherwise, each backslash-newline pair in
>>> the input would be mistakenly converted to a bare newline, yielding
>>> invalid Makefiles.
>>
>> Is this backward compatible with older gcc/cpp's?
>
> I verified that /usr/lib/cpp on Solaris 10 and FreeBSD 6.1 both support -P.
> I think it's been in every cpp since the beginning.

OK, I've checked in your patch.  Thanks.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-23 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23  6:51 build from source fails on fedora-12 (with gcc 4.4.2) Jim Meyering
2009-10-23 15:01 ` Chong Yidong
2009-10-23 15:21   ` Jim Meyering
2009-10-23 16:19     ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.