rpms/arm-gp2x-linux-binutils/devel README.fedora, NONE, 1.1 arm-gp2x-linux-binutils.spec, NONE, 1.1 binutils-2.15-psignal.patch, NONE, 1.1 binutils-2.16.1-fortify-source.patch, NONE, 1.1 binutils-skip-comments.patch, NONE, 1.1 cross-gprof.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Fri Jul 27 21:02:11 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/arm-gp2x-linux-binutils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17059/devel

Modified Files:
	.cvsignore sources 
Added Files:
	README.fedora arm-gp2x-linux-binutils.spec 
	binutils-2.15-psignal.patch 
	binutils-2.16.1-fortify-source.patch 
	binutils-skip-comments.patch cross-gprof.patch 
Log Message:
initial arm-gp2x-linux-binutils import



--- NEW FILE README.fedora ---
This package does not include the gnu texinfo documentation because this would
conflict with the native binutils. If you've installed the native binutils,
you can find the info documentation there, notice that this might be for a
different version though!


--- NEW FILE arm-gp2x-linux-binutils.spec ---
%define target arm-gp2x-linux

Name:           %{target}-binutils
Version:        2.16.1
Release:        2%{?dist}
Summary:        Cross Compiling GNU binutils targeted at %{target}
Group:          Development/Tools
License:        GPL
URL:            http://www.gnu.org/software/binutils/
Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{version}.tar.bz2
Source1:        README.fedora
Patch0:         http://kegel.com/crosstool/crosstool-0.43/patches/binutils-2.16.1/binutils-2.15-psignal.patch
Patch1:         http://kegel.com/crosstool/crosstool-0.43/patches/binutils-2.16.1/binutils-skip-comments.patch
Patch2:         http://kegel.com/crosstool/crosstool-0.43/patches/binutils-2.16.1/cross-gprof.patch
Patch3:         binutils-2.16.1-fortify-source.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)

%description
This is a Cross Compiling version of GNU binutils, which can be used to
assemble and link binaries for the %{target} platform, instead of for the
native %{_arch} platform.


%prep
%setup -q -c
pushd binutils-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
popd
cp %{SOURCE1} .


%build
mkdir -p build
pushd build
CFLAGS="$RPM_OPT_FLAGS" ../binutils-%{version}/configure --prefix=%{_prefix} \
  --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \
  --target=%{target} --disable-werror --disable-nls
make %{?_smp_mflags}
popd build


%install
rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
popd build
# these are for win targets only
rm $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{dlltool,nlmconv,windres}.1
# we don't want these as we are a cross version
rm -r $RPM_BUILD_ROOT%{_infodir}
rm    $RPM_BUILD_ROOT%{_libdir}/libiberty.a


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc binutils-%{version}/COPYING binutils-%{version}/COPYING.LIB
%doc binutils-%{version}/README README.fedora
%{_prefix}/%{target}
%{_bindir}/%{target}-*
%{_mandir}/man1/%{target}-*.1.gz


%changelog
* Mon Jun  4 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.16.1-2
- Add a patch from rtems fixing the issues when building with
  -DFORTIFY_SOURCE=2, thanks Ralf!

* Thu May 24 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.16.1-1
- Revert to GNU 2.16.1 release as that is what open2x uses and glibc-2.3.6
  doesn't compile with newer binutils
- Merge in all changes from avr-binutils
- Add various patches from the crosstool project (also used by open2x):
  http://open2x.svn.sourceforge.net/viewvc/open2x/trunk/toolchain-new/patches/binutils-2.16.1/

* Sun Apr  1 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.17.50.0.12-1
- Bump to 2.17.50.0.12, to sync with rawhide / Fedora 7
- "Dynamicly Generate" README.fedora so that macros can be used

* Thu Mar 29 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.17.50.0.9-1
- Bump to 2.17.50.0.9
- Use %%configure instead of ./configure
- Various fixups

* Wed Mar 28 2007 Koos Termeulen koostermeulen at gmail.com 2.17-1
- New version and some changes after unofficial review by Hans de Goede

* Wed Mar 21 2007 Koos Termeulen koostermeulen at gmail.com 2.16.1-1
- Initial release

binutils-2.15-psignal.patch:

--- NEW FILE binutils-2.15-psignal.patch ---
Make psignal prototype in libiberty match that in glibc.

Fixes:

gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
/usr/include/signal.h:131: prototype declaration
gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
/usr/include/signal.h:131: prototype declaration
gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
mprotect... make[1]: *** [strsignal.o] Error 1
make[1]: Leaving directory `/export/hda3/dkegel/queue/jobdir.produser_cpsm17/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/build-binutils/libiberty'
make: *** [all-libiberty] Error 2

when building on red hat 7.1
though it's a bit of a mystery why libiberty's psignal is being compiled at
all, since red hat 7.1's glibc supports psignal (hence the error message)

--- binutils-2.15/libiberty/strsignal.c.old	2005-04-18 13:57:40.000000000 -0700
+++ binutils-2.15/libiberty/strsignal.c	2005-04-18 13:59:09.000000000 -0700
@@ -544,7 +544,7 @@
 
 /*
 
- at deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
+ at deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
 
 Print @var{message} to the standard error, followed by a colon,
 followed by the description of the signal specified by @var{signo},
@@ -557,9 +557,7 @@
 #ifndef HAVE_PSIGNAL
 
 void
-psignal (signo, message)
-  unsigned signo;
-  char *message;
+psignal (int signo, const char *message)
 {
   if (signal_names == NULL)
     {

binutils-2.16.1-fortify-source.patch:

--- NEW FILE binutils-2.16.1-fortify-source.patch ---
--- binutils-2.16.1/bfd/archive.c	3 Mar 2005 11:40:56 -0000	1.34
+++ binutils-2.16.1/bfd/archive.c	8 Jul 2005 06:28:30 -0000
@@ -1308,6 +1308,13 @@
 #define getgid() 0
 #endif
 
+static void print_ar_size( struct ar_hdr* hdr, int val )
+{
+  char buffer[sizeof(hdr->ar_size)+1];
+  sprintf(buffer,"%-10d", val);
+  memcpy(hdr->ar_size,buffer,sizeof(hdr->ar_size));
+}
+
 /* Takes a filename, returns an arelt_data for it, or NULL if it can't
    make one.  The filename must refer to a filename in the filesystem.
    The filename field of the ar_hdr will NOT be initialized.  If member
@@ -1368,7 +1375,7 @@
 #endif
   sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid);
   sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode);
-  sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size);
+  print_ar_size(hdr, (long) status.st_size);
   /* Correct for a lossage in sprintf whereby it null-terminates.  I cannot
      understand how these C losers could design such a ramshackle bunch of
      IO operations.  */
@@ -1660,7 +1667,7 @@
       memset (&hdr, 0, sizeof (struct ar_hdr));
       strcpy (hdr.ar_name, ename);
       /* Round size up to even number in archive header.  */
-      sprintf (&(hdr.ar_size[0]), "%-10d",
+      print_ar_size(&hdr,
 	       (int) ((elength + 1) & ~(bfd_size_type) 1));
       strncpy (hdr.ar_fmag, ARFMAG, 2);
       for (i = 0; i < sizeof (struct ar_hdr); i++)
@@ -1913,7 +1920,7 @@
   sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp);
   sprintf (hdr.ar_uid, "%ld", (long) getuid ());
   sprintf (hdr.ar_gid, "%ld", (long) getgid ());
-  sprintf (hdr.ar_size, "%-10d", (int) mapsize);
+  print_ar_size(&hdr, (int) mapsize);
   strncpy (hdr.ar_fmag, ARFMAG, 2);
   for (i = 0; i < sizeof (struct ar_hdr); i++)
     if (((char *) (&hdr))[i] == '\0')
@@ -2068,7 +2075,7 @@
 
   memset (&hdr, 0, sizeof (struct ar_hdr));
   hdr.ar_name[0] = '/';
-  sprintf (hdr.ar_size, "%-10d", (int) mapsize);
+  print_ar_size (&hdr, (int) mapsize);
   sprintf (hdr.ar_date, "%ld", (long) time (NULL));
   /* This, at least, is what Intel coff sets the values to.  */
   sprintf ((hdr.ar_uid), "%d", 0);

binutils-skip-comments.patch:

--- NEW FILE binutils-skip-comments.patch ---
[removed first hunk so it would apply to 2.16.1 - copyright date already updated - dank]

Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
Fixes
localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3

Paths adjusted to match crosstool's patcher.

Message-Id: m3n052qw2g.fsf at whitebox.m5r.de
From: Andreas Schwab <schwab at suse dot de>
To: Nathan Sidwell <nathan at codesourcery dot com>
Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
Date: Fri, 23 Apr 2004 22:27:19 +0200
Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line

Nathan Sidwell <nathan at codesourcery.com> writes:

> Index: read.c
> ===================================================================
> RCS file: /cvs/src/src/gas/read.c,v
> retrieving revision 1.76
> diff -c -3 -p -r1.76 read.c
> *** read.c	12 Mar 2004 17:48:12 -0000	1.76
> --- read.c	18 Mar 2004 09:56:05 -0000
> *************** read_a_source_file (char *name)
> *** 1053,1059 ****
>   #endif
>   	  input_line_pointer--;
>   	  /* Report unknown char as ignored.  */
> ! 	  ignore_rest_of_line ();
>   	}
>   
>   #ifdef md_after_pass_hook
> --- 1053,1059 ----
>   #endif
>   	  input_line_pointer--;
>   	  /* Report unknown char as ignored.  */
> ! 	  demand_empty_rest_of_line ();
>   	}
>   
>   #ifdef md_after_pass_hook

This means that the unknown character is no longer ignored, despite the
comment.  As a side effect a line starting with a line comment character
not followed by APP in NO_APP mode now triggers an error instead of just a
warning, breaking builds of glibc on m68k-linux.  Earlier in
read_a_source_file where #APP is handled there is another comment that
claims that unknown comments are ignored, when in fact they aren't (only
the initial line comment character is skipped).

Note that the presence of #APP will mess up the line counters, but
that appears to be difficult to fix.

Andreas.

2004-04-23  Andreas Schwab  <schwab at suse.de>

	* read.c (read_a_source_file): Ignore unknown text after line
	comment character.  Fix misleading comment.

--- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
+++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
@@ -950,10 +950,14 @@ read_a_source_file (char *name)
 	      unsigned int new_length;
 	      char *tmp_buf = 0;
 
-	      bump_line_counters ();
 	      s = input_line_pointer;
 	      if (strncmp (s, "APP\n", 4))
-		continue;	/* We ignore it */
+		{
+		  /* We ignore it */
+		  ignore_rest_of_line ();
+		  continue;
+		}
+	      bump_line_counters ();
 	      s += 4;
 
 	      sb_new (&sbuf);
@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
 	    continue;
 #endif
 	  input_line_pointer--;
-	  /* Report unknown char as ignored.  */
+	  /* Report unknown char as error.  */
 	  demand_empty_rest_of_line ();
 	}
 

-- 
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

cross-gprof.patch:

--- NEW FILE cross-gprof.patch ---
--- binutils-2.15/configure.old	2004-07-21 21:36:47.000000000 -0700
+++ binutils-2.15/configure	2004-07-21 21:37:08.000000000 -0700
@@ -999,7 +999,7 @@
 
 # Some tools are only suitable for building in a "native" situation.
 # Remove these if host!=target.  
-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
 
 # Similarly, some are only suitable for cross toolchains.
 # Remove these if host=target.
--- binutils-2.15/configure.in.old	2004-07-21 21:37:19.000000000 -0700
+++ binutils-2.15/configure.in	2004-07-21 21:37:34.000000000 -0700
@@ -236,7 +236,7 @@
 
 # Some tools are only suitable for building in a "native" situation.
 # Remove these if host!=target.  
-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
 
 # Similarly, some are only suitable for cross toolchains.
 # Remove these if host=target.


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/arm-gp2x-linux-binutils/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	27 Jul 2007 16:40:54 -0000	1.1
+++ .cvsignore	27 Jul 2007 21:01:38 -0000	1.2
@@ -0,0 +1 @@
+binutils-2.16.1.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/arm-gp2x-linux-binutils/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	27 Jul 2007 16:40:54 -0000	1.1
+++ sources	27 Jul 2007 21:01:38 -0000	1.2
@@ -0,0 +1 @@
+6a9d529efb285071dad10e1f3d2b2967  binutils-2.16.1.tar.bz2




More information about the scm-commits mailing list