$NetBSD: patch-ae,v 1.5 2013/06/15 09:31:05 jperkin Exp $

Additional BSD support.

--- hotspot/make/bsd/makefiles/gcc.make.orig	2014-01-25 07:34:04.000000000 +0000
+++ hotspot/make/bsd/makefiles/gcc.make
@@ -23,7 +23,7 @@
 #
 
 OS_VENDOR = $(shell uname -s)
-
+LFLAGS+=-lffi
 #------------------------------------------------------------------------
 # CC, CXX & AS
 
@@ -32,8 +32,6 @@ ifeq ($(SPEC),)
   # When cross-compiling the ALT_COMPILER_PATH points
   # to the cross-compilation toolset
   ifdef CROSS_COMPILE_ARCH
-    CXX = $(ALT_COMPILER_PATH)/g++
-    CC  = $(ALT_COMPILER_PATH)/gcc
     HOSTCXX = g++
     HOSTCC  = gcc
   else ifneq ($(OS_VENDOR), Darwin)
@@ -164,9 +162,9 @@ else
 endif
 
 # Compiler warnings are treated as errors
-ifneq ($(COMPILER_WARNINGS_FATAL),false)
-  WARNINGS_ARE_ERRORS = -Werror
-endif
+#ifneq ($(COMPILER_WARNINGS_FATAL),false)
+#  WARNINGS_ARE_ERRORS = -Werror
+#endif
 
 # Except for a few acceptable ones
 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
@@ -243,6 +241,15 @@ MAPFLAG = -Xlinker --version-script=FILE
 #
 # Shared Library
 #
+
+ifeq ($(OS_VENDOR), NetBSD)
+# XXX tnn fixme: -lgcc_s seems to be needed on NetBSD.
+LFLAGS += -lgcc_s
+endif
+
+# XXX tnn fixme: this probably should go someplace else.
+CFLAGS += -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
+
 ifeq ($(OS_VENDOR), Darwin)
   # Standard linker flags
   LFLAGS +=
