From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9709 invoked by alias); 3 Jun 2011 17:17:00 -0000 Received: (qmail 9697 invoked by uid 22791); 3 Jun 2011 17:16:59 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Jun 2011 17:16:45 +0000 Received: by iwn10 with SMTP id 10so1856072iwn.20 for ; Fri, 03 Jun 2011 10:16:45 -0700 (PDT) Received: by 10.42.223.200 with SMTP id il8mr3626719icb.329.1307121405086; Fri, 03 Jun 2011 10:16:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.170.9 with HTTP; Fri, 3 Jun 2011 10:16:30 -0700 (PDT) In-Reply-To: <4DE9132E.3080205@gnat.com> References: <4DE9132E.3080205@gnat.com> From: Bruce Korb Date: Fri, 03 Jun 2011 17:17:00 -0000 Message-ID: Subject: Re: How to patch fixincludes/Makefile for Interix? To: Douglas B Rupp Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00256.txt.bz2 Hi Doug, On Fri, Jun 3, 2011 at 10:00 AM, Douglas B Rupp wrote: > > I've been working on a resurrection patch for Interix, one remaining problem > is fixincludes/fixincl.c must be compiled on native Interix with > -D_ALL_SOURCE in order to find the getpagesize prototype. > > This works (taking some liberties with diff...): > > fixincludes/Makefile.in > -FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES) > +FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES) -D_ALL_SOURCE > > Obviously unacceptable in general. Obviously. > Fixincludes ignores a config/mh-interix, so adding > FIXINC_CFLAGS += -D_ALL_SOURCE doesn't work. > > What is the correct solution? Any advice would be greatly appreciated. Without digging into makefile magic, it would seem to me that you'd want to jigger Makefile.in to source $(top_srcdir)/config/mh-$(target) and use FIXINC_CPPFLAGS (this being a pre-processor flag).