rpms/binutils/devel binutils-2.18.50.0.9-output-format.sed, NONE, 1.1 binutils.spec, 1.139, 1.140

Jan Kratochvil jkratoch at fedoraproject.org
Mon Sep 22 10:43:55 UTC 2008


Author: jkratoch

Update of /cvs/pkgs/rpms/binutils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9478

Modified Files:
	binutils.spec 
Added Files:
	binutils-2.18.50.0.9-output-format.sed 
Log Message:
* Mon Sep 22 2008 Jan Kratochvil <jan.kratochvil at redhat.com> 2.18.50.0.9-4
- Fix *.so scripts for multilib linking (BZ 463101, suggested by Jakub Jelinek).



--- NEW FILE binutils-2.18.50.0.9-output-format.sed ---
# Generate OUTPUT_FORMAT line for .so files from the system linker output.
# Imported from glibc/Makerules.

/ld.*[ 	]-E[BL]/b f
/collect.*[ 	]-E[BL]/b f
/OUTPUT_FORMAT[^)]*$/{N
s/\n[	 ]*/ /
}
t o
: o
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
t q
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
t s
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
t q
d
: s
s/"//g
G
s/\n//
s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
q
: q
s/"//g
p
q
: f
s/^.*[ 	]-E\([BL]\)[ 	].*$/,\1/
t h
s/^.*[ 	]-E\([BL]\)$/,\1/
t h
d
: h
h


Index: binutils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/binutils/devel/binutils.spec,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -r1.139 -r1.140
--- binutils.spec	22 Sep 2008 00:03:40 -0000	1.139
+++ binutils.spec	22 Sep 2008 10:43:25 -0000	1.140
@@ -17,11 +17,12 @@
 Summary: A GNU collection of binary utilities
 Name: %{?cross}binutils%{?_with_debug:-debug}
 Version: 2.18.50.0.9
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
 Source: ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
+Source2: binutils-2.18.50.0.9-output-format.sed
 Patch1: binutils-2.18.50.0.6-ltconfig-multilib.patch
 Patch2: binutils-2.18.50.0.6-ppc64-pie.patch
 Patch3: binutils-2.18.50.0.8-place-orphan.patch
@@ -235,15 +236,29 @@
 %endif
 touch -r bfd/bfd-in2.h %{buildroot}%{_prefix}/include/bfd.h
 
-cat >%{buildroot}%{_prefix}/%{_lib}/libbfd.so <<EOH
-/* GNU ld script
-   The libz dependency is unexpected by legacy build scripts.  */
+# Generate .so linker scripts for dependencies; imported from glibc/Makerules:
 
+# This fragment of linker script gives the OUTPUT_FORMAT statement
+# for the configuration we are building.
+OUTPUT_FORMAT="\
+/* Ensure this .so library will not be used by a link for a different format
+   on a multi-architecture system.  */
+$(gcc $CFLAGS $LDFLAGS -shared -x c /dev/null -o /dev/null -Wl,--verbose -v 2>&1 | sed -n -f "%{SOURCE2}")"
+
+tee %{buildroot}%{_prefix}/%{_lib}/libbfd.so <<EOH
+/* GNU ld script */
+
+$OUTPUT_FORMAT
+
+/* The libz dependency is unexpected by legacy build scripts.  */
 INPUT ( %{_libdir}/libbfd.a -liberty -lz )
 EOH
-cat >%{buildroot}%{_prefix}/%{_lib}/libopcodes.so <<EOH
+
+tee %{buildroot}%{_prefix}/%{_lib}/libopcodes.so <<EOH
 /* GNU ld script */
 
+$OUTPUT_FORMAT
+
 INPUT ( %{_libdir}/libopcodes.a -lbfd )
 EOH
 
@@ -332,6 +347,9 @@
 %endif # %{isnative}
 
 %changelog
+* Mon Sep 22 2008 Jan Kratochvil <jan.kratochvil at redhat.com> 2.18.50.0.9-4
+- Fix *.so scripts for multilib linking (BZ 463101, suggested by Jakub Jelinek).
+
 * Sun Sep 21 2008 Jan Kratochvil <jan.kratochvil at redhat.com> 2.18.50.0.9-3
 - Provide libbfd.so and libopcodes.so for automatic dependencies (BZ 463101).
 - Fix .eh_frame_hdr build on C++ files with discarded common groups (BZ 458950).




More information about the fedora-extras-commits mailing list