summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in6
-rwxr-xr-xset_soenv.in1
-rw-r--r--solenv/gbuild/platform/IOS_ARM_GCC.mk11
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk10
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk29
-rw-r--r--solenv/gbuild/platform/macosx.mk27
-rw-r--r--solenv/gbuild/platform/unxgcc.mk11
7 files changed, 36 insertions, 59 deletions
diff --git a/configure.in b/configure.in
index 9cd71ede0544..1c9a08d965fd 100644
--- a/configure.in
+++ b/configure.in
@@ -6790,6 +6790,7 @@ dnl ***************************************
dnl Checking for bison and flex
dnl ***************************************
AC_PATH_PROG(BISON, bison)
+ANCIENT_BISON="NO"
if test -z "$BISON"; then
AC_MSG_ERROR([no bison found in \$PATH, install it])
else
@@ -6807,7 +6808,12 @@ else
else
AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
fi
+ if test "$_bison_longver" -lt 2000; then
+ ANCIENT_BISON="YES"
+ fi
fi
+AC_SUBST(ANCIENT_BISON)
+
AC_PATH_PROG(FLEX, flex)
if test -z "$FLEX"; then
AC_MSG_ERROR([no flex found in \$PATH, install it])
diff --git a/set_soenv.in b/set_soenv.in
index 8248af8ec6a5..d97560d59f2e 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1657,6 +1657,7 @@ ToFile( "DPKG", "@DPKG@", "e" );
ToFile( "PKGMK", "@PKGMK@", "e" );
ToFile( "GNUMAKE", "@GNUMAKE@", "e" );
ToFile( "GNUTAR", "@GNUTAR@", "e" );
+ToFile( "ANCIENT_BISON", "@ANCIENT_BISON@", "e" );
ToFile( "UPD", $UPD, "e" );
ToFile( "WORK_STAMP", $WORK_STAMP, "e" );
ToFile( "SOLARVER", $SOLARVER, "e" );
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index f8d44546aded..4a41bba1a971 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -81,17 +81,6 @@ gb_LinkTarget_LDFLAGS := \
$(subst -L../lib , ,$(SOLARLIB)) \
#man ld says: obsolete -Wl,-multiply_defined,suppress \
-# YaccTarget class
-
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(3)) && \
- $(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
-
-endef
-
-
# ObjCxxObject class
define gb_ObjCxxObject__command
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 78ce3bd18342..c0739f4129d8 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -124,16 +124,6 @@ define gb_Helper_convert_native
$(1)
endef
-# YaccTarget class
-
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(3)) && \
- $(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
-
-endef
-
# AsmObject class
gb_AsmObject_get_source = $(1)/$(2).s
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index f91b58e30d5b..03ac2a892194 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -25,6 +25,35 @@ gb_YACC := bison
gb_CLASSPATHSEP := :
+# YaccTarget class
+
+ifeq ($(ANCIENT_BISON),YES)
+#
+# There are ancient versions of bison out there, which do not handle
+# well .cxx extensions, nor do they support --defines=<file>. The
+# result is that the header is named <foo>.cxx.h instead of <foo>.hxx
+# so we queue a mv to rename the header accordingly.
+# One example is XCode versions 2.x, which are used on OSX ppc
+# machines.
+#
+define gb_YaccTarget__command
+$(call gb_Output_announce,$(2),$(true),YAC,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(3)) && \
+ $(gb_YACC) $(T_YACCFLAGS) -d -o $(3) $(1) && mv $(3).h $(4) )
+
+endef
+
+else
+define gb_YaccTarget__command
+$(call gb_Output_announce,$(2),$(true),YAC,3)
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(3)) && \
+ $(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
+
+endef
+endif
+
# use CC/CXX if they are nondefaults
ifneq ($(origin CC),default)
gb_CC := $(CC)
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 3beb09365ece..5be5001f22fd 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -101,33 +101,6 @@ endif
gb_COMPILERNOOPTFLAGS := -O0
-# YaccTarget class
-
-ifeq ($(CPUNAME),POWERPC)
-#
-# PowerPC mac version of bison is ancient. it does not handle well
-# .cxx extension nor does it support --defines=<file>
-# the result is that the header is named <foo>.cxx.h instead of <foo>.hxx
-# so we queue a mv to rename the header accordingly.
-#
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(3)) && \
- $(gb_YACC) $(T_YACCFLAGS) -d -o $(3) $(1) && mv $(3).h $(4) )
-
-endef
-
-else
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(3)) && \
- $(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
-
-endef
-endif
-
# ObjCxxObject class
define gb_ObjCxxObject__command
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 43d832ad169d..74034881924a 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -165,17 +165,6 @@ gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
gb_COMPILERNOOPTFLAGS := -O0
-# YaccTarget class
-
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(3)) && \
- $(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
-
-endef
-
-
# AsmObject class
gb_AsmObject_get_source = $(1)/$(2).s