public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Douglas B Rupp <rupp@gnat.com>
To: Bruce Korb <bkorb@gnu.org>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH] fixincludes/Makefile for Interix
Date: Sat, 04 Jun 2011 20:43:00 -0000	[thread overview]
Message-ID: <4DEA98E4.3070402@gnat.com> (raw)
In-Reply-To: <BANLkTinynf==XLMNLjvi6NLo_RrCmFfQ6A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

Here's my proposed patch, along the lines you suggested. top_srcdir 
didn't seem to be set, so I used srcdir instead.

Bootstrapped on x86_64-unknown-linux-gnu




[-- Attachment #2: fixinc.txt --]
[-- Type: text/plain, Size: 1968 bytes --]

2011-06-04  Douglas B Rupp  <rupp@gnat.com>

	* fixincludes/configure.ac (host_makefile_frag): Use mh-interix.
	* fixincludes/configure: Regenerate
	* fixincludes/Makefile.in (FIXINC_CPPFLAGS): New flag macro.
	(@host_makefile_frag@): New substitution placeholder.
	(.c.o): Use FIXINC_CPPFLAGS.

diff -rupN gcc.orig/fixincludes/configure.ac gcc/fixincludes/configure.ac
--- gcc.orig/fixincludes/configure.ac	2011-04-06 17:01:09.000000000 -0700
+++ gcc/fixincludes/configure.ac	2011-06-04 13:18:23.000000000 -0700
@@ -23,6 +23,20 @@ ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual]
 # Determine the noncanonical target name, for directory use.
 ACX_NONCANONICAL_TARGET
 
+host_makefile_frag=/dev/null
+if test -d ${srcdir}/../config ; then
+case "${host}" in
+  *-interix[[3-9]]*)
+    host_makefile_frag="config/mh-interix"
+    ;;
+esac
+fi
+
+if test $host_makefile_frag != /dev/null; then
+  eval host_makefile_frag=${srcdir}/../$host_makefile_frag
+fi
+AC_SUBST_FILE(host_makefile_frag)
+
 # Specify the local prefix
 local_prefix=
 AC_ARG_WITH(local-prefix,
diff -rupN gcc.orig/fixincludes/Makefile.in gcc/fixincludes/Makefile.in
--- gcc.orig/fixincludes/Makefile.in	2011-04-06 17:01:09.000000000 -0700
+++ gcc/fixincludes/Makefile.in	2011-06-04 00:31:30.000000000 -0700
@@ -32,6 +32,11 @@ WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANT
 LDFLAGS = @LDFLAGS@
 INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
 FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
+FIXINC_CPPFLAGS =
+
+#### host specific makefile fragments come in here.
+@host_makefile_frag@
+###
 
 # Directory where sources are, from where we are.
 srcdir = @srcdir@
@@ -73,7 +78,7 @@ default : all
 # Now figure out from those variables how to compile and link.
 
 .c.o:
-	$(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
+	$(CC) -c $(CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(FIXINC_CPPFLAGS) $(FIXINC_CFLAGS) $<
 
 # The only suffixes we want for implicit rules are .c and .o.
 .SUFFIXES:

  reply	other threads:[~2011-06-04 20:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 17:01 How to patch fixincludes/Makefile for Interix? Douglas B Rupp
2011-06-03 17:17 ` Bruce Korb
2011-06-04 20:43   ` Douglas B Rupp [this message]
2011-06-05 17:19     ` [PATCH] fixincludes/Makefile for Interix Bruce Korb
2011-06-07  4:37       ` [PATCH] fixincludes/Makefile for Interix Rev 2 Douglas B Rupp
2011-06-07  7:20         ` Paolo Bonzini
2011-06-08  6:29           ` [PATCH] fixincludes/Makefile for Interix Rev 3 Douglas B Rupp
2011-06-08  7:47             ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DEA98E4.3070402@gnat.com \
    --to=rupp@gnat.com \
    --cc=bkorb@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).