Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
Date: 2004-04-20
Initial Package Version: 3.4.0
Origin: Jim Gifford
Description: Fixes all POSIX issues
 
--- gcc-3.4.0/contrib/test_summary.orig	2004-04-20 16:00:57.917563630 +0000
+++ gcc-3.4.0/contrib/test_summary	2004-04-20 16:01:08.408591909 +0000
@@ -106,7 +106,7 @@
     srcdir = configflags;
     sub(/\/configure .*/, "", srcdir);
     printf "LAST_UPDATED: ";
-    system("tail -1 " srcdir "/LAST_UPDATED");
+    system("tail -n 1 " srcdir "/LAST_UPDATED");
     print "";
 
     sub(/^[^ ]*\/configure */, " ", configflags);
--- gcc-3.4.0/gcc/configure.orig	2004-04-20 16:05:44.600692815 +0000
+++ gcc-3.4.0/gcc/configure	2004-04-20 16:06:08.439214166 +0000
@@ -10127,7 +10127,7 @@
   # and we got the correct data, then succeed.
   if test x$gcc_cv_objdump != x \
   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
-     | tail -3 > conftest.got \
+     | tail -n 3 > conftest.got \
   && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
     || cmp conftest.big conftest.got > /dev/null 2>&1; }
   then
--- gcc-3.4.0/gcc/configure.ac.orig	2004-04-20 17:03:10.695191732 +0000
+++ gcc-3.4.0/gcc/configure.ac	2004-04-20 17:03:26.653202613 +0000
@@ -2018,7 +2018,7 @@
   # and we got the correct data, then succeed.
   if test x$gcc_cv_objdump != x \
   && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
-     | tail -3 > conftest.got \
+     | tail -n 3 > conftest.got \
   && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
     || cmp conftest.big conftest.got > /dev/null 2>&1; }
   then
--- gcc-3.4.0/libjava/acinclude.m4.orig	2004-04-20 16:54:29.289869415 +0000
+++ gcc-3.4.0/libjava/acinclude.m4	2004-04-20 16:54:45.654803301 +0000
@@ -250,8 +250,8 @@
 AC_MSG_CHECKING(whether 'ld' is at least 2.13)
 LD_PROG=`$CC --print-prog-name=ld`
 LD_VERSION=`$LD_PROG --version`
-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
   LD_OK="ok"
 else
--- gcc-3.4.0/libjava/aclocal.m4.orig	2004-04-20 17:09:39.725862984 +0000
+++ gcc-3.4.0/libjava/aclocal.m4	2004-04-20 17:09:52.436464789 +0000
@@ -262,8 +262,8 @@
 AC_MSG_CHECKING(whether 'ld' is at least 2.13)
 LD_PROG=`$CC --print-prog-name=ld`
 LD_VERSION=`$LD_PROG --version`
-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
   LD_OK="ok"
 else
--- gcc-3.4.0/libjava/configure.orig	2004-04-20 17:10:14.813242970 +0000
+++ gcc-3.4.0/libjava/configure	2004-04-20 17:10:27.935767243 +0000
@@ -3015,8 +3015,8 @@
 echo "configure:3016: checking whether 'ld' is at least 2.13" >&5
 LD_PROG=`$CC --print-prog-name=ld`
 LD_VERSION=`$LD_PROG --version`
-LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
-LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
   LD_OK="ok"
 else
--- gcc-3.4.0/libstdc++-v3/scripts/check_survey.in.orig	2004-04-20 16:56:32.796729943 +0000
+++ gcc-3.4.0/libstdc++-v3/scripts/check_survey.in	2004-04-20 16:56:49.869531402 +0000
@@ -182,9 +182,9 @@
     function size_command()
     {
       case $1 in
-        TEXT)  TEXT=$(size -B $EXENAME | tail -1 | awk '{print $1}')  ;;
-        DATA)  DATA=$(size -B $EXENAME | tail -1 | awk '{print $2}')  ;;
-        SIZE)  SIZE=$(size -B $EXENAME | tail -1 | awk '{print $4}')  ;;
+        TEXT)  TEXT=$(size -B $EXENAME | tail -n 1 | awk '{print $1}')  ;;
+        DATA)  DATA=$(size -B $EXENAME | tail -n 1 | awk '{print $2}')  ;;
+        SIZE)  SIZE=$(size -B $EXENAME | tail -n 1 | awk '{print $4}')  ;;
       esac
     }
   else
--- gcc-3.4.0/libstdc++-v3/configure.orig	2004-04-20 16:50:32.492238513 +0000
+++ gcc-3.4.0/libstdc++-v3/configure	2004-04-20 16:51:02.087692861 +0000
@@ -7792,7 +7792,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
 
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
 
   glibcxx_gnu_ld_version=`echo $ldver | \
@@ -46973,7 +46973,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
 
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
 
   glibcxx_gnu_ld_version=`echo $ldver | \
@@ -49110,7 +49110,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
 
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
 
   glibcxx_gnu_ld_version=`echo $ldver | \
@@ -51120,7 +51120,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
 
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
 
   glibcxx_gnu_ld_version=`echo $ldver | \
@@ -53673,7 +53673,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
 
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
 
   glibcxx_gnu_ld_version=`echo $ldver | \
@@ -55639,7 +55639,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
 
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
 
   glibcxx_gnu_ld_version=`echo $ldver | \
@@ -57504,7 +57504,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
 
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
 
   glibcxx_gnu_ld_version=`echo $ldver | \
@@ -61182,7 +61182,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
 
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
 
   glibcxx_gnu_ld_version=`echo $ldver | \
--- gcc-3.4.0/libstdc++-v3/acinclude.m4.orig	2004-04-20 16:55:07.848645131 +0000
+++ gcc-3.4.0/libstdc++-v3/acinclude.m4	2004-04-20 16:55:27.565950996 +0000
@@ -273,7 +273,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
   changequote(,)
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
   changequote([,])
   glibcxx_gnu_ld_version=`echo $ldver | \
--- gcc-3.4.0/libstdc++-v3/aclocal.m4.orig	2004-04-20 16:58:33.170178915 +0000
+++ gcc-3.4.0/libstdc++-v3/aclocal.m4	2004-04-20 16:58:49.778067662 +0000
@@ -286,7 +286,7 @@
   # Start by getting the version number.  I think the libtool test already
   # does some of this, but throws away the result.
   changequote(,)
-  ldver=`$LD --version 2>/dev/null | head -1 | \
+  ldver=`$LD --version 2>/dev/null | head -n 1 | \
          sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
   changequote([,])
   glibcxx_gnu_ld_version=`echo $ldver | \
--- gcc-3.4.0/ltcf-gcj.sh.orig	2004-04-20 16:59:45.003722093 +0000
+++ gcc-3.4.0/ltcf-gcj.sh	2004-04-20 17:00:00.513816594 +0000
@@ -156,7 +156,7 @@
     # If the export-symbols file already is a .def file (1st line
     # is EXPORTS), use it as is.
     # If DATA tags from a recent dlltool are present, honour them!
-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
         cp $export_symbols $output_objdir/$soname-def;
       else
         echo EXPORTS > $output_objdir/$soname-def;
--- gcc-3.4.0/ltcf-c.sh.orig	2004-04-20 17:00:39.299550977 +0000
+++ gcc-3.4.0/ltcf-c.sh	2004-04-20 17:00:51.476269977 +0000
@@ -153,7 +153,7 @@
     # If the export-symbols file already is a .def file (1st line
     # is EXPORTS), use it as is.
     # If DATA tags from a recent dlltool are present, honour them!
-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
         cp $export_symbols $output_objdir/$soname-def;
       else
         echo EXPORTS > $output_objdir/$soname-def;
