diff --git a/build/unix/makelib.sh b/build/unix/makelib.sh
index a1296df3966ebb521ef3485a2405dfb05dff5bef..79d2ccfe8a5410f9b6048a31ac5cbc129e9b478d 100755
--- a/build/unix/makelib.sh
+++ b/build/unix/makelib.sh
@@ -108,8 +108,8 @@ elif [ $LD = "build/unix/wingcc_ld.sh" ]; then
          EXPLLNKCORE="-Llib -lCint"
       fi
    fi
-   line="$LD $SOFLAGS$SONAME $LDFLAGS -o $LIB -Wl,--whole-archive $OBJS \
-         -Wl,--no-whole-archive $EXTRA $EXPLLNKCORE"
+   line="$LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS \
+         $EXTRA $EXPLLNKCORE"
    echo $line
    $line
 else
diff --git a/build/unix/wingcc_ld.sh b/build/unix/wingcc_ld.sh
index 032071820bdb1ddeed7300406f1b1b8ef19a3572..5b9623072121cc1936244badde7fa99e171c5c93 100755
--- a/build/unix/wingcc_ld.sh
+++ b/build/unix/wingcc_ld.sh
@@ -12,25 +12,17 @@ while [ "$1" != "" ]; do
        dllname="$1"; dllbase=`basename $1`; 
        if [ "`echo $dllname | sed 's{^lib/.*\.dll${{'`" != "$dllname" ]; then
 	   isdll=1
-	   args="$args bin/$dllbase" 
+	   args="$args bin/$dllbase -Wl,--out-implib=$dllname.a" 
        else
 	   args="$args $1" 
        fi ;;
-   -Wl,--no-whole-archive) 
-      found_no_whole_archive=yes;
-      args="$args $1" ;;
    *) args="$args $1" ;;
    esac
    shift
 done
 
-ldversion=0`ld -V| head -n1 | sed 's/.* \([[:digit:]]*$\)/\1/' | egrep '[[:digit:]]+'`
-if [ $ldversion -lt 20030404 ]; then 
-    outimplib="-Wl,--out-implib,${dllname}.a"
-fi
-
 # 
-g++ $outimplib $args \
+g++ $args \
   && ( if [ "$isdll" != "0" ]; then \
           ln -sf ../bin/$dllbase $dllname; \
        fi )
diff --git a/config/Makefile.win32gcc b/config/Makefile.win32gcc
index e8a8d67fd3863fb282e5ed58900473ece4cb9a1b..fd339ecd28a6d3aa9322a9b440d83d20ae38389b 100755
--- a/config/Makefile.win32gcc
+++ b/config/Makefile.win32gcc
@@ -32,12 +32,10 @@ COMPILER      = gnu
 
 # Linker:
 LD            = build/unix/wingcc_ld.sh
-# -Wl,--dll-search-prefix=cyg -Wl,--force-exe-suffix
-LDFLAGS       = $(OPT) \
-                -Wl,--export-all-symbols -Wl,--export-dynamic \
-                -Wl,--enable-auto-import -Wl,-Bdynamic -L/usr/X11R6/lib \
+LDFLAGS       = $(OPT) --Wl,--enable-auto-image-base -Wl,--export-all-symbols \
+                -L/usr/X11R6/lib \
                 $(EXTRA_LDFLAGS)
-SOFLAGS       = -shared --enable-auto-image-base -Wl,-soname,
+SOFLAGS       = -shared -Wl,-soname,
 # that's what cygwin ld looks for when searching for shared libs
 SOEXT         = dll
 EXEEXT        = .exe