summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Palachev <i.palachev@samsung.com>2014-12-05 15:25:09 +0300
committerVyacheslav Barinov <v.barinov@samsung.com>2015-02-16 10:34:10 +0300
commitbeb4a5f76fb37aae9642239c64c9922935ccb245 (patch)
tree2a612ac134dd39cc61b8a4cdda1ce8bb88d28998
parent9bb157217c3994d7294155a64d3451d400fe68c7 (diff)
downloadbinutils-beb4a5f76fb37aae9642239c64c9922935ccb245.tar.gz
binutils-beb4a5f76fb37aae9642239c64c9922935ccb245.tar.bz2
binutils-beb4a5f76fb37aae9642239c64c9922935ccb245.zip
Enable Gold linker for cross-*-binutils build
Change-Id: I52f1fb61ac0c34153e0c50d1859a764de68bb285 Signed-off-by: Ilya Palachev <i.palachev@samsung.com>
-rw-r--r--packaging/binutils.spec27
-rw-r--r--packaging/cross-aarch64-binutils.spec27
-rw-r--r--packaging/cross-arm-binutils.spec27
-rw-r--r--packaging/cross-i386-binutils.spec27
-rw-r--r--packaging/cross-x86_64-binutils.spec27
5 files changed, 100 insertions, 35 deletions
diff --git a/packaging/binutils.spec b/packaging/binutils.spec
index 2d0c59ac28e..6b8093f9845 100644
--- a/packaging/binutils.spec
+++ b/packaging/binutils.spec
@@ -61,10 +61,8 @@ to compile a program or kernel.
Summary: The gold linker
License: GPL-3.0+
Group: Development/Building
-Requires: binutils = %{version}-%{release}
-%if 0%{!?cross:1}
+Requires: %{name} = %{version}-%{release}
%define gold_archs %ix86 %arm aarch64 x86_64 ppc ppc64 %sparc
-%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
@@ -210,6 +208,10 @@ TARGET_OS=%{TARGET}-tizen-linux
%endif
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
+ --enable-plugins \
+%ifarch %gold_archs
+ --enable-gold \
+%endif
--prefix=%{_prefix} \
--with-bugurl=http://bugs.opensuse.org/ \
--with-pkgversion="GNU Binutils; %{DIST}" \
@@ -251,6 +253,7 @@ cd build-dir
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
+
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@@ -266,6 +269,9 @@ ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%ifarch %gold_archs
+ln -sf ../../bin/ld.gold $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%endif
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
@@ -352,8 +358,7 @@ fi;
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
-%exclude %{_bindir}/gold
-%exclude %{_bindir}/ld.gold
+%exclude %{_bindir}/*gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
@@ -366,8 +371,16 @@ fi;
%files gold
%manifest %{name}.manifest
%defattr(-,root,root)
-%{_bindir}/gold
-%{_bindir}/ld.gold
+%{_bindir}/*gold
+%if 0%{?cross:1}
+%if "%{TARGET}" == "arm"
+%{_prefix}/%{TARGET}-tizen-linux-gnueabi/bin/*gold
+%else
+%{_prefix}/%{TARGET}-tizen-linux/bin/*gold
+%endif
+%else
+%{_prefix}/%{HOST}/bin/*gold
+%endif
%endif
%if 0%{!?cross:1}
diff --git a/packaging/cross-aarch64-binutils.spec b/packaging/cross-aarch64-binutils.spec
index 4f4824069f6..43d0e6476ae 100644
--- a/packaging/cross-aarch64-binutils.spec
+++ b/packaging/cross-aarch64-binutils.spec
@@ -63,10 +63,8 @@ to compile a program or kernel.
Summary: The gold linker
License: GPL-3.0+
Group: Development/Building
-Requires: binutils = %{version}-%{release}
-%if 0%{!?cross:1}
+Requires: %{name} = %{version}-%{release}
%define gold_archs %ix86 %arm aarch64 x86_64 ppc ppc64 %sparc
-%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
@@ -211,6 +209,10 @@ TARGET_OS=%{TARGET}-tizen-linux
%endif
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
+ --enable-plugins \
+%ifarch %gold_archs
+ --enable-gold \
+%endif
--prefix=%{_prefix} \
--with-bugurl=http://bugs.opensuse.org/ \
--with-pkgversion="GNU Binutils; %{DIST}" \
@@ -252,6 +254,7 @@ cd build-dir
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
+
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@@ -267,6 +270,9 @@ ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%ifarch %gold_archs
+ln -sf ../../bin/ld.gold $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%endif
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
@@ -352,8 +358,7 @@ fi;
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
-%exclude %{_bindir}/gold
-%exclude %{_bindir}/ld.gold
+%exclude %{_bindir}/*gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
@@ -365,8 +370,16 @@ fi;
%ifarch %gold_archs
%files gold
%defattr(-,root,root)
-%{_bindir}/gold
-%{_bindir}/ld.gold
+%{_bindir}/*gold
+%if 0%{?cross:1}
+%if "%{TARGET}" == "arm"
+%{_prefix}/%{TARGET}-tizen-linux-gnueabi/bin/*gold
+%else
+%{_prefix}/%{TARGET}-tizen-linux/bin/*gold
+%endif
+%else
+%{_prefix}/%{HOST}/bin/*gold
+%endif
%endif
%if 0%{!?cross:1}
diff --git a/packaging/cross-arm-binutils.spec b/packaging/cross-arm-binutils.spec
index 0bde260f4f2..c9887a36df7 100644
--- a/packaging/cross-arm-binutils.spec
+++ b/packaging/cross-arm-binutils.spec
@@ -63,10 +63,8 @@ to compile a program or kernel.
Summary: The gold linker
License: GPL-3.0+
Group: Development/Building
-Requires: binutils = %{version}-%{release}
-%if 0%{!?cross:1}
+Requires: %{name} = %{version}-%{release}
%define gold_archs %ix86 %arm aarch64 x86_64 ppc ppc64 %sparc
-%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
@@ -211,6 +209,10 @@ TARGET_OS=%{TARGET}-tizen-linux
%endif
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
+ --enable-plugins \
+%ifarch %gold_archs
+ --enable-gold \
+%endif
--prefix=%{_prefix} \
--with-bugurl=http://bugs.opensuse.org/ \
--with-pkgversion="GNU Binutils; %{DIST}" \
@@ -252,6 +254,7 @@ cd build-dir
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
+
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@@ -267,6 +270,9 @@ ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%ifarch %gold_archs
+ln -sf ../../bin/ld.gold $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%endif
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
@@ -352,8 +358,7 @@ fi;
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
-%exclude %{_bindir}/gold
-%exclude %{_bindir}/ld.gold
+%exclude %{_bindir}/*gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
@@ -365,8 +370,16 @@ fi;
%ifarch %gold_archs
%files gold
%defattr(-,root,root)
-%{_bindir}/gold
-%{_bindir}/ld.gold
+%{_bindir}/*gold
+%if 0%{?cross:1}
+%if "%{TARGET}" == "arm"
+%{_prefix}/%{TARGET}-tizen-linux-gnueabi/bin/*gold
+%else
+%{_prefix}/%{TARGET}-tizen-linux/bin/*gold
+%endif
+%else
+%{_prefix}/%{HOST}/bin/*gold
+%endif
%endif
%if 0%{!?cross:1}
diff --git a/packaging/cross-i386-binutils.spec b/packaging/cross-i386-binutils.spec
index e25e0f3937d..9f68dabe26b 100644
--- a/packaging/cross-i386-binutils.spec
+++ b/packaging/cross-i386-binutils.spec
@@ -63,10 +63,8 @@ to compile a program or kernel.
Summary: The gold linker
License: GPL-3.0+
Group: Development/Building
-Requires: binutils = %{version}-%{release}
-%if 0%{!?cross:1}
+Requires: %{name} = %{version}-%{release}
%define gold_archs %ix86 %arm aarch64 x86_64 ppc ppc64 %sparc
-%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
@@ -211,6 +209,10 @@ TARGET_OS=%{TARGET}-tizen-linux
%endif
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
+ --enable-plugins \
+%ifarch %gold_archs
+ --enable-gold \
+%endif
--prefix=%{_prefix} \
--with-bugurl=http://bugs.opensuse.org/ \
--with-pkgversion="GNU Binutils; %{DIST}" \
@@ -252,6 +254,7 @@ cd build-dir
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
+
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@@ -267,6 +270,9 @@ ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%ifarch %gold_archs
+ln -sf ../../bin/ld.gold $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%endif
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
@@ -352,8 +358,7 @@ fi;
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
-%exclude %{_bindir}/gold
-%exclude %{_bindir}/ld.gold
+%exclude %{_bindir}/*gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
@@ -365,8 +370,16 @@ fi;
%ifarch %gold_archs
%files gold
%defattr(-,root,root)
-%{_bindir}/gold
-%{_bindir}/ld.gold
+%{_bindir}/*gold
+%if 0%{?cross:1}
+%if "%{TARGET}" == "arm"
+%{_prefix}/%{TARGET}-tizen-linux-gnueabi/bin/*gold
+%else
+%{_prefix}/%{TARGET}-tizen-linux/bin/*gold
+%endif
+%else
+%{_prefix}/%{HOST}/bin/*gold
+%endif
%endif
%if 0%{!?cross:1}
diff --git a/packaging/cross-x86_64-binutils.spec b/packaging/cross-x86_64-binutils.spec
index f4741c586fe..df3743b44de 100644
--- a/packaging/cross-x86_64-binutils.spec
+++ b/packaging/cross-x86_64-binutils.spec
@@ -63,10 +63,8 @@ to compile a program or kernel.
Summary: The gold linker
License: GPL-3.0+
Group: Development/Building
-Requires: binutils = %{version}-%{release}
-%if 0%{!?cross:1}
+Requires: %{name} = %{version}-%{release}
%define gold_archs %ix86 %arm aarch64 x86_64 ppc ppc64 %sparc
-%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
@@ -211,6 +209,10 @@ TARGET_OS=%{TARGET}-tizen-linux
%endif
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
+ --enable-plugins \
+%ifarch %gold_archs
+ --enable-gold \
+%endif
--prefix=%{_prefix} \
--with-bugurl=http://bugs.opensuse.org/ \
--with-pkgversion="GNU Binutils; %{DIST}" \
@@ -252,6 +254,7 @@ cd build-dir
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
+
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@@ -267,6 +270,9 @@ ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%ifarch %gold_archs
+ln -sf ../../bin/ld.gold $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
+%endif
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
@@ -352,8 +358,7 @@ fi;
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
-%exclude %{_bindir}/gold
-%exclude %{_bindir}/ld.gold
+%exclude %{_bindir}/*gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
@@ -365,8 +370,16 @@ fi;
%ifarch %gold_archs
%files gold
%defattr(-,root,root)
-%{_bindir}/gold
-%{_bindir}/ld.gold
+%{_bindir}/*gold
+%if 0%{?cross:1}
+%if "%{TARGET}" == "arm"
+%{_prefix}/%{TARGET}-tizen-linux-gnueabi/bin/*gold
+%else
+%{_prefix}/%{TARGET}-tizen-linux/bin/*gold
+%endif
+%else
+%{_prefix}/%{HOST}/bin/*gold
+%endif
%endif
%if 0%{!?cross:1}