Submitted By: Jim Gifford (jim at cross-lfs dot org) Date: 04-21-2009 Initial Package Version: 4.4.0 Origin: Jim Gifford Rediffed against 4.1.0 by Chris Staub Rediffed against 4.1.2 by Jim Gifford Rediffed and additions against 4.2.0 by Joe Ciccone Rediffed against 4.3.0 by Joe Ciccone Rediffed against 4.3.3 by Jim Gifford Rediffed against 4.4.0 by Jim Gifford Upstream Status: On Hold Description: Makes GCC Posix Compliant diff -Naur gcc-4.4.0.orig/contrib/patch_tester.sh gcc-4.4.0/contrib/patch_tester.sh --- gcc-4.4.0.orig/contrib/patch_tester.sh 2008-05-08 08:14:47.000000000 -0700 +++ gcc-4.4.0/contrib/patch_tester.sh 2009-04-21 09:56:06.009963403 -0700 @@ -324,7 +324,7 @@ MAKE_ARGS="$default_make $MAKE_ARGS" if ! eval make $dashj $MAKE_ARGS &> $1/bootstrap ; then report "bootstrap with `basename $1` version failed with last lines:" - tail -30 $1/bootstrap > $1/last_bootstrap + tail -n 30 $1/bootstrap > $1/last_bootstrap freport $1/last_bootstrap report "grep --context=20 Error bootstrap:" grep --context=20 Error $1/bootstrap > $1/bootstrap_error @@ -464,7 +464,7 @@ # After selfexec, $TESTING is already set up. if [ -d $TESTING ]; then # The only file in $TESTING is the patch. - PATCH=`ls -rt -1 $TESTING | head -1` + PATCH=`ls -rt -1 $TESTING | head -n 1` PATCH=$TESTING/$PATCH if [ -f $PATCH ]; then bootntest_patched && bootntest_pristine && compare_passes @@ -474,7 +474,7 @@ firstpatch=true while true; do - PATCH=`ls -rt -1 $PATCHES | head -1` + PATCH=`ls -rt -1 $PATCHES | head -n 1` if [ x$PATCH = x ]; then if [ $stop = true ]; then if [ $firstpatch = true ]; then diff -Naur gcc-4.4.0.orig/contrib/test_summary gcc-4.4.0/contrib/test_summary --- gcc-4.4.0.orig/contrib/test_summary 2007-02-09 16:30:46.000000000 -0800 +++ gcc-4.4.0/contrib/test_summary 2009-04-21 09:55:36.820093030 -0700 @@ -107,7 +107,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.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure --- gcc-4.4.0.orig/gcc/configure 2009-03-24 10:46:03.000000000 -0700 +++ gcc-4.4.0/gcc/configure 2009-04-21 09:55:36.828093310 -0700 @@ -21750,7 +21750,7 @@ # Therefore, use diff -b for the comparisons. 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 \ && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ || diff -b conftest.big conftest.got > /dev/null 2>&1; } then diff -Naur gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac --- gcc-4.4.0.orig/gcc/configure.ac 2009-03-24 10:46:03.000000000 -0700 +++ gcc-4.4.0/gcc/configure.ac 2009-04-21 09:55:36.840094427 -0700 @@ -2351,7 +2351,7 @@ # Therefore, use diff -b for the comparisons. 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 \ && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ || diff -b conftest.big conftest.got > /dev/null 2>&1; } then diff -Naur gcc-4.4.0.orig/gcc/testsuite/ada/acats/run_all.sh gcc-4.4.0/gcc/testsuite/ada/acats/run_all.sh --- gcc-4.4.0.orig/gcc/testsuite/ada/acats/run_all.sh 2006-09-14 03:12:03.000000000 -0700 +++ gcc-4.4.0/gcc/testsuite/ada/acats/run_all.sh 2009-04-21 09:55:36.848094706 -0700 @@ -68,7 +68,7 @@ ls ${i}?.adb > ${i}.lst 2> /dev/null ls ${i}*m.adb >> ${i}.lst 2> /dev/null ls ${i}.adb >> ${i}.lst 2> /dev/null - main=`tail -1 ${i}.lst` + main=`tail -n 1 ${i}.lst` } EXTERNAL_OBJECTS="" diff -Naur gcc-4.4.0.orig/libgomp/acinclude.m4 gcc-4.4.0/libgomp/acinclude.m4 --- gcc-4.4.0.orig/libgomp/acinclude.m4 2009-01-31 09:09:24.000000000 -0800 +++ gcc-4.4.0/libgomp/acinclude.m4 2009-04-21 09:56:53.993037854 -0700 @@ -152,7 +152,7 @@ libgomp_ld_is_gold=yes fi changequote(,) - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` changequote([,]) libgomp_gnu_ld_version=`echo $ldver | \ diff -Naur gcc-4.4.0.orig/libgomp/configure gcc-4.4.0/libgomp/configure --- gcc-4.4.0.orig/libgomp/configure 2009-04-21 02:08:08.000000000 -0700 +++ gcc-4.4.0/libgomp/configure 2009-04-21 09:56:33.615732086 -0700 @@ -18486,7 +18486,7 @@ libgomp_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` libgomp_gnu_ld_version=`echo $ldver | \ diff -Naur gcc-4.4.0.orig/libjava/classpath/configure gcc-4.4.0/libjava/classpath/configure --- gcc-4.4.0.orig/libjava/classpath/configure 2009-03-16 05:08:23.000000000 -0700 +++ gcc-4.4.0/libjava/classpath/configure 2009-04-21 09:55:36.872096103 -0700 @@ -29072,7 +29072,7 @@ fi # shortcircut to system "stdint.h" # ------------------ PREPARE VARIABLES ------------------------------ if test "$GCC" = "yes" ; then -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` +ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1` else ac_cv_stdint_message="using $CC" fi diff -Naur gcc-4.4.0.orig/libjava/classpath/ltcf-c.sh gcc-4.4.0/libjava/classpath/ltcf-c.sh --- gcc-4.4.0.orig/libjava/classpath/ltcf-c.sh 2006-01-17 10:09:40.000000000 -0800 +++ gcc-4.4.0/libjava/classpath/ltcf-c.sh 2009-04-21 09:55:36.872096103 -0700 @@ -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.4.0.orig/libjava/classpath/ltcf-gcj.sh gcc-4.4.0/libjava/classpath/ltcf-gcj.sh --- gcc-4.4.0.orig/libjava/classpath/ltcf-gcj.sh 2005-09-23 14:31:04.000000000 -0700 +++ gcc-4.4.0/libjava/classpath/ltcf-gcj.sh 2009-04-21 09:55:36.872096103 -0700 @@ -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; diff -Naur gcc-4.4.0.orig/libjava/classpath/m4/ax_create_stdint_h.m4 gcc-4.4.0/libjava/classpath/m4/ax_create_stdint_h.m4 --- gcc-4.4.0.orig/libjava/classpath/m4/ax_create_stdint_h.m4 2007-05-19 13:44:43.000000000 -0700 +++ gcc-4.4.0/libjava/classpath/m4/ax_create_stdint_h.m4 2009-04-21 09:55:36.872096103 -0700 @@ -217,7 +217,7 @@ fi # shortcircut to system "stdint.h" # ------------------ PREPARE VARIABLES ------------------------------ if test "$GCC" = "yes" ; then -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` +ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1` else ac_cv_stdint_message="using $CC" fi diff -Naur gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure --- gcc-4.4.0.orig/libjava/configure 2009-04-21 02:08:08.000000000 -0700 +++ gcc-4.4.0/libjava/configure 2009-04-21 09:55:36.884096662 -0700 @@ -18919,8 +18919,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.4.0.orig/libjava/mingwld.m4 gcc-4.4.0/libjava/mingwld.m4 --- gcc-4.4.0.orig/libjava/mingwld.m4 2005-08-22 15:36:35.000000000 -0700 +++ gcc-4.4.0/libjava/mingwld.m4 2009-04-21 09:55:36.892097500 -0700 @@ -3,8 +3,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.4.0.orig/libstdc++-v3/acinclude.m4 gcc-4.4.0/libstdc++-v3/acinclude.m4 --- gcc-4.4.0.orig/libstdc++-v3/acinclude.m4 2009-02-23 12:42:53.000000000 -0800 +++ gcc-4.4.0/libstdc++-v3/acinclude.m4 2009-04-21 09:57:46.768419611 -0700 @@ -238,7 +238,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` changequote([,]) glibcxx_gnu_ld_version=`echo $ldver | \ diff -Naur gcc-4.4.0.orig/libstdc++-v3/configure gcc-4.4.0/libstdc++-v3/configure --- gcc-4.4.0.orig/libstdc++-v3/configure 2009-03-01 09:49:31.000000000 -0800 +++ gcc-4.4.0/libstdc++-v3/configure 2009-04-21 09:57:27.527186478 -0700 @@ -23489,7 +23489,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -42055,7 +42055,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -76333,7 +76333,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -76645,7 +76645,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -77328,7 +77328,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -95080,7 +95080,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -112274,7 +112274,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -112493,7 +112493,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -112678,7 +112678,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -112899,7 +112899,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \ @@ -113121,7 +113121,7 @@ if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then glibcxx_ld_is_gold=yes fi - ldver=`$LD --version 2>/dev/null | head -1 | \ + ldver=`$LD --version 2>/dev/null | head -n 1 | \ sed -e 's/GNU \(go\)\{0,1\}ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\4/'` glibcxx_gnu_ld_version=`echo $ldver | \