Index: trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk	(revision 6603)
+++ trunk/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk	(revision 6604)
@@ -26,5 +26,6 @@
  ifneq ($(BUILD_TARGET),win)
   LIBRARIES += \
-	VBoxGuestR3Lib
+	VBoxGuestR3Lib \
+	VBoxGuestR3LibShared
  endif
 else
@@ -49,4 +50,5 @@
    LIBRARIES += \
   	VBoxGuestR3Lib \
+	VBoxGuestR3LibShared \
   	VBoxGuestR3LibXFree86 \
   	VBoxGuestR3LibLinux
@@ -108,4 +110,12 @@
 	VBoxGuestR3LibTime.cpp \
 	VBoxGuestR3LibVideo.cpp
+
+#
+# VBoxGuestR3LibShared - a PIC variant of VBoxGuestR3Lib for linking into .so/.dll/.dylib.
+#
+VBoxGuestR3LibShared_TEMPLATE = VBOXGUESTR3DLL
+VBoxGuestR3LibShared_DEFS    := $(VBoxGuestR3Lib_DEFS)
+VBoxGuestR3LibShared_SOURCES := $(VBoxGuestR3Lib_SOURCES)
+VBoxGuestR3LibShared_INST    := $(INST_ADDITIONS_LIB)
 
 
Index: trunk/src/VBox/Additions/x11/xgraphics/Makefile.kmk
===================================================================
--- trunk/src/VBox/Additions/x11/xgraphics/Makefile.kmk	(revision 6603)
+++ trunk/src/VBox/Additions/x11/xgraphics/Makefile.kmk	(revision 6604)
@@ -25,7 +25,4 @@
 # for BUILD_TARGET=l4
 SUFF_DLL = .so
-
-## @todo clean up this by switching to VBoxGuestR3Lib
-VBOX_LIB_VBGL_R3 := $(PATH_LIB)/VBoxGuestR3LibLinux.a
 
 vboxvideo_drv_TEMPLATE = VBOXLNX32GUESTR3EXE
@@ -124,12 +121,12 @@
 	vboxutils-new.c
 vboxvideo_drv_70_LIBS = \
-	$(VBOX_LIB_VBGL_R3) \
+	$(VBOX_LIB_VBGL_R3_SHARED) \
 	$(VBOX_LIB_IPRT_GUEST_R3_MINI) \
-	$(VBOX_LIB_VBGL_R3)
+	$(VBOX_LIB_VBGL_R3_SHARED)
 
 vboxvideo_drv_71_TEMPLATE = VBOXLNX32GUESTR3DLLNOCPP
 vboxvideo_drv_71_DEFS := $(vboxvideo_drv_70_DEFS)
 vboxvideo_drv_71_CFLAGS.linux := $(vboxvideo_drv_70_CFLAGS.linux)
-vboxvideo_drv_71_LDFLAGS = -s 
+vboxvideo_drv_71_LDFLAGS = -s
 vboxvideo_drv_71_INCS = \
 	../x11include/7.1 \
@@ -140,12 +137,12 @@
 	vboxutils-new.c
 vboxvideo_drv_71_LIBS = \
-	$(VBOX_LIB_VBGL_R3) \
+	$(VBOX_LIB_VBGL_R3_SHARED) \
 	$(VBOX_LIB_IPRT_GUEST_R3_MINI) \
-	$(VBOX_LIB_VBGL_R3)
+	$(VBOX_LIB_VBGL_R3_SHARED)
 
 vboxvideo_drv_13_TEMPLATE = VBOXLNX32GUESTR3DLLNOCPP
 vboxvideo_drv_13_DEFS := $(vboxvideo_drv_70_DEFS)
 vboxvideo_drv_13_CFLAGS.linux := $(vboxvideo_drv_70_CFLAGS.linux)
-vboxvideo_drv_13_LDFLAGS = -s 
+vboxvideo_drv_13_LDFLAGS = -s
 vboxvideo_drv_13_INCS = \
 	../x11include/1.3 \
@@ -156,12 +153,12 @@
 	vboxutils-new.c
 vboxvideo_drv_13_LIBS = \
-	$(VBOX_LIB_VBGL_R3) \
+	$(VBOX_LIB_VBGL_R3_SHARED) \
 	$(VBOX_LIB_IPRT_GUEST_R3_MINI) \
-	$(VBOX_LIB_VBGL_R3)
+	$(VBOX_LIB_VBGL_R3_SHARED)
 
 vboxvideo_drv_14_TEMPLATE = VBOXLNX32GUESTR3DLLNOCPP
 vboxvideo_drv_14_DEFS := $(vboxvideo_drv_70_DEFS)
 vboxvideo_drv_14_CFLAGS.linux := $(vboxvideo_drv_70_CFLAGS.linux)
-vboxvideo_drv_14_LDFLAGS = -s 
+vboxvideo_drv_14_LDFLAGS = -s
 vboxvideo_drv_14_INCS = \
 	../x11include/1.4 \
@@ -174,7 +171,7 @@
 	vboxutils-new.c
 vboxvideo_drv_14_LIBS = \
-	$(VBOX_LIB_VBGL_R3) \
+	$(VBOX_LIB_VBGL_R3_SHARED) \
 	$(VBOX_LIB_IPRT_GUEST_R3_MINI) \
-	$(VBOX_LIB_VBGL_R3)
+	$(VBOX_LIB_VBGL_R3_SHARED)
 endif
 
@@ -194,7 +191,7 @@
 	vboxutils-new.c
 vboxvideo_drv_LIBS = \
-	$(VBOX_LIB_VBGL_R3) \
+	$(VBOX_LIB_VBGL_R3_SHARED) \
 	$(VBOX_LIB_IPRT_GUEST_R3_MINI) \
-	$(VBOX_LIB_VBGL_R3)
+	$(VBOX_LIB_VBGL_R3_SHARED)
 endif
 
Index: trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- trunk/src/VBox/Runtime/Makefile.kmk	(revision 6603)
+++ trunk/src/VBox/Runtime/Makefile.kmk	(revision 6604)
@@ -527,11 +527,6 @@
 #                      for X11 drivers.
 #
-ifeq ($(BUILD_TARGET),linux) ## @todo elimiate this by fixing VBOXGUESTR3LIB/DLL/EXE. What about NOCPP like the x11 bits?
-RuntimeGuestR3Mini_TEMPLATE             := VBOXLNX32GUESTR3LIB
-RuntimeGuestR3Mini_INST                  = $(INST_ADDITIONS_LIB)
-RuntimeGuestR3Mini_CXXFLAGS.linux        = -fno-exceptions
-else
 RuntimeGuestR3Mini_TEMPLATE             := VBOXGUESTR3DLL
-endif
+RuntimeGuestR3Mini_INST                 := $(INST_ADDITIONS_LIB)
 RuntimeGuestR3Mini_SDKS.win             := $(RuntimeR3_SDKS.win)
 RuntimeGuestR3Mini_DEFS                 := $(filter-out RTCRITSECT_STRICT, $(RuntimeR3_DEFS)) \
