summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChan Lee <chan45.lee@samsung.com>2017-03-24 10:11:03 +0900
committerChan Lee <chan45.lee@samsung.com>2017-03-28 00:45:50 -0700
commit31d784941e9c24a19a5499b88d72a9faf009deeb (patch)
tree6546d74dca9703eea4b1110504d77d9900d886d3
parent03495b1e7d90e4d15d07bdc8f318ceeebe3498e5 (diff)
downloadqemu-accel-31d784941e9c24a19a5499b88d72a9faf009deeb.tar.gz
qemu-accel-31d784941e9c24a19a5499b88d72a9faf009deeb.tar.bz2
qemu-accel-31d784941e9c24a19a5499b88d72a9faf009deeb.zip
packaging: add libgcc-32bit for multilib supportsubmit/tizen_base/20170414.080151accepted/tizen/base/20170414.164503
Some packages need to use libgcc-32bit on 64bit build environment such as nacl toolchain. Change-Id: I07c08ec4add0637ada256c9bda004b7a503fc861 Signed-off-by: Chan Lee <chan45.lee@samsung.com>
-rw-r--r--packaging/qemu-accel-aarch64.spec14
-rw-r--r--packaging/qemu-accel-armv7l.spec14
-rw-r--r--packaging/qemu-accel.spec.in14
3 files changed, 39 insertions, 3 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec
index f5095da..6d9a9ee 100644
--- a/packaging/qemu-accel-aarch64.spec
+++ b/packaging/qemu-accel-aarch64.spec
@@ -65,6 +65,7 @@ License: GPL-2.0
Group: Development/Cross Compilation
ExclusiveArch: x86_64 %{ix86}
%ifarch x86_64
+BuildRequires: libgcc-32bit
BuildRequires: glibc-32bit
%define multilib 1
%endif
@@ -201,8 +202,11 @@ cross_ld_symlink=$(basename `rpm -ql glibc-32bit | grep -E 'ld-linux\.so\.[[:dig
# Patch all 32bit binaries to use the right ld.so though symlink
mkdir -p %{buildroot}%{our_path}%{_prefix}/lib
mkdir -p %{buildroot}%{our_path}/lib
-for f in $(rpm -ql glibc-32bit)
+for f in $(rpm -ql glibc-32bit) \
+ $(rpm -ql libgcc-32bit)
do
+ fdir=$(dirname $f)
+ [ ! -d %{buildroot}/%{our_path}/$fdir ] && mkdir -p %{buildroot}/%{our_path}/$fdir
cp -a $f %{buildroot}/%{our_path}/$f
done
@@ -216,6 +220,14 @@ mv ${i686_libdir}/${cross_ld_so} ${i686_libdir}/${new_cross_ld_so}
# 2. Force the symlink to point the right file.
ln -sf %{our_path}/lib/${new_cross_ld_so} ${i686_libdir}/${cross_ld_symlink}
+
+# create symlinks for libgcc-32bit
+# libgcc-32bit library is placed under %{_libdir}/gcc/%{target_arch}/${gcc_version}/32/ not just /lib for 32bit
+for f in $(rpm -ql libgcc-32bit)
+do
+ filename=$(basename $f)
+ ln -sf %{our_path}/$f ${i686_libdir}/${filename}
+done
}
# create symlinks for bash
diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec
index 5c392e9..cd01b04 100644
--- a/packaging/qemu-accel-armv7l.spec
+++ b/packaging/qemu-accel-armv7l.spec
@@ -65,6 +65,7 @@ License: GPL-2.0
Group: Development/Cross Compilation
ExclusiveArch: x86_64 %{ix86}
%ifarch x86_64
+BuildRequires: libgcc-32bit
BuildRequires: glibc-32bit
%define multilib 1
%endif
@@ -201,8 +202,11 @@ cross_ld_symlink=$(basename `rpm -ql glibc-32bit | grep -E 'ld-linux\.so\.[[:dig
# Patch all 32bit binaries to use the right ld.so though symlink
mkdir -p %{buildroot}%{our_path}%{_prefix}/lib
mkdir -p %{buildroot}%{our_path}/lib
-for f in $(rpm -ql glibc-32bit)
+for f in $(rpm -ql glibc-32bit) \
+ $(rpm -ql libgcc-32bit)
do
+ fdir=$(dirname $f)
+ [ ! -d %{buildroot}/%{our_path}/$fdir ] && mkdir -p %{buildroot}/%{our_path}/$fdir
cp -a $f %{buildroot}/%{our_path}/$f
done
@@ -216,6 +220,14 @@ mv ${i686_libdir}/${cross_ld_so} ${i686_libdir}/${new_cross_ld_so}
# 2. Force the symlink to point the right file.
ln -sf %{our_path}/lib/${new_cross_ld_so} ${i686_libdir}/${cross_ld_symlink}
+
+# create symlinks for libgcc-32bit
+# libgcc-32bit library is placed under %{_libdir}/gcc/%{target_arch}/${gcc_version}/32/ not just /lib for 32bit
+for f in $(rpm -ql libgcc-32bit)
+do
+ filename=$(basename $f)
+ ln -sf %{our_path}/$f ${i686_libdir}/${filename}
+done
}
# create symlinks for bash
diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in
index 77962c1..fc0225a 100644
--- a/packaging/qemu-accel.spec.in
+++ b/packaging/qemu-accel.spec.in
@@ -62,6 +62,7 @@ License: GPL-2.0
Group: Development/Cross Compilation
ExclusiveArch: x86_64 %{ix86}
%ifarch x86_64
+BuildRequires: libgcc-32bit
BuildRequires: glibc-32bit
%define multilib 1
%endif
@@ -198,8 +199,11 @@ cross_ld_symlink=$(basename `rpm -ql glibc-32bit | grep -E 'ld-linux\.so\.[[:dig
# Patch all 32bit binaries to use the right ld.so though symlink
mkdir -p %{buildroot}%{our_path}%{_prefix}/lib
mkdir -p %{buildroot}%{our_path}/lib
-for f in $(rpm -ql glibc-32bit)
+for f in $(rpm -ql glibc-32bit) \
+ $(rpm -ql libgcc-32bit)
do
+ fdir=$(dirname $f)
+ [ ! -d %{buildroot}/%{our_path}/$fdir ] && mkdir -p %{buildroot}/%{our_path}/$fdir
cp -a $f %{buildroot}/%{our_path}/$f
done
@@ -213,6 +217,14 @@ mv ${i686_libdir}/${cross_ld_so} ${i686_libdir}/${new_cross_ld_so}
# 2. Force the symlink to point the right file.
ln -sf %{our_path}/lib/${new_cross_ld_so} ${i686_libdir}/${cross_ld_symlink}
+
+# create symlinks for libgcc-32bit
+# libgcc-32bit library is placed under %{_libdir}/gcc/%{target_arch}/${gcc_version}/32/ not just /lib for 32bit
+for f in $(rpm -ql libgcc-32bit)
+do
+ filename=$(basename $f)
+ ln -sf %{our_path}/$f ${i686_libdir}/${filename}
+done
}
# create symlinks for bash