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.

299 lines
14 KiB

  1. Copied from www.linuxfromscratch.org to ROCK Linux.
  2. Submitted By: Jim Gifford (patches at jg555 dot com)
  3. Date: 2007-02-14
  4. Initial Package Version: 4.1.2
  5. Origin: Jim Gifford
  6. Rediffed against 4.1.0 by Chris Staub
  7. Rediffed against 4.1.2 by Jim Gifford
  8. Rediffed and additions against 4.2.0 by Joe Ciccone
  9. Rediffed against 4.2.1 by Joe Ciccone
  10. Upstream Status: On Hold
  11. Description: Makes GCC Posix Compliant
  12. diff -Naur gcc-4.2.1.orig/contrib/test_summary gcc-4.2.1/contrib/test_summary
  13. --- gcc-4.2.1.orig/contrib/test_summary 2004-08-26 01:51:22.000000000 -0400
  14. +++ gcc-4.2.1/contrib/test_summary 2007-07-22 19:31:03.000000000 -0400
  15. @@ -106,7 +106,7 @@
  16. srcdir = configflags;
  17. sub(/\/configure .*/, "", srcdir);
  18. printf "LAST_UPDATED: ";
  19. - system("tail -1 " srcdir "/LAST_UPDATED");
  20. + system("tail -n 1 " srcdir "/LAST_UPDATED");
  21. print "";
  22. sub(/^[^ ]*\/configure */, " ", configflags);
  23. diff -Naur gcc-4.2.1.orig/gcc/configure gcc-4.2.1/gcc/configure
  24. --- gcc-4.2.1.orig/gcc/configure 2007-01-01 22:44:31.000000000 -0500
  25. +++ gcc-4.2.1/gcc/configure 2007-07-22 19:31:03.000000000 -0400
  26. @@ -14120,7 +14120,7 @@
  27. # Therefore, use diff -b for the comparisons.
  28. if test x$gcc_cv_objdump != x \
  29. && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
  30. - | tail -3 > conftest.got \
  31. + | tail -n 3 > conftest.got \
  32. && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
  33. || diff -b conftest.big conftest.got > /dev/null 2>&1; }
  34. then
  35. diff -Naur gcc-4.2.1.orig/gcc/configure.ac gcc-4.2.1/gcc/configure.ac
  36. --- gcc-4.2.1.orig/gcc/configure.ac 2007-01-01 22:44:31.000000000 -0500
  37. +++ gcc-4.2.1/gcc/configure.ac 2007-07-22 19:31:03.000000000 -0400
  38. @@ -2227,7 +2227,7 @@
  39. # Therefore, use diff -b for the comparisons.
  40. if test x$gcc_cv_objdump != x \
  41. && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
  42. - | tail -3 > conftest.got \
  43. + | tail -n 3 > conftest.got \
  44. && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \
  45. || diff -b conftest.big conftest.got > /dev/null 2>&1; }
  46. then
  47. diff -Naur gcc-4.2.1.orig/gcc/testsuite/ada/acats/run_all.sh gcc-4.2.1/gcc/testsuite/ada/acats/run_all.sh
  48. --- gcc-4.2.1.orig/gcc/testsuite/ada/acats/run_all.sh 2006-09-14 06:12:03.000000000 -0400
  49. +++ gcc-4.2.1/gcc/testsuite/ada/acats/run_all.sh 2007-07-22 19:31:03.000000000 -0400
  50. @@ -68,7 +68,7 @@
  51. ls ${i}?.adb > ${i}.lst 2> /dev/null
  52. ls ${i}*m.adb >> ${i}.lst 2> /dev/null
  53. ls ${i}.adb >> ${i}.lst 2> /dev/null
  54. - main=`tail -1 ${i}.lst`
  55. + main=`tail -n 1 ${i}.lst`
  56. }
  57. EXTERNAL_OBJECTS=""
  58. diff -Naur gcc-4.2.1.orig/libgomp/acinclude.m4 gcc-4.2.1/libgomp/acinclude.m4
  59. --- gcc-4.2.1.orig/libgomp/acinclude.m4 2007-03-18 09:45:56.000000000 -0400
  60. +++ gcc-4.2.1/libgomp/acinclude.m4 2007-07-22 19:31:03.000000000 -0400
  61. @@ -147,7 +147,7 @@
  62. # Start by getting the version number. I think the libtool test already
  63. # does some of this, but throws away the result.
  64. changequote(,)
  65. - ldver=`$LD --version 2>/dev/null | head -1 | \
  66. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  67. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  68. changequote([,])
  69. libgomp_gnu_ld_version=`echo $ldver | \
  70. diff -Naur gcc-4.2.1.orig/libgomp/configure gcc-4.2.1/libgomp/configure
  71. --- gcc-4.2.1.orig/libgomp/configure 2007-07-19 10:33:56.000000000 -0400
  72. +++ gcc-4.2.1/libgomp/configure 2007-07-22 19:31:03.000000000 -0400
  73. @@ -9314,7 +9314,7 @@
  74. # Start by getting the version number. I think the libtool test already
  75. # does some of this, but throws away the result.
  76. - ldver=`$LD --version 2>/dev/null | head -1 | \
  77. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  78. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  79. libgomp_gnu_ld_version=`echo $ldver | \
  80. diff -Naur gcc-4.2.1.orig/libjava/classpath/configure gcc-4.2.1/libjava/classpath/configure
  81. --- gcc-4.2.1.orig/libjava/classpath/configure 2007-01-17 13:10:26.000000000 -0500
  82. +++ gcc-4.2.1/libjava/classpath/configure 2007-07-22 19:31:03.000000000 -0400
  83. @@ -18514,7 +18514,7 @@
  84. fi # shortcircut to system "stdint.h"
  85. # ------------------ PREPARE VARIABLES ------------------------------
  86. if test "$GCC" = "yes" ; then
  87. -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
  88. +ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
  89. else
  90. ac_cv_stdint_message="using $CC"
  91. fi
  92. diff -Naur gcc-4.2.1.orig/libjava/classpath/ltcf-c.sh gcc-4.2.1/libjava/classpath/ltcf-c.sh
  93. --- gcc-4.2.1.orig/libjava/classpath/ltcf-c.sh 2006-01-17 13:09:40.000000000 -0500
  94. +++ gcc-4.2.1/libjava/classpath/ltcf-c.sh 2007-07-22 19:31:03.000000000 -0400
  95. @@ -153,7 +153,7 @@
  96. # If the export-symbols file already is a .def file (1st line
  97. # is EXPORTS), use it as is.
  98. # If DATA tags from a recent dlltool are present, honour them!
  99. - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
  100. + archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
  101. cp $export_symbols $output_objdir/$soname-def;
  102. else
  103. echo EXPORTS > $output_objdir/$soname-def;
  104. diff -Naur gcc-4.2.1.orig/libjava/classpath/ltcf-gcj.sh gcc-4.2.1/libjava/classpath/ltcf-gcj.sh
  105. --- gcc-4.2.1.orig/libjava/classpath/ltcf-gcj.sh 2005-09-23 17:31:04.000000000 -0400
  106. +++ gcc-4.2.1/libjava/classpath/ltcf-gcj.sh 2007-07-22 19:31:03.000000000 -0400
  107. @@ -156,7 +156,7 @@
  108. # If the export-symbols file already is a .def file (1st line
  109. # is EXPORTS), use it as is.
  110. # If DATA tags from a recent dlltool are present, honour them!
  111. - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
  112. + archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
  113. cp $export_symbols $output_objdir/$soname-def;
  114. else
  115. echo EXPORTS > $output_objdir/$soname-def;
  116. diff -Naur gcc-4.2.1.orig/libjava/classpath/m4/ax_create_stdint_h.m4 gcc-4.2.1/libjava/classpath/m4/ax_create_stdint_h.m4
  117. --- gcc-4.2.1.orig/libjava/classpath/m4/ax_create_stdint_h.m4 2006-01-17 13:09:40.000000000 -0500
  118. +++ gcc-4.2.1/libjava/classpath/m4/ax_create_stdint_h.m4 2007-07-22 19:31:03.000000000 -0400
  119. @@ -217,7 +217,7 @@
  120. fi # shortcircut to system "stdint.h"
  121. # ------------------ PREPARE VARIABLES ------------------------------
  122. if test "$GCC" = "yes" ; then
  123. -ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
  124. +ac_cv_stdint_message="using gnu compiler "`$CC --version | head -n 1`
  125. else
  126. ac_cv_stdint_message="using $CC"
  127. fi
  128. diff -Naur gcc-4.2.1.orig/libjava/configure gcc-4.2.1/libjava/configure
  129. --- gcc-4.2.1.orig/libjava/configure 2007-07-19 10:33:56.000000000 -0400
  130. +++ gcc-4.2.1/libjava/configure 2007-07-22 19:31:03.000000000 -0400
  131. @@ -7025,8 +7025,8 @@
  132. echo $ECHO_N "checking whether 'ld' is at least 2.13... $ECHO_C" >&6
  133. LD_PROG=`$CC --print-prog-name=ld`
  134. LD_VERSION=`$LD_PROG --version`
  135. -LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  136. -LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
  137. +LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  138. +LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
  139. if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
  140. LD_OK="ok"
  141. else
  142. diff -Naur gcc-4.2.1.orig/libjava/mingwld.m4 gcc-4.2.1/libjava/mingwld.m4
  143. --- gcc-4.2.1.orig/libjava/mingwld.m4 2005-08-22 18:36:35.000000000 -0400
  144. +++ gcc-4.2.1/libjava/mingwld.m4 2007-07-22 19:31:03.000000000 -0400
  145. @@ -3,8 +3,8 @@
  146. AC_MSG_CHECKING(whether 'ld' is at least 2.13)
  147. LD_PROG=`$CC --print-prog-name=ld`
  148. LD_VERSION=`$LD_PROG --version`
  149. -LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  150. -LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
  151. +LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
  152. +LD_VERSION_MINOR=`echo "$LD_VERSION" | head -n 1 | cut -d '.' -f 2`
  153. if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
  154. LD_OK="ok"
  155. else
  156. diff -Naur gcc-4.2.1.orig/libstdc++-v3/acinclude.m4 gcc-4.2.1/libstdc++-v3/acinclude.m4
  157. --- gcc-4.2.1.orig/libstdc++-v3/acinclude.m4 2007-06-28 19:02:05.000000000 -0400
  158. +++ gcc-4.2.1/libstdc++-v3/acinclude.m4 2007-07-22 19:31:03.000000000 -0400
  159. @@ -234,7 +234,7 @@
  160. if test x"$with_gnu_ld" = x"yes"; then
  161. AC_MSG_CHECKING([for ld version])
  162. changequote(,)
  163. - ldver=`$LD --version 2>/dev/null | head -1 | \
  164. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  165. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  166. changequote([,])
  167. glibcxx_gnu_ld_version=`echo $ldver | \
  168. diff -Naur gcc-4.2.1.orig/libstdc++-v3/configure gcc-4.2.1/libstdc++-v3/configure
  169. --- gcc-4.2.1.orig/libstdc++-v3/configure 2007-06-28 19:02:05.000000000 -0400
  170. +++ gcc-4.2.1/libstdc++-v3/configure 2007-07-22 19:31:03.000000000 -0400
  171. @@ -8541,7 +8541,7 @@
  172. echo "$as_me:$LINENO: checking for ld version" >&5
  173. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  174. - ldver=`$LD --version 2>/dev/null | head -1 | \
  175. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  176. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  177. glibcxx_gnu_ld_version=`echo $ldver | \
  178. @@ -54451,7 +54451,7 @@
  179. echo "$as_me:$LINENO: checking for ld version" >&5
  180. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  181. - ldver=`$LD --version 2>/dev/null | head -1 | \
  182. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  183. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  184. glibcxx_gnu_ld_version=`echo $ldver | \
  185. @@ -75811,7 +75811,7 @@
  186. echo "$as_me:$LINENO: checking for ld version" >&5
  187. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  188. - ldver=`$LD --version 2>/dev/null | head -1 | \
  189. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  190. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  191. glibcxx_gnu_ld_version=`echo $ldver | \
  192. @@ -77334,7 +77334,7 @@
  193. echo "$as_me:$LINENO: checking for ld version" >&5
  194. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  195. - ldver=`$LD --version 2>/dev/null | head -1 | \
  196. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  197. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  198. glibcxx_gnu_ld_version=`echo $ldver | \
  199. @@ -78825,7 +78825,7 @@
  200. echo "$as_me:$LINENO: checking for ld version" >&5
  201. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  202. - ldver=`$LD --version 2>/dev/null | head -1 | \
  203. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  204. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  205. glibcxx_gnu_ld_version=`echo $ldver | \
  206. @@ -100715,7 +100715,7 @@
  207. echo "$as_me:$LINENO: checking for ld version" >&5
  208. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  209. - ldver=`$LD --version 2>/dev/null | head -1 | \
  210. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  211. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  212. glibcxx_gnu_ld_version=`echo $ldver | \
  213. @@ -101560,7 +101560,7 @@
  214. echo "$as_me:$LINENO: checking for ld version" >&5
  215. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  216. - ldver=`$LD --version 2>/dev/null | head -1 | \
  217. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  218. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  219. glibcxx_gnu_ld_version=`echo $ldver | \
  220. @@ -102961,7 +102961,7 @@
  221. echo "$as_me:$LINENO: checking for ld version" >&5
  222. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  223. - ldver=`$LD --version 2>/dev/null | head -1 | \
  224. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  225. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  226. glibcxx_gnu_ld_version=`echo $ldver | \
  227. @@ -104754,7 +104754,7 @@
  228. echo "$as_me:$LINENO: checking for ld version" >&5
  229. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  230. - ldver=`$LD --version 2>/dev/null | head -1 | \
  231. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  232. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  233. glibcxx_gnu_ld_version=`echo $ldver | \
  234. @@ -105997,7 +105997,7 @@
  235. echo "$as_me:$LINENO: checking for ld version" >&5
  236. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  237. - ldver=`$LD --version 2>/dev/null | head -1 | \
  238. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  239. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  240. glibcxx_gnu_ld_version=`echo $ldver | \
  241. @@ -107024,7 +107024,7 @@
  242. echo "$as_me:$LINENO: checking for ld version" >&5
  243. echo $ECHO_N "checking for ld version... $ECHO_C" >&6
  244. - ldver=`$LD --version 2>/dev/null | head -1 | \
  245. + ldver=`$LD --version 2>/dev/null | head -n 1 | \
  246. sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
  247. glibcxx_gnu_ld_version=`echo $ldver | \
  248. diff -Naur gcc-4.2.1.orig/ltcf-c.sh gcc-4.2.1/ltcf-c.sh
  249. --- gcc-4.2.1.orig/ltcf-c.sh 2005-11-18 17:53:08.000000000 -0500
  250. +++ gcc-4.2.1/ltcf-c.sh 2007-07-22 19:31:03.000000000 -0400
  251. @@ -153,7 +153,7 @@
  252. # If the export-symbols file already is a .def file (1st line
  253. # is EXPORTS), use it as is.
  254. # If DATA tags from a recent dlltool are present, honour them!
  255. - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
  256. + archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
  257. cp $export_symbols $output_objdir/$soname-def;
  258. else
  259. echo EXPORTS > $output_objdir/$soname-def;
  260. diff -Naur gcc-4.2.1.orig/ltcf-gcj.sh gcc-4.2.1/ltcf-gcj.sh
  261. --- gcc-4.2.1.orig/ltcf-gcj.sh 2005-07-15 22:30:53.000000000 -0400
  262. +++ gcc-4.2.1/ltcf-gcj.sh 2007-07-22 19:31:03.000000000 -0400
  263. @@ -156,7 +156,7 @@
  264. # If the export-symbols file already is a .def file (1st line
  265. # is EXPORTS), use it as is.
  266. # If DATA tags from a recent dlltool are present, honour them!
  267. - archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
  268. + archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
  269. cp $export_symbols $output_objdir/$soname-def;
  270. else
  271. echo EXPORTS > $output_objdir/$soname-def;