From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11950 invoked by alias); 4 Jun 2011 20:43:51 -0000 Received: (qmail 11941 invoked by uid 22791); 4 Jun 2011 20:43:50 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 04 Jun 2011 20:43:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 9BCE42BB1D5; Sat, 4 Jun 2011 16:43:35 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qlc5BDediW9n; Sat, 4 Jun 2011 16:43:35 -0400 (EDT) Received: from [192.168.1.104] (dpc6682073249.direcpc.com [66.82.73.249]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id B8BB92BB1CF; Sat, 4 Jun 2011 16:43:32 -0400 (EDT) Message-ID: <4DEA98E4.3070402@gnat.com> Date: Sat, 04 Jun 2011 20:43:00 -0000 From: Douglas B Rupp User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Bruce Korb CC: gcc-patches@gcc.gnu.org Subject: [PATCH] fixincludes/Makefile for Interix References: <4DE9132E.3080205@gnat.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------020806040708040605050200" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00322.txt.bz2 This is a multi-part message in MIME format. --------------020806040708040605050200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 163 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 --------------020806040708040605050200 Content-Type: text/plain; name="fixinc.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fixinc.txt" Content-length: 1968 2011-06-04 Douglas B Rupp * 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: --------------020806040708040605050200--