Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2005-08-27 Initial Package Version: 4.0.1 Origin: Jim Gifford Upstream Status: On Hold Description: Makes GCC Posix Compliant diff -Naur gcc-4.0.1.orig/contrib/test_summary gcc-4.0.1/contrib/test_summary --- gcc-4.0.1.orig/contrib/test_summary 2004-08-26 05:51:22.000000000 +0000 +++ gcc-4.0.1/contrib/test_summary 2005-08-27 21:06:51.000000000 +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); diff -Naur gcc-4.0.1.orig/gcc/configure gcc-4.0.1/gcc/configure --- gcc-4.0.1.orig/gcc/configure 2005-07-07 20:44:40.000000000 +0000 +++ gcc-4.0.1/gcc/configure 2005-08-27 21:06:51.000000000 +0000 @@ -13511,7 +13511,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 diff -Naur gcc-4.0.1.orig/gcc/configure.ac gcc-4.0.1/gcc/configure.ac --- gcc-4.0.1.orig/gcc/configure.ac 2005-06-01 08:14:33.000000000 +0000 +++ gcc-4.0.1/gcc/configure.ac 2005-08-27 21:06:51.000000000 +0000 @@ -2214,7 +2214,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 diff -Naur gcc-4.0.1.orig/libjava/acinclude.m4 gcc-4.0.1/libjava/acinclude.m4 --- gcc-4.0.1.orig/libjava/acinclude.m4 2004-09-23 01:14:00.000000000 +0000 +++ gcc-4.0.1/libjava/acinclude.m4 2005-08-27 21:06:51.000000000 +0000 @@ -17,8 +17,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 diff -Naur gcc-4.0.1.orig/libjava/configure gcc-4.0.1/libjava/configure --- gcc-4.0.1.orig/libjava/configure 2005-07-07 20:44:40.000000000 +0000 +++ gcc-4.0.1/libjava/configure 2005-08-27 21:06:51.000000000 +0000 @@ -5933,8 +5933,8 @@ echo $ECHO_N "checking whether 'ld' is at least 2.13... $ECHO_C" >&6 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 diff -Naur gcc-4.0.1.orig/libstdc++-v3/acinclude.m4 gcc-4.0.1/libstdc++-v3/acinclude.m4 --- gcc-4.0.1.orig/libstdc++-v3/acinclude.m4 2005-06-23 09:23:59.000000000 +0000 +++ gcc-4.0.1/libstdc++-v3/acinclude.m4 2005-08-27 21:06:51.000000000 +0000 @@ -241,7 +241,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 | \ diff -Naur gcc-4.0.1.orig/libstdc++-v3/configure gcc-4.0.1/libstdc++-v3/configure --- gcc-4.0.1.orig/libstdc++-v3/configure 2005-06-23 09:24:00.000000000 +0000 +++ gcc-4.0.1/libstdc++-v3/configure 2005-08-27 21:06:52.000000000 +0000 @@ -9880,7 +9880,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 | \ @@ -55252,7 +55252,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 | \ @@ -76923,7 +76923,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 | \ @@ -79292,7 +79292,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 | \ @@ -81537,7 +81537,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 | \ @@ -84550,7 +84550,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 | \ @@ -86748,7 +86748,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 | \ @@ -88995,7 +88995,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 | \ @@ -91603,7 +91603,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 | \ diff -Naur gcc-4.0.1.orig/ltcf-c.sh gcc-4.0.1/ltcf-c.sh --- gcc-4.0.1.orig/ltcf-c.sh 2005-05-14 00:42:34.000000000 +0000 +++ gcc-4.0.1/ltcf-c.sh 2005-08-27 21:07:08.000000000 +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; diff -Naur gcc-4.0.1.orig/ltcf-gcj.sh gcc-4.0.1/ltcf-gcj.sh --- gcc-4.0.1.orig/ltcf-gcj.sh 2005-05-14 00:42:34.000000000 +0000 +++ gcc-4.0.1/ltcf-gcj.sh 2005-08-27 21:07:08.000000000 +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;