mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

350 lines
15 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/gcc/gcc33/head-tail.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. diff -dur gcc-3.3.3/boehm-gc/config.guess gcc-3.3.3-p/boehm-gc/config.guess
  20. --- gcc-3.3.3/boehm-gc/config.guess 2002-02-12 05:37:53.000000000 +0100
  21. +++ gcc-3.3.3-p/boehm-gc/config.guess 2004-11-04 02:32:41.000000000 +0100
  22. @@ -340,7 +340,7 @@
  23. echo m68k-sun-sunos${UNAME_RELEASE}
  24. exit 0 ;;
  25. sun*:*:4.2BSD:*)
  26. - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  27. + UNAME_RELEASE=`(head -n1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  28. test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  29. case "`/bin/arch`" in
  30. sun3)
  31. @@ -509,7 +509,7 @@
  32. fi
  33. exit 0 ;;
  34. *:AIX:*:[45])
  35. - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
  36. + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -n1 | awk '{ print $1 }'`
  37. if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  38. IBM_ARCH=rs6000
  39. else
  40. diff -dur gcc-3.3.3/configure gcc-3.3.3-p/configure
  41. --- gcc-3.3.3/configure 2002-09-29 18:11:24.000000000 +0200
  42. +++ gcc-3.3.3-p/configure 2004-11-04 02:35:30.000000000 +0100
  43. @@ -820,7 +820,7 @@
  44. s/\\\n//g
  45. t loop
  46. /^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
  47. - CC=`tail -1 Makefile.cc`
  48. + CC=`tail -n1 Makefile.cc`
  49. rm -f Makefile.cc
  50. fi
  51. @@ -830,7 +830,7 @@
  52. s/\\\n//g
  53. t loop
  54. /^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
  55. - CFLAGS=`tail -1 Makefile.cc`
  56. + CFLAGS=`tail -n1 Makefile.cc`
  57. rm -f Makefile.cc
  58. fi
  59. @@ -840,7 +840,7 @@
  60. s/\\\n//g
  61. t loop
  62. /^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
  63. - CXX=`tail -1 Makefile.cc`
  64. + CXX=`tail -n1 Makefile.cc`
  65. rm -f Makefile.cc
  66. fi
  67. @@ -850,7 +850,7 @@
  68. s/\\\n//g
  69. t loop
  70. /^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
  71. - CXXFLAGS=`tail -1 Makefile.cc`
  72. + CXXFLAGS=`tail -n1 Makefile.cc`
  73. rm -f Makefile.cc
  74. fi
  75. @@ -931,7 +931,7 @@
  76. t loop
  77. /^'"${var}"'[ ]*=/ s/'"${var}"'[ ]*=[ ]*\(.*\)/\1/p' \
  78. < Makefile > Makefile.v
  79. - t=`tail -1 Makefile.v`
  80. + t=`tail -n1 Makefile.v`
  81. if [ -n "${t}" ]; then
  82. eval "${var}=\${t}"
  83. fi
  84. diff -dur gcc-3.3.3/contrib/test_summary gcc-3.3.3-p/contrib/test_summary
  85. --- gcc-3.3.3/contrib/test_summary 2002-05-16 19:41:58.000000000 +0200
  86. +++ gcc-3.3.3-p/contrib/test_summary 2004-11-04 02:35:15.000000000 +0100
  87. @@ -98,7 +98,7 @@
  88. srcdir = $1;
  89. gsub(/\/configure$/, "", srcdir);
  90. printf "LAST_UPDATED: ";
  91. - system("tail -1 " srcdir "/LAST_UPDATED");
  92. + system("tail -n1 " srcdir "/LAST_UPDATED");
  93. print "";
  94. $1 = "configure flags:"; configflags = $0;
  95. diff -dur gcc-3.3.3/gcc/configure gcc-3.3.3-p/gcc/configure
  96. --- gcc-3.3.3/gcc/configure 2003-12-02 02:56:14.000000000 +0100
  97. +++ gcc-3.3.3-p/gcc/configure 2004-11-04 02:34:58.000000000 +0100
  98. @@ -7277,7 +7277,7 @@
  99. # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
  100. # This is irritatingly difficult to feature test for. Look for
  101. # the date string after the version number.
  102. - ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
  103. + ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n1`
  104. if echo "$ld_ver" | grep GNU > /dev/null; then
  105. 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'`
  106. 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'`
  107. @@ -7343,7 +7343,7 @@
  108. # ??? There exists an elf-specific test that will crash
  109. # the assembler. Perhaps it's better to figure out whether
  110. # arbitrary sections are supported and try the test.
  111. - as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
  112. + as_ver=`$gcc_cv_as --version 2>/dev/null | head -n1`
  113. if echo "$as_ver" | grep GNU > /dev/null; then
  114. as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
  115. as_major=`echo $as_ver | sed 's/\..*//'`
  116. @@ -7372,7 +7372,7 @@
  117. fi
  118. elif test x$gcc_cv_as != x; then
  119. # Check if this is GAS.
  120. - as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
  121. + as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n1`
  122. rm -f a.out 2> /dev/null
  123. if echo "$as_ver" | grep GNU > /dev/null; then
  124. # Versions up to and including 2.11.0 may mis-optimize
  125. @@ -7425,7 +7425,7 @@
  126. # and we got the correct data, then succeed.
  127. if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
  128. && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
  129. - | tail -3 > conftest.got \
  130. + | tail -n3 > conftest.got \
  131. && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
  132. || cmp conftest.big conftest.got > /dev/null 2>&1; }
  133. then
  134. diff -dur gcc-3.3.3/gcc/configure.in gcc-3.3.3-p/gcc/configure.in
  135. --- gcc-3.3.3/gcc/configure.in 2003-12-02 02:56:12.000000000 +0100
  136. +++ gcc-3.3.3-p/gcc/configure.in 2004-11-04 02:34:28.000000000 +0100
  137. @@ -1683,7 +1683,7 @@
  138. # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
  139. # This is irritatingly difficult to feature test for. Look for
  140. # the date string after the version number.
  141. - ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
  142. + ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -n1`
  143. if echo "$ld_ver" | grep GNU > /dev/null; then
  144. changequote(,)dnl
  145. 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'`
  146. @@ -1748,7 +1748,7 @@
  147. # ??? There exists an elf-specific test that will crash
  148. # the assembler. Perhaps it's better to figure out whether
  149. # arbitrary sections are supported and try the test.
  150. - as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
  151. + as_ver=`$gcc_cv_as --version 2>/dev/null | head -n1`
  152. if echo "$as_ver" | grep GNU > /dev/null; then
  153. changequote(,)dnl
  154. as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
  155. @@ -1776,7 +1776,7 @@
  156. fi
  157. elif test x$gcc_cv_as != x; then
  158. # Check if this is GAS.
  159. - as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
  160. + as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -n1`
  161. rm -f a.out 2> /dev/null
  162. if echo "$as_ver" | grep GNU > /dev/null; then
  163. # Versions up to and including 2.11.0 may mis-optimize
  164. @@ -1829,7 +1829,7 @@
  165. # and we got the correct data, then succeed.
  166. if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
  167. && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
  168. - | tail -3 > conftest.got \
  169. + | tail -n3 > conftest.got \
  170. && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
  171. || cmp conftest.big conftest.got > /dev/null 2>&1; }
  172. then
  173. diff -dur gcc-3.3.3/libjava/acinclude.m4 gcc-3.3.3-p/libjava/acinclude.m4
  174. --- gcc-3.3.3/libjava/acinclude.m4 2003-01-31 19:01:17.000000000 +0100
  175. +++ gcc-3.3.3-p/libjava/acinclude.m4 2004-11-04 02:31:42.000000000 +0100
  176. @@ -279,8 +279,8 @@
  177. AC_MSG_CHECKING(whether 'ld' is at least 2.13)
  178. LD_PROG=`$CC --print-prog-name=ld`
  179. LD_VERSION=`$LD_PROG --version`
  180. -LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  181. -LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
  182. +LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  183. +LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2`
  184. if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
  185. LD_OK="ok"
  186. else
  187. diff -dur gcc-3.3.3/libjava/aclocal.m4 gcc-3.3.3-p/libjava/aclocal.m4
  188. --- gcc-3.3.3/libjava/aclocal.m4 2004-02-14 21:34:20.000000000 +0100
  189. +++ gcc-3.3.3-p/libjava/aclocal.m4 2004-11-04 02:31:31.000000000 +0100
  190. @@ -291,8 +291,8 @@
  191. AC_MSG_CHECKING(whether 'ld' is at least 2.13)
  192. LD_PROG=`$CC --print-prog-name=ld`
  193. LD_VERSION=`$LD_PROG --version`
  194. -LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  195. -LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
  196. +LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  197. +LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2`
  198. if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
  199. LD_OK="ok"
  200. else
  201. diff -dur gcc-3.3.3/libjava/configure gcc-3.3.3-p/libjava/configure
  202. --- gcc-3.3.3/libjava/configure 2004-02-14 21:34:20.000000000 +0100
  203. +++ gcc-3.3.3-p/libjava/configure 2004-11-04 02:31:20.000000000 +0100
  204. @@ -2965,8 +2965,8 @@
  205. echo "configure:2966: checking whether 'ld' is at least 2.13" >&5
  206. LD_PROG=`$CC --print-prog-name=ld`
  207. LD_VERSION=`$LD_PROG --version`
  208. -LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  209. -LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
  210. +LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  211. +LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n1 | cut -d '.' -f 2`
  212. if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
  213. LD_OK="ok"
  214. else
  215. diff -dur gcc-3.3.3/libstdc++-v3/acinclude.m4 gcc-3.3.3-p/libstdc++-v3/acinclude.m4
  216. --- gcc-3.3.3/libstdc++-v3/acinclude.m4 2003-09-11 05:08:35.000000000 +0200
  217. +++ gcc-3.3.3-p/libstdc++-v3/acinclude.m4 2004-11-04 02:30:52.000000000 +0100
  218. @@ -315,7 +315,7 @@
  219. # Start by getting the version number. I think the libtool test already
  220. # does some of this, but throws away the result.
  221. changequote(,)
  222. - ldver=`$LD --version 2>/dev/null | head -1 | \
  223. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  224. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  225. changequote([,])
  226. glibcpp_gnu_ld_version=`echo $ldver | \
  227. diff -dur gcc-3.3.3/libstdc++-v3/aclocal.m4 gcc-3.3.3-p/libstdc++-v3/aclocal.m4
  228. --- gcc-3.3.3/libstdc++-v3/aclocal.m4 2004-01-12 17:18:44.000000000 +0100
  229. +++ gcc-3.3.3-p/libstdc++-v3/aclocal.m4 2004-11-04 02:30:43.000000000 +0100
  230. @@ -327,7 +327,7 @@
  231. # Start by getting the version number. I think the libtool test already
  232. # does some of this, but throws away the result.
  233. changequote(,)
  234. - ldver=`$LD --version 2>/dev/null | head -1 | \
  235. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  236. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  237. changequote([,])
  238. glibcpp_gnu_ld_version=`echo $ldver | \
  239. diff -dur gcc-3.3.3/libstdc++-v3/configure gcc-3.3.3-p/libstdc++-v3/configure
  240. --- gcc-3.3.3/libstdc++-v3/configure 2004-01-12 17:18:45.000000000 +0100
  241. +++ gcc-3.3.3-p/libstdc++-v3/configure 2004-11-04 02:30:30.000000000 +0100
  242. @@ -4284,7 +4284,7 @@
  243. # Start by getting the version number. I think the libtool test already
  244. # does some of this, but throws away the result.
  245. - ldver=`$LD --version 2>/dev/null | head -1 | \
  246. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  247. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  248. glibcpp_gnu_ld_version=`echo $ldver | \
  249. @@ -5423,7 +5423,7 @@
  250. # Start by getting the version number. I think the libtool test already
  251. # does some of this, but throws away the result.
  252. - ldver=`$LD --version 2>/dev/null | head -1 | \
  253. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  254. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  255. glibcpp_gnu_ld_version=`echo $ldver | \
  256. @@ -6403,7 +6403,7 @@
  257. # Start by getting the version number. I think the libtool test already
  258. # does some of this, but throws away the result.
  259. - ldver=`$LD --version 2>/dev/null | head -1 | \
  260. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  261. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  262. glibcpp_gnu_ld_version=`echo $ldver | \
  263. @@ -7393,7 +7393,7 @@
  264. # Start by getting the version number. I think the libtool test already
  265. # does some of this, but throws away the result.
  266. - ldver=`$LD --version 2>/dev/null | head -1 | \
  267. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  268. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  269. glibcpp_gnu_ld_version=`echo $ldver | \
  270. @@ -8397,7 +8397,7 @@
  271. # Start by getting the version number. I think the libtool test already
  272. # does some of this, but throws away the result.
  273. - ldver=`$LD --version 2>/dev/null | head -1 | \
  274. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  275. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  276. glibcpp_gnu_ld_version=`echo $ldver | \
  277. @@ -9292,7 +9292,7 @@
  278. # Start by getting the version number. I think the libtool test already
  279. # does some of this, but throws away the result.
  280. - ldver=`$LD --version 2>/dev/null | head -1 | \
  281. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  282. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  283. glibcpp_gnu_ld_version=`echo $ldver | \
  284. @@ -10776,7 +10776,7 @@
  285. # Start by getting the version number. I think the libtool test already
  286. # does some of this, but throws away the result.
  287. - ldver=`$LD --version 2>/dev/null | head -1 | \
  288. + ldver=`$LD --version 2>/dev/null | head -n1 | \
  289. sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
  290. glibcpp_gnu_ld_version=`echo $ldver | \
  291. diff -dur gcc-3.3.3/libstdc++-v3/mkcheck.in gcc-3.3.3-p/libstdc++-v3/mkcheck.in
  292. --- gcc-3.3.3/libstdc++-v3/mkcheck.in 2002-06-07 22:25:04.000000000 +0200
  293. +++ gcc-3.3.3-p/libstdc++-v3/mkcheck.in 2004-11-04 02:34:13.000000000 +0100
  294. @@ -181,9 +181,9 @@
  295. function size_command()
  296. {
  297. case $1 in
  298. - TEXT) TEXT=$(size -B $EXENAME | tail -1 | awk '{print $1}') ;;
  299. - DATA) DATA=$(size -B $EXENAME | tail -1 | awk '{print $2}') ;;
  300. - SIZE) SIZE=$(size -B $EXENAME | tail -1 | awk '{print $4}') ;;
  301. + TEXT) TEXT=$(size -B $EXENAME | tail -n1 | awk '{print $1}') ;;
  302. + DATA) DATA=$(size -B $EXENAME | tail -n1 | awk '{print $2}') ;;
  303. + SIZE) SIZE=$(size -B $EXENAME | tail -n1 | awk '{print $4}') ;;
  304. esac
  305. }
  306. else
  307. diff -dur gcc-3.3.3/ltcf-c.sh gcc-3.3.3-p/ltcf-c.sh
  308. --- gcc-3.3.3/ltcf-c.sh 2002-08-14 04:39:52.000000000 +0200
  309. +++ gcc-3.3.3-p/ltcf-c.sh 2004-11-04 02:30:01.000000000 +0100
  310. @@ -153,7 +153,7 @@
  311. # If the export-symbols file already is a .def file (1st line
  312. # is EXPORTS), use it as is.
  313. # If DATA tags from a recent dlltool are present, honour them!
  314. - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
  315. + archive_expsym_cmds='if test "x`head -n1 $export_symbols`" = xEXPORTS; then
  316. cp $export_symbols $output_objdir/$soname-def;
  317. else
  318. echo EXPORTS > $output_objdir/$soname-def;
  319. diff -dur gcc-3.3.3/ltcf-gcj.sh gcc-3.3.3-p/ltcf-gcj.sh
  320. --- gcc-3.3.3/ltcf-gcj.sh 2003-02-20 01:36:49.000000000 +0100
  321. +++ gcc-3.3.3-p/ltcf-gcj.sh 2004-11-04 02:29:46.000000000 +0100
  322. @@ -156,7 +156,7 @@
  323. # If the export-symbols file already is a .def file (1st line
  324. # is EXPORTS), use it as is.
  325. # If DATA tags from a recent dlltool are present, honour them!
  326. - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
  327. + archive_expsym_cmds='if test "x`head -n1 $export_symbols`" = xEXPORTS; then
  328. cp $export_symbols $output_objdir/$soname-def;
  329. else
  330. echo EXPORTS > $output_objdir/$soname-def;