$NetBSD: patch-ab,v 1.2 2003/12/05 09:16:33 adam Exp $

--- common.make.orig	2003-09-16 05:43:06.000000000 +0200
+++ common.make
@@ -275,12 +275,16 @@ ifeq ($(REMOVE_EMPTY_DIRS),yes)
  # default - by default we put all directories in compilation commands.
  GNUSTEP_HEADERS_FLAGS = \
    $(addprefix -I,$(foreach dir,$(GNUSTEP_HEADERS_DIRS),$(remove_if_empty)))
+comma:= ,
  GNUSTEP_LIBRARIES_FLAGS = \
-   $(addprefix -L,$(foreach dir,$(GNUSTEP_LIBRARIES_DIRS),$(remove_if_empty)))
+   $(addprefix -L,$(foreach dir,$(GNUSTEP_LIBRARIES_DIRS),$(remove_if_empty))) \
+   $(addprefix -Wl$(comma)-R,$(foreach dir,$(GNUSTEP_LIBRARIES_DIRS),$(remove_if_empty)))
 else
+comma:= ,
  # Default case, just add -I / -L
  GNUSTEP_HEADERS_FLAGS = $(addprefix -I,$(GNUSTEP_HEADERS_DIRS))
  GNUSTEP_LIBRARIES_FLAGS = $(addprefix -L,$(GNUSTEP_LIBRARIES_DIRS))
+ GNUSTEP_LIBRARIES_FLAGS+= $(addprefix -Wl$(comma)-R,$(GNUSTEP_LIBRARIES_DIRS))
 endif
 
 #
