-test "$libc" = uclibc && {
-cat .config \
-| grep -v ^CONFIG_SELINUX= \
-| grep -v ^CONFIG_EFENCE= \
-| grep -v ^CONFIG_DMALLOC= \
-| grep -v ^CONFIG_BUILD_LIBBUSYBOX= \
-| grep -v ^CONFIG_PAM= \
-| grep -v ^CONFIG_TASKSET= \
-| grep -v ^CONFIG_UNICODE_SUPPORT= \
-| grep -v ^CONFIG_PIE= \
-| grep -v CONFIG_STATIC \
-| grep -v CONFIG_CROSS_COMPILER_PREFIX \
-| cat >.config.new
-mv .config.new .config
-echo 'CONFIG_CROSS_COMPILER_PREFIX="'"$uclibc_cross"'"' >>.config
-echo 'CONFIG_STATIC=y' >>.config
-}
+# If glibc, don't build static
+if test x"$LIBC" = x"glibc"; then
+ cat .config \
+ | grep -v CONFIG_STATIC \
+ >.config.new
+ mv .config.new .config
+ echo '# CONFIG_STATIC is not set' >>.config
+fi
+
+# If glibc, build static, and remove some things
+# likely to not work on uclibc.
+if test x"$LIBC" = x"uclibc"; then
+ cat .config \
+ | grep -v CONFIG_STATIC \
+ | grep -v CONFIG_BUILD_LIBBUSYBOX \
+ | grep -v CONFIG_TASKSET \
+ | grep -v CONFIG_UNICODE_SUPPORT \
+ | grep -v CONFIG_PIE \
+ >.config.new
+ mv .config.new .config
+ echo 'CONFIG_STATIC=y' >>.config
+fi