From 8843579e2d8ed710f0d9fa2d9ec7f7a1c8d2f170 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Wed, 10 Nov 2004 13:26:00 +0000 Subject: [PATCH] Stefan Fiedler: gcc: fix head-tail issue for gcc2, gcc33 and gcc34 gcc32 has already been fixed Index: package/base/gcc/gcc2/head-tail.patch =================================================================== [2004110502442108723] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@4784 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/gcc/gcc2/head-tail.patch | 72 ++++++ package/base/gcc/gcc33/head-tail.patch | 331 +++++++++++++++++++++++++ package/base/gcc/gcc34/head-tail.patch | 240 ++++++++++++++++++ 3 files changed, 643 insertions(+) create mode 100644 package/base/gcc/gcc2/head-tail.patch create mode 100644 package/base/gcc/gcc33/head-tail.patch create mode 100644 package/base/gcc/gcc34/head-tail.patch diff --git a/package/base/gcc/gcc2/head-tail.patch b/package/base/gcc/gcc2/head-tail.patch new file mode 100644 index 000000000..04ebf9b64 --- /dev/null +++ b/package/base/gcc/gcc2/head-tail.patch @@ -0,0 +1,72 @@ +diff -dur gcc-2.95.3/config.guess gcc-2.95.3-p/config.guess +--- gcc-2.95.3/config.guess 2000-03-08 05:52:57.000000000 +0100 ++++ gcc-2.95.3-p/config.guess 2004-11-04 16:19:16.086160368 +0100 +@@ -187,7 +187,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) +diff -dur gcc-2.95.3/configure gcc-2.95.3-p/configure +--- gcc-2.95.3/configure 1999-04-02 16:17:40.000000000 +0200 ++++ gcc-2.95.3-p/configure 2004-11-04 16:19:50.391945096 +0100 +@@ -810,7 +810,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 + +@@ -820,7 +820,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 + +@@ -830,7 +830,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 + +@@ -840,7 +840,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 + +@@ -920,7 +920,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 +diff -dur gcc-2.95.3/libio/dbz/Makefile.in gcc-2.95.3-p/libio/dbz/Makefile.in +--- gcc-2.95.3/libio/dbz/Makefile.in 1998-08-30 23:30:22.000000000 +0200 ++++ gcc-2.95.3-p/libio/dbz/Makefile.in 2004-11-04 16:19:35.521205792 +0100 +@@ -107,7 +107,7 @@ + + stamp-r1: $(RHIST) $(R2HIST) stamp-r0 + : crude check of synthetic history file +- ( sed 25q $(RHIST) ; tail -25 $(RHIST) ) >histjunk ++ ( sed 25q $(RHIST) ; tail -n25 $(RHIST) ) >histjunk + cmp histjunk $(srcdir)/firstlast25 + rm histjunk + @touch stamp-r1 diff --git a/package/base/gcc/gcc33/head-tail.patch b/package/base/gcc/gcc33/head-tail.patch new file mode 100644 index 000000000..13a6043d6 --- /dev/null +++ b/package/base/gcc/gcc33/head-tail.patch @@ -0,0 +1,331 @@ +diff -dur gcc-3.3.3/boehm-gc/config.guess gcc-3.3.3-p/boehm-gc/config.guess +--- gcc-3.3.3/boehm-gc/config.guess 2002-02-12 05:37:53.000000000 +0100 ++++ gcc-3.3.3-p/boehm-gc/config.guess 2004-11-04 02:32:41.000000000 +0100 +@@ -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 +diff -dur gcc-3.3.3/configure gcc-3.3.3-p/configure +--- gcc-3.3.3/configure 2002-09-29 18:11:24.000000000 +0200 ++++ gcc-3.3.3-p/configure 2004-11-04 02:35:30.000000000 +0100 +@@ -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 +diff -dur gcc-3.3.3/contrib/test_summary gcc-3.3.3-p/contrib/test_summary +--- gcc-3.3.3/contrib/test_summary 2002-05-16 19:41:58.000000000 +0200 ++++ gcc-3.3.3-p/contrib/test_summary 2004-11-04 02:35:15.000000000 +0100 +@@ -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; +diff -dur gcc-3.3.3/gcc/configure gcc-3.3.3-p/gcc/configure +--- gcc-3.3.3/gcc/configure 2003-12-02 02:56:14.000000000 +0100 ++++ gcc-3.3.3-p/gcc/configure 2004-11-04 02:34:58.000000000 +0100 +@@ -7277,7 +7277,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'` +@@ -7343,7 +7343,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/\..*//'` +@@ -7372,7 +7372,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 +@@ -7425,7 +7425,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 +diff -dur gcc-3.3.3/gcc/configure.in gcc-3.3.3-p/gcc/configure.in +--- gcc-3.3.3/gcc/configure.in 2003-12-02 02:56:12.000000000 +0100 ++++ gcc-3.3.3-p/gcc/configure.in 2004-11-04 02:34:28.000000000 +0100 +@@ -1683,7 +1683,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'` +@@ -1748,7 +1748,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/'` +@@ -1776,7 +1776,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 +@@ -1829,7 +1829,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 +diff -dur gcc-3.3.3/libjava/acinclude.m4 gcc-3.3.3-p/libjava/acinclude.m4 +--- gcc-3.3.3/libjava/acinclude.m4 2003-01-31 19:01:17.000000000 +0100 ++++ gcc-3.3.3-p/libjava/acinclude.m4 2004-11-04 02:31:42.000000000 +0100 +@@ -279,8 +279,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 -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4` ++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2` + if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then + LD_OK="ok" + else +diff -dur gcc-3.3.3/libjava/aclocal.m4 gcc-3.3.3-p/libjava/aclocal.m4 +--- gcc-3.3.3/libjava/aclocal.m4 2004-02-14 21:34:20.000000000 +0100 ++++ gcc-3.3.3-p/libjava/aclocal.m4 2004-11-04 02:31:31.000000000 +0100 +@@ -291,8 +291,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 -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4` ++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2` + if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then + LD_OK="ok" + else +diff -dur gcc-3.3.3/libjava/configure gcc-3.3.3-p/libjava/configure +--- gcc-3.3.3/libjava/configure 2004-02-14 21:34:20.000000000 +0100 ++++ gcc-3.3.3-p/libjava/configure 2004-11-04 02:31:20.000000000 +0100 +@@ -2965,8 +2965,8 @@ + echo "configure:2966: 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 -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4` ++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2` + if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then + LD_OK="ok" + else +diff -dur gcc-3.3.3/libstdc++-v3/acinclude.m4 gcc-3.3.3-p/libstdc++-v3/acinclude.m4 +--- gcc-3.3.3/libstdc++-v3/acinclude.m4 2003-09-11 05:08:35.000000000 +0200 ++++ gcc-3.3.3-p/libstdc++-v3/acinclude.m4 2004-11-04 02:30:52.000000000 +0100 +@@ -315,7 +315,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 | \ +diff -dur gcc-3.3.3/libstdc++-v3/aclocal.m4 gcc-3.3.3-p/libstdc++-v3/aclocal.m4 +--- gcc-3.3.3/libstdc++-v3/aclocal.m4 2004-01-12 17:18:44.000000000 +0100 ++++ gcc-3.3.3-p/libstdc++-v3/aclocal.m4 2004-11-04 02:30:43.000000000 +0100 +@@ -327,7 +327,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 | \ +diff -dur gcc-3.3.3/libstdc++-v3/configure gcc-3.3.3-p/libstdc++-v3/configure +--- gcc-3.3.3/libstdc++-v3/configure 2004-01-12 17:18:45.000000000 +0100 ++++ gcc-3.3.3-p/libstdc++-v3/configure 2004-11-04 02:30:30.000000000 +0100 +@@ -4284,7 +4284,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 | \ +@@ -5423,7 +5423,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 | \ +@@ -6403,7 +6403,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 | \ +@@ -7393,7 +7393,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 | \ +@@ -8397,7 +8397,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 | \ +@@ -9292,7 +9292,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 | \ +@@ -10776,7 +10776,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 | \ +diff -dur gcc-3.3.3/libstdc++-v3/mkcheck.in gcc-3.3.3-p/libstdc++-v3/mkcheck.in +--- gcc-3.3.3/libstdc++-v3/mkcheck.in 2002-06-07 22:25:04.000000000 +0200 ++++ gcc-3.3.3-p/libstdc++-v3/mkcheck.in 2004-11-04 02:34:13.000000000 +0100 +@@ -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 +diff -dur gcc-3.3.3/ltcf-c.sh gcc-3.3.3-p/ltcf-c.sh +--- gcc-3.3.3/ltcf-c.sh 2002-08-14 04:39:52.000000000 +0200 ++++ gcc-3.3.3-p/ltcf-c.sh 2004-11-04 02:30:01.000000000 +0100 +@@ -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; +diff -dur gcc-3.3.3/ltcf-gcj.sh gcc-3.3.3-p/ltcf-gcj.sh +--- gcc-3.3.3/ltcf-gcj.sh 2003-02-20 01:36:49.000000000 +0100 ++++ gcc-3.3.3-p/ltcf-gcj.sh 2004-11-04 02:29:46.000000000 +0100 +@@ -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; diff --git a/package/base/gcc/gcc34/head-tail.patch b/package/base/gcc/gcc34/head-tail.patch new file mode 100644 index 000000000..6ef862b11 --- /dev/null +++ b/package/base/gcc/gcc34/head-tail.patch @@ -0,0 +1,240 @@ +diff -dur gcc-3.4.2/contrib/test_summary gcc-3.4.2-p/contrib/test_summary +--- gcc-3.4.2/contrib/test_summary 2004-08-26 07:49:13.000000000 +0200 ++++ gcc-3.4.2-p/contrib/test_summary 2004-11-05 02:27:04.000000000 +0100 +@@ -106,7 +106,7 @@ + srcdir = configflags; + sub(/\/configure .*/, "", srcdir); + printf "LAST_UPDATED: "; +- system("tail -1 " srcdir "/LAST_UPDATED"); ++ system("tail -n1 " srcdir "/LAST_UPDATED"); + print ""; + + sub(/^[^ ]*\/configure */, " ", configflags); +diff -dur gcc-3.4.2/gcc/configure gcc-3.4.2-p/gcc/configure +--- gcc-3.4.2/gcc/configure 2004-07-13 08:58:29.000000000 +0200 ++++ gcc-3.4.2-p/gcc/configure 2004-11-05 02:27:05.000000000 +0100 +@@ -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 -n3 > conftest.got \ + && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ + || cmp conftest.big conftest.got > /dev/null 2>&1; } + then +diff -dur gcc-3.4.2/gcc/configure.ac gcc-3.4.2-p/gcc/configure.ac +--- gcc-3.4.2/gcc/configure.ac 2004-07-13 08:58:29.000000000 +0200 ++++ gcc-3.4.2-p/gcc/configure.ac 2004-11-05 02:27:05.000000000 +0100 +@@ -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 -n3 > conftest.got \ + && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ + || cmp conftest.big conftest.got > /dev/null 2>&1; } + then +diff -dur gcc-3.4.2/gcc/testsuite/ada/acats/run_all.sh gcc-3.4.2-p/gcc/testsuite/ada/acats/run_all.sh +--- gcc-3.4.2/gcc/testsuite/ada/acats/run_all.sh 2004-01-13 12:48:46.000000000 +0100 ++++ gcc-3.4.2-p/gcc/testsuite/ada/acats/run_all.sh 2004-11-05 02:27:05.000000000 +0100 +@@ -204,7 +204,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 -n1 ${i}.lst` + binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'` + echo "BUILD $main" >> $dir/acats.log + EXTERNAL_OBJECTS="" +diff -dur gcc-3.4.2/libjava/acinclude.m4 gcc-3.4.2-p/libjava/acinclude.m4 +--- gcc-3.4.2/libjava/acinclude.m4 2003-12-31 09:58:29.000000000 +0100 ++++ gcc-3.4.2-p/libjava/acinclude.m4 2004-11-05 02:27:05.000000000 +0100 +@@ -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 -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4` ++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2` + if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then + LD_OK="ok" + else +diff -dur gcc-3.4.2/libjava/aclocal.m4 gcc-3.4.2-p/libjava/aclocal.m4 +--- gcc-3.4.2/libjava/aclocal.m4 2004-09-07 01:31:35.000000000 +0200 ++++ gcc-3.4.2-p/libjava/aclocal.m4 2004-11-05 02:27:05.000000000 +0100 +@@ -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 -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4` ++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2` + if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then + LD_OK="ok" + else +diff -dur gcc-3.4.2/libjava/configure gcc-3.4.2-p/libjava/configure +--- gcc-3.4.2/libjava/configure 2004-09-07 01:31:35.000000000 +0200 ++++ gcc-3.4.2-p/libjava/configure 2004-11-05 02:27:05.000000000 +0100 +@@ -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 -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4` ++LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2` + if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then + LD_OK="ok" + else +diff -dur gcc-3.4.2/libstdc++-v3/acinclude.m4 gcc-3.4.2-p/libstdc++-v3/acinclude.m4 +--- gcc-3.4.2/libstdc++-v3/acinclude.m4 2004-07-15 19:42:45.000000000 +0200 ++++ gcc-3.4.2-p/libstdc++-v3/acinclude.m4 2004-11-05 02:27:05.000000000 +0100 +@@ -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 -n1 | \ + sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` + changequote([,]) + glibcxx_gnu_ld_version=`echo $ldver | \ +diff -dur gcc-3.4.2/libstdc++-v3/aclocal.m4 gcc-3.4.2-p/libstdc++-v3/aclocal.m4 +--- gcc-3.4.2/libstdc++-v3/aclocal.m4 2004-08-13 22:44:03.000000000 +0200 ++++ gcc-3.4.2-p/libstdc++-v3/aclocal.m4 2004-11-05 02:27:05.000000000 +0100 +@@ -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 -n1 | \ + sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'` + changequote([,]) + glibcxx_gnu_ld_version=`echo $ldver | \ +diff -dur gcc-3.4.2/libstdc++-v3/configure gcc-3.4.2-p/libstdc++-v3/configure +--- gcc-3.4.2/libstdc++-v3/configure 2004-08-13 22:44:04.000000000 +0200 ++++ gcc-3.4.2-p/libstdc++-v3/configure 2004-11-05 02:34:23.000000000 +0100 +@@ -7700,7 +7700,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +@@ -46876,7 +46876,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +@@ -65536,7 +65536,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +@@ -67674,7 +67674,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +@@ -69688,7 +69688,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +@@ -72414,7 +72414,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +@@ -74381,7 +74381,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +@@ -76247,7 +76247,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +@@ -79926,7 +79926,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/'` + + glibcxx_gnu_ld_version=`echo $ldver | \ +Nur in gcc-3.4.2-p/libstdc++-v3: configure~. +Nur in gcc-3.4.2-p/libstdc++-v3: configure.rej. +diff -dur gcc-3.4.2/libstdc++-v3/scripts/check_survey.in gcc-3.4.2-p/libstdc++-v3/scripts/check_survey.in +--- gcc-3.4.2/libstdc++-v3/scripts/check_survey.in 2003-07-05 08:00:05.000000000 +0200 ++++ gcc-3.4.2-p/libstdc++-v3/scripts/check_survey.in 2004-11-05 02:27:05.000000000 +0100 +@@ -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 -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 +diff -dur gcc-3.4.2/ltcf-c.sh gcc-3.4.2-p/ltcf-c.sh +--- gcc-3.4.2/ltcf-c.sh 2003-11-19 06:29:32.000000000 +0100 ++++ gcc-3.4.2-p/ltcf-c.sh 2004-11-05 02:27:05.000000000 +0100 +@@ -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; +diff -dur gcc-3.4.2/ltcf-gcj.sh gcc-3.4.2-p/ltcf-gcj.sh +--- gcc-3.4.2/ltcf-gcj.sh 2003-11-19 06:29:32.000000000 +0100 ++++ gcc-3.4.2-p/ltcf-gcj.sh 2004-11-05 02:27:05.000000000 +0100 +@@ -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;