Index: general/genutils/sharutils.xml
===================================================================
--- general/genutils/sharutils.xml	(revision 0a5eff8d32b87145c842135a4b141d001f54c8ba)
+++ general/genutils/sharutils.xml	(revision 6c183b56a645125c668d1188cd5c9b138d51e121)
@@ -87,5 +87,5 @@
 echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h &amp;&amp;
 
-CFLAGS=-fcommon ./configure --prefix=/usr &amp;&amp;
+CFLAGS="$CFLAGS -fcommon" ./configure --prefix=/usr &amp;&amp;
 make</userinput></screen>
 
Index: general/prog/openjdk.xml
===================================================================
--- general/prog/openjdk.xml	(revision 0a5eff8d32b87145c842135a4b141d001f54c8ba)
+++ general/prog/openjdk.xml	(revision 6c183b56a645125c668d1188cd5c9b138d51e121)
@@ -243,18 +243,18 @@
     </para>
 
-<screen><userinput>unset JAVA_HOME                             &amp;&amp;
-bash configure --enable-unlimited-crypto    \
-               --with-extra-cflags=-fcommon \
-               --disable-warnings-as-errors \
-               --with-stdc++lib=dynamic     \
-               --with-giflib=system         \
-               --with-jtreg=$PWD/jtreg      \
-               --with-lcms=system           \
-               --with-libjpeg=system        \
-               --with-libpng=system         \
-               --with-zlib=system           \
-               --with-version-build="&openjdk-build;"     \
-               --with-version-pre=""        \
-               --with-version-opt=""        \
+<screen><userinput>unset JAVA_HOME                                       &amp;&amp;
+bash configure --enable-unlimited-crypto              \
+               --with-extra-cflags="$CFLAGS -fcommon" \
+               --disable-warnings-as-errors           \
+               --with-stdc++lib=dynamic               \
+               --with-giflib=system                   \
+               --with-jtreg=$PWD/jtreg                \
+               --with-lcms=system                     \
+               --with-libjpeg=system                  \
+               --with-libpng=system                   \
+               --with-zlib=system                     \
+               --with-version-build="&openjdk-build;"               \
+               --with-version-pre=""                  \
+               --with-version-opt=""                  \
                --with-cacerts-file=/etc/pki/tls/java/cacerts &amp;&amp;
 make images</userinput></screen>
Index: networking/netprogs/ntp.xml
===================================================================
--- networking/netprogs/ntp.xml	(revision 0a5eff8d32b87145c842135a4b141d001f54c8ba)
+++ networking/netprogs/ntp.xml	(revision 6c183b56a645125c668d1188cd5c9b138d51e121)
@@ -136,5 +136,5 @@
         Its a "hack" for gcc-10
 -->
-<screen><userinput>./configure CFLAGS="-O2 -g -fPIC -fcommon" \
+<screen><userinput>./configure CFLAGS="-O2 -g -fPIC -fcommon $CFLAGS" \
             --prefix=/usr         \
             --bindir=/usr/sbin    \
Index: postlfs/filesystems/initramfs.xml
===================================================================
--- postlfs/filesystems/initramfs.xml	(revision 0a5eff8d32b87145c842135a4b141d001f54c8ba)
+++ postlfs/filesystems/initramfs.xml	(revision 6c183b56a645125c668d1188cd5c9b138d51e121)
@@ -76,8 +76,8 @@
   local file
 
-  if [ "$2" == "lib" ]; then
-    file=$(PATH=/lib:/usr/lib type -p $1)
+  if [ "$2" = "lib" ]; then
+    file=$(find /lib /usr/lib -maxdepth 1 -name $1 | head -n 1)
   else
-    file=$(type -p $1)
+    file=$(find /bin /usr/bin /sbin /usr/sbin -maxdepth 1 -name $1 | head -n 1)
   fi
 
@@ -177,4 +177,11 @@
 if [ -x /sbin/lvm ] ; then sbinfiles="$sbinfiles lvm dmsetup"; fi
 
+# Add mdadm if present
+if [ -x /sbin/mdadm ] ; then sbinfiles="$sbinfiles mdadm"; fi
+
+# Add udevd if present in /sbin (newer versions of udev have it in
+# /lib/udev)
+if [ -x /sbin/udevd ] ; then sbinfiles="$sbinfiles udevd"; fi
+
 for f in $sbinfiles ; do
   ldd /sbin/$f | sed "s/\t//" | cut -d " " -f1 &gt;&gt; $unsorted
@@ -194,4 +201,6 @@
   ln -s kmod $WDIR/bin/insmod
 fi
+
+ln -s bash $WDIR/bin/sh
 
 # Add lvm symlinks if appropriate
Index: postlfs/filesystems/jfs.xml
===================================================================
--- postlfs/filesystems/jfs.xml	(revision 0a5eff8d32b87145c842135a4b141d001f54c8ba)
+++ postlfs/filesystems/jfs.xml	(revision 6c183b56a645125c668d1188cd5c9b138d51e121)
@@ -104,5 +104,5 @@
 sed -i "/ioctl.h/a#include &lt;sys/sysmacros.h&gt;" libfs/devices.c   &amp;&amp;
 
-CFLAGS=-fcommon ./configure &amp;&amp;
+CFLAGS="$CFLAGS -fcommon" ./configure &amp;&amp;
 make</userinput></screen>
 
Index: postlfs/shells/tcsh.xml
===================================================================
--- postlfs/shells/tcsh.xml	(revision 0a5eff8d32b87145c842135a4b141d001f54c8ba)
+++ postlfs/shells/tcsh.xml	(revision 6c183b56a645125c668d1188cd5c9b138d51e121)
@@ -100,5 +100,6 @@
     </para>
 
-<screen><userinput>CFLAGS=-fcommon ./configure --prefix=/usr --bindir=/bin &amp;&amp;
+<screen><userinput>CFLAGS="$CFLAGS -fcommon" \
+./configure --prefix=/usr --bindir=/bin &amp;&amp;
 
 make &amp;&amp;
Index: x/lib/freeglut.xml
===================================================================
--- x/lib/freeglut.xml	(revision 0a5eff8d32b87145c842135a4b141d001f54c8ba)
+++ x/lib/freeglut.xml	(revision 6c183b56a645125c668d1188cd5c9b138d51e121)
@@ -104,6 +104,6 @@
 cd    build &amp;&amp;
 
+CFLAGS="$CFLAGS -fcommon"               \
 cmake -DCMAKE_INSTALL_PREFIX=/usr       \
-      -DCMAKE_C_FLAGS=-fcommon          \<!-- devs:See command expl below -->
       -DCMAKE_BUILD_TYPE=Release        \
       -DFREEGLUT_BUILD_DEMOS=OFF        \
@@ -131,5 +131,5 @@
      when upstream fix is applied. -->
     <para>
-      <parameter>-DCMAKE_C_FLAGS=-fcommon</parameter>: Fix building with
+      <parameter>CFLAGS="$CFLAGS -fcommon"</parameter>: Fix building with
       GCC-10 and later.
     </para>
