Fix build on Darwin 9 and possibly some other platforms.

This commit is contained in:
pho 2014-01-10 09:40:44 +00:00
parent 86ebfe6e39
commit f1fff5c5f8
2 changed files with 22 additions and 1 deletions

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.38 2013/12/06 12:02:46 wiz Exp $
$NetBSD: distinfo,v 1.39 2014/01/10 09:40:44 pho Exp $
SHA1 (bison-3.0.2.tar.xz) = aeb1e3544007124009e5203afe86a5676580d444
RMD160 (bison-3.0.2.tar.xz) = 0a945ce5710a79332fbe594255305f244c24dd74
Size (bison-3.0.2.tar.xz) = 1927296 bytes
SHA1 (patch-Makefile.in) = 3baa1974d877e921c88b30c730739f8350599060
SHA1 (patch-lib_isnan.c) = c5d2603447064c95e8bbc75a24c09366b752bad6

View file

@ -0,0 +1,20 @@
$NetBSD: patch-Makefile.in,v 1.3 2014/01/10 09:40:44 pho Exp $
As we don't have a separate directory for builddir, AM_CPPFLAGS gets
resolved to "-I. -Ilib -I. -I./lib". This causes a trouble with some C
preprocessors because headers like lib/unistd.in.h use "#include_next"
directive and they all result in an infinite recursion. I think the
semantics of the combination of duplicate -I and "#include_next" is
not defined but I'm not sure.
--- Makefile.in.orig 2013-12-05 13:58:54.000000000 +0000
+++ Makefile.in
@@ -2191,7 +2191,7 @@ AM_YFLAGS = -d -v -Werror -Wall -Wno-yac
# Initialization before completion by local.mk's.
AM_CFLAGS = $(WARN_CFLAGS)
# Find builddir/src/scan-code.c etc.
-AM_CPPFLAGS = -I. -Ilib -I$(top_srcdir) -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
# statements but through direct file reference. Therefore this snippet must be