diff --git a/package/base/binutils/binutils-2.17-posix-1.patch b/package/base/binutils/binutils-2.17-posix-1.patch new file mode 100644 index 000000000..e6ff124c4 --- /dev/null +++ b/package/base/binutils/binutils-2.17-posix-1.patch @@ -0,0 +1,100 @@ +Copied from www.linuxfromscratch.org to ROCK Linux. + +Submitted By: Jim Gifford (patches at jg555 dot com) +Date: 2005-05-06 +Initial Package Version: 2.16 +Origin: http://ttervo.vectorstar.net/nptl/posix-patches/binutils-2.14.90.0.7-posix-head-tail.patch +Upstream Status: Accepted/but Suspended +Description: Makes Posix Compliant + Rediffed against 2.16 by Jeremy Huntwork + +diff -Naur binutils-2.16-ORIG/gas/Makefile.am binutils-2.16/gas/Makefile.am +--- binutils-2.16-ORIG/gas/Makefile.am 2005-03-22 10:31:44.000000000 -0500 ++++ binutils-2.16/gas/Makefile.am 2005-05-06 17:08:11.859876859 -0400 +@@ -762,13 +762,13 @@ + against=stage2 + + # This rule is derived from corresponding code in the Makefile.in for gcc. +-# The "tail +16c" is to bypass headers which may include timestamps or ++# The "tail -c +16" is to bypass headers which may include timestamps or + # temporary assembly file names. + comparison: + x=0 ; \ + for file in *.o ; do \ +- tail +16c ./$$file > tmp-foo1; \ +- if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \ ++ tail -c +16 ./$$file > tmp-foo1; \ ++ if tail -c +16 ${against}/$$file > tmp-foo2 2>/dev/null ; then \ + if cmp tmp-foo1 tmp-foo2 ; then \ + true ; \ + else \ +diff -Naur binutils-2.16-ORIG/gas/Makefile.in binutils-2.16/gas/Makefile.in +--- binutils-2.16-ORIG/gas/Makefile.in 2005-04-29 09:57:16.000000000 -0400 ++++ binutils-2.16/gas/Makefile.in 2005-05-06 17:08:11.868875659 -0400 +@@ -3164,13 +3164,13 @@ + if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi + + # This rule is derived from corresponding code in the Makefile.in for gcc. +-# The "tail +16c" is to bypass headers which may include timestamps or ++# The "tail -c +16" is to bypass headers which may include timestamps or + # temporary assembly file names. + comparison: + x=0 ; \ + for file in *.o ; do \ +- tail +16c ./$$file > tmp-foo1; \ +- if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \ ++ tail -c +16 ./$$file > tmp-foo1; \ ++ if tail -c +16 ${against}/$$file > tmp-foo2 2>/dev/null ; then \ + if cmp tmp-foo1 tmp-foo2 ; then \ + true ; \ + else \ +diff -Naur binutils-2.16-ORIG/ld/testsuite/ld-bootstrap/bootstrap.exp binutils-2.16/ld/testsuite/ld-bootstrap/bootstrap.exp +--- binutils-2.16-ORIG/ld/testsuite/ld-bootstrap/bootstrap.exp 2005-03-03 06:52:06.000000000 -0500 ++++ binutils-2.16/ld/testsuite/ld-bootstrap/bootstrap.exp 2005-05-06 17:08:11.870875393 -0400 +@@ -149,8 +149,8 @@ + # Although this works, a way to set the date would be better. + # Removing or zeroing the date stamp in the binary produced by + # the linker is not possible as it is required by the target OS. +- exec tail +140 tmpdir/ld2 >tmpdir/ld2tail +- exec tail +140 tmpdir/ld3 >tmpdir/ld3tail ++ exec tail -n +140 tmpdir/ld2 >tmpdir/ld2tail ++ exec tail -n +140 tmpdir/ld3 >tmpdir/ld3tail + catch "exec cmp tmpdir/ld2tail tmpdir/ld3tail" exec_output + exec rm tmpdir/ld2tail tmpdir/ld3tail + } else { +diff -Naur binutils-2.16-ORIG/ltcf-c.sh binutils-2.16/ltcf-c.sh +--- binutils-2.16-ORIG/ltcf-c.sh 2004-10-05 09:34:42.000000000 -0400 ++++ binutils-2.16/ltcf-c.sh 2005-05-06 17:08:11.873874993 -0400 +@@ -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 binutils-2.16-ORIG/ltcf-gcj.sh binutils-2.16/ltcf-gcj.sh +--- binutils-2.16-ORIG/ltcf-gcj.sh 2004-07-21 15:21:41.000000000 -0400 ++++ binutils-2.16/ltcf-gcj.sh 2005-05-06 17:08:11.876874593 -0400 +@@ -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 binutils-2.16-ORIG/src-release binutils-2.16/src-release +--- binutils-2.16-ORIG/src-release 2004-12-03 05:30:06.000000000 -0500 ++++ binutils-2.16/src-release 2005-05-06 17:08:11.878874327 -0400 +@@ -69,7 +69,7 @@ + elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ + sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ + elif test -f $(TOOL)/version.in; then \ +- head -1 $(TOOL)/version.in; \ ++ head -n 1 $(TOOL)/version.in; \ + elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \ + sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ + else \ diff --git a/package/base/binutils/binutils.conf b/package/base/binutils/binutils.conf index 64e9b1b54..1f4974238 100644 --- a/package/base/binutils/binutils.conf +++ b/package/base/binutils/binutils.conf @@ -1,3 +1,4 @@ +#!/bin/bash # --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. @@ -21,16 +22,17 @@ # --- ROCK-COPYRIGHT-NOTE-END --- pkg_binutils_cross="" - -#this fixes a problem with flex -var_append confopt " " "--disable-werror" +pkg_binutils_target="$arch_target" case "$xpkg" in $pkg-cross-*) - pkg_binutils_cross="${xpkg#**-cross-}" - var_append confopt " " "--target=$pkg_binutils_cross-unknown-linux-gnu" + pkg_binutils_cross="${xpkg#*-cross-}" + pkg_binutils_target="$pkg_binutils_cross-unknown-linux-gnu" + var_append confopt " " "--target=$pkg_binutils_target" echo_status "Preparing to build a cross-binutils package for $pkg_binutils_cross." - var_append INSTALL_WRAPPER_FILTER "|" 'sed -r "\,/share/(info|locale)/|/lib.*/libiberty.a, d"' + var_append INSTALL_WRAPPER_FILTER "|" 'sed -r "\,/share/(info|locale)/, d"' + # This makes libiberty install in /usr/$pkg_binutils_target/lib instead of /usr/lib. + var_append extraconfopt " " "--with-cross-host" ;; $pkg) ;; @@ -40,20 +42,49 @@ case "$xpkg" in ;; esac -binutils_stage0() { - bindir="$root/$prefix/crosscc"; mkdir -p $root/$prefix/crosscc - eval ./configure --program-prefix=${arch_target}- $confopt - make all install -} +if [ $stagelevel -eq 0 ] ; then + configprefix="" + makeopt="" + makeinstopt="install" -if [ $stagelevel -eq 0 ]; then - custmain="binutils_stage0" + confopt="--prefix=$root/$cross_tools \ + --host=${CLFS_HOST} --target=${CLFS_TARGET} --with-sysroot=$CLFS \ + --disable-nls" +fi +if [ -z "$pkg_binutils_cross" ] ; then + # This causes build errors with binutils-cross packages. + var_append extraconfopt " " "--enable-shared" +fi +if [ "$ROCKCFG_MULTILIB" = 0 ] ; then + var_append extraconfopt " " "--disable-multilib" else - preconf="mkdir -p objdir ; cd objdir" ; configscript="../configure" - if [ $stagelevel -gt 2 ] ; then - var_remove confopt " " "--disable-static" - hook_add postmake 3 "eval $MAKE info install-info" - hook_add postmake 3 "eval $MAKE -C gas/doc install-man" - fi + var_append extraconfopt " " "--enable-multilib" fi +# var_append extraconfopt " " "--enable-64-bit-bfd" +# Don't treat warnings as errors. +var_append extraconfopt " " "--disable-werror" + +custmain=binutils_main + +binutils_main() { + mkdir ../objdir ; cd ../objdir + eval $configprefix ../binutils-*/configure $confopt + + make configure-host + + eval make $makeopt + + if [ $stagelevel -eq 4 ] ; then + make check || true + fi + + eval make $makeinstopt + + if [ -z "$pkg_binutils_cross" ] ; then + cp -v ../binutils-*/include/libiberty.h $root/usr/include/ + else + cp -v ../binutils-*/include/libiberty.h \ + $root/usr/$pkg_binutils_target/include/ + fi +} diff --git a/package/base/binutils/binutils.desc b/package/base/binutils/binutils.desc index 421f5dd43..0dd13872f 100644 --- a/package/base/binutils/binutils.desc +++ b/package/base/binutils/binutils.desc @@ -38,7 +38,7 @@ [L] GPL [S] Stable [V] 2.17.50.0.16 -[P] X 012------9 101.100 +[P] X 0-2-4----9 100.200 [D] 2774795479 binutils-2.17.50.0.16.tar.bz2 ftp://ftp.kernel.org/pub/linux/devel/binutils/ diff --git a/package/base/binutils/have_stdlib.patch b/package/base/binutils/have_stdlib.patch deleted file mode 100644 index 22bf8346a..000000000 --- a/package/base/binutils/have_stdlib.patch +++ /dev/null @@ -1,34 +0,0 @@ -# --- 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/binutils/have_stdlib.patch -# ROCK Linux is Copyright (C) 1998 - 2006 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 --- - ---- ./libiberty/cplus-dem.c.orig Thu Nov 8 01:11:59 2001 -+++ ./libiberty/cplus-dem.c Thu Nov 8 01:14:09 2001 -@@ -48,12 +48,7 @@ - #pragma weak dlerror - #endif - --#ifdef HAVE_STDLIB_H - #include --#else --char * malloc (); --char * realloc (); --#endif - - #include - #undef CURRENT_DEMANGLING_STYLE