This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to patch fixincludes/Makefile for Interix?


Hi Doug,

On Fri, Jun 3, 2011 at 10:00 AM, Douglas B Rupp <rupp@gnat.com> 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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]