$OpenBSD: patch-corba_make_common_shared_Compiler-gcc_gmk,v 1.1 2008/03/19 18:05:43 kurt Exp $
--- corba/make/common/shared/Compiler-gcc.gmk.orig	Thu Nov  8 12:08:26 2007
+++ corba/make/common/shared/Compiler-gcc.gmk	Thu Nov  8 12:11:13 2007
@@ -55,6 +55,8 @@ ifeq ($(PLATFORM), windows)
 
 endif
 
+ifneq (,$(findstring $(PLATFORM), linux bsd))
+
 ifeq ($(PLATFORM), linux)
 
   # Settings specific to Linux
@@ -62,13 +64,16 @@ ifeq ($(PLATFORM), linux)
   CPP            = $(COMPILER_PATH)gcc -E
   # statically link libstdc++ before C++ ABI is stablized on Linux
   STATIC_CXX     = true
+else
+  STATIC_CXX     = false
+endif
   ifeq ($(STATIC_CXX),true)
     # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++"
     # We need to use gcc to statically link the C++ runtime. gcc and g++ use
     # the same subprocess to compile C++ files, so it is OK to build using gcc.
-    CXX            = $(COMPILER_PATH)gcc
+    CXX            = $(CC)
   else
-    CXX            = $(COMPILER_PATH)g++
+    CXX            ?= $(COMPILER_PATH)g++
   endif
   ifneq ("$(findstring sparc,$(ARCH))", "")
     # sparc or sparcv9
