# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/gcc/gcc32/head-tail.patch # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END --- --- gcc-3.2.3/boehm-gc/config.guess 2002-02-12 05:37:53.000000000 +0100 +++ gcc-3.2.3/boehm-gc/config.guess.patch 2004-08-29 04:06:00.000000000 +0200 @@ -340,7 +340,7 @@ echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(head -n1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -509,7 +509,7 @@ fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -n1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else --- gcc-3.2.3/contrib/test_summary 2002-02-24 21:45:15.000000000 +0100 +++ gcc-3.2.3/contrib/test_summary.patch 2004-08-29 04:09:19.000000000 +0200 @@ -98,7 +98,7 @@ srcdir = $1; gsub(/\/configure$/, "", srcdir); printf "LAST_UPDATED: "; - system("tail -1 " srcdir "/LAST_UPDATED"); + system("tail -n1 " srcdir "/LAST_UPDATED"); print ""; $1 = "configure flags:"; configflags = $0; --- gcc-3.2.3/gcc/configure 2003-02-04 01:17:46.000000000 +0100 +++ gcc-3.2.3/gcc/configure.patch 2004-08-29 04:06:14.000000000 +0200 @@ -7214,7 +7214,7 @@ # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for. Look for # the date string after the version number. - ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` + ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n1` if echo "$ld_ver" | grep GNU > /dev/null; then ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` @@ -7278,7 +7278,7 @@ # ??? There exists an elf-specific test that will crash # the assembler. Perhaps it's better to figure out whether # arbitrary sections are supported and try the test. - as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` + as_ver=`$gcc_cv_as --version 2>/dev/null | head -n1` if echo "$as_ver" | grep GNU > /dev/null; then as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` as_major=`echo $as_ver | sed 's/\..*//'` @@ -7307,7 +7307,7 @@ fi elif test x$gcc_cv_as != x; then # Check if this is GAS. - as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` + as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n1` rm -f a.out 2> /dev/null if echo "$as_ver" | grep GNU > /dev/null; then # Versions up to and including 2.11.0 may mis-optimize --- gcc-3.2.3/gcc/configure.in 2003-02-04 01:17:41.000000000 +0100 +++ gcc-3.2.3/gcc/configure.in.patch 2004-08-29 04:06:31.000000000 +0200 @@ -1534,7 +1534,7 @@ # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. # This is irritatingly difficult to feature test for. Look for # the date string after the version number. - ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` + ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n1` if echo "$ld_ver" | grep GNU > /dev/null; then changequote(,)dnl ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` @@ -1597,7 +1597,7 @@ # ??? There exists an elf-specific test that will crash # the assembler. Perhaps it's better to figure out whether # arbitrary sections are supported and try the test. - as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` + as_ver=`$gcc_cv_as --version 2>/dev/null | head -n1` if echo "$as_ver" | grep GNU > /dev/null; then changequote(,)dnl as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` @@ -1625,7 +1625,7 @@ fi elif test x$gcc_cv_as != x; then # Check if this is GAS. - as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` + as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n1` rm -f a.out 2> /dev/null if echo "$as_ver" | grep GNU > /dev/null; then # Versions up to and including 2.11.0 may mis-optimize --- gcc-3.2.3/libstdc++-v3/aclocal.m4 2003-02-05 17:36:40.000000000 +0100 +++ gcc-3.2.3/libstdc++-v3/aclocal.m4.patch 2004-08-29 04:06:52.000000000 +0200 @@ -331,7 +331,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 -n1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` changequote([,]) glibcpp_gnu_ld_version=`echo $ldver | \ --- gcc-3.2.3/libstdc++-v3/acinclude.m4 2003-01-27 18:30:41.000000000 +0100 +++ gcc-3.2.3/libstdc++-v3/acinclude.m4.patch 2004-08-29 04:06:43.000000000 +0200 @@ -319,7 +319,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 -n1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` changequote([,]) glibcpp_gnu_ld_version=`echo $ldver | \ --- gcc-3.2.3/libstdc++-v3/configure 2003-02-05 17:36:41.000000000 +0100 +++ gcc-3.2.3/libstdc++-v3/configure.patch 2004-08-29 04:07:23.000000000 +0200 @@ -4157,7 +4157,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 -n1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -5107,7 +5107,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 -n1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -6051,7 +6051,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 -n1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -6982,7 +6982,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 -n1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -7855,7 +7855,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 -n1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ @@ -9155,7 +9155,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 -n1 | \ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` glibcpp_gnu_ld_version=`echo $ldver | \ --- gcc-3.2.3/libstdc++-v3/mkcheck.in 2002-03-08 23:25:40.000000000 +0100 +++ gcc-3.2.3/libstdc++-v3/mkcheck.in.patch 2004-08-29 04:09:32.000000000 +0200 @@ -181,9 +181,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 -n1 | awk '{print $1}') ;; + DATA) DATA=$(size -B $EXENAME | tail -n1 | awk '{print $2}') ;; + SIZE) SIZE=$(size -B $EXENAME | tail -n1 | awk '{print $4}') ;; esac } else --- gcc-3.2.3/ltcf-c.sh 2001-09-01 02:47:19.000000000 +0200 +++ gcc-3.2.3/ltcf-c.sh.patch 2004-08-29 04:07:32.000000000 +0200 @@ -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 -n1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; --- gcc-3.2.3/ltcf-gcj.sh 2001-09-01 02:47:19.000000000 +0200 +++ gcc-3.2.3/ltcf-gcj.sh.patch 2004-08-29 04:07:41.000000000 +0200 @@ -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 -n1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; --- ./configure 2004-08-29 04:52:05.000000000 +0200 +++ ./configure.patch 2004-08-29 05:01:09.000000000 +0200 @@ -820,7 +820,7 @@ s/\\\n//g t loop /^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc - CC=`tail -1 Makefile.cc` + CC=`tail -n1 Makefile.cc` rm -f Makefile.cc fi @@ -830,7 +830,7 @@ s/\\\n//g t loop /^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc - CFLAGS=`tail -1 Makefile.cc` + CFLAGS=`tail -n1 Makefile.cc` rm -f Makefile.cc fi @@ -840,7 +840,7 @@ s/\\\n//g t loop /^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc - CXX=`tail -1 Makefile.cc` + CXX=`tail -n1 Makefile.cc` rm -f Makefile.cc fi @@ -850,7 +850,7 @@ s/\\\n//g t loop /^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc - CXXFLAGS=`tail -1 Makefile.cc` + CXXFLAGS=`tail -n1 Makefile.cc` rm -f Makefile.cc fi @@ -931,7 +931,7 @@ t loop /^'"${var}"'[ ]*=/ s/'"${var}"'[ ]*=[ ]*\(.*\)/\1/p' \ < Makefile > Makefile.v - t=`tail -1 Makefile.v` + t=`tail -n1 Makefile.v` if [ -n "${t}" ]; then eval "${var}=\${t}" fi --- gcc-3.2.3/gcc/configure 2004-08-29 05:06:22.000000000 +0200 +++ gcc-3.2.3/gcc/configure.patch 2004-08-29 16:00:28.000000000 +0200 @@ -7360,7 +7360,7 @@ # and we got the correct data, then succeed. if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ - | tail -3 > conftest.got \ + | tail -n3 > conftest.got \ && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ || cmp conftest.big conftest.got > /dev/null 2>&1; } then --- gcc-3.2.3/gcc/configure.in 2004-08-29 05:06:22.000000000 +0200 +++ gcc-3.2.3/gcc/configure.in.patch 2004-08-29 16:00:36.000000000 +0200 @@ -1678,7 +1678,7 @@ # and we got the correct data, then succeed. if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ - | tail -3 > conftest.got \ + | tail -n3 > conftest.got \ && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ || cmp conftest.big conftest.got > /dev/null 2>&1; } then