summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorIlya Palachev <i.palachev@samsung.com>2014-08-12 15:59:48 +0400
committerIlya Palachev <i.palachev@samsung.com>2014-08-12 16:03:52 +0400
commit251a64d1bf61be4d75a82b7824dfac9282467b08 (patch)
treefc9e627cd2ac49b39b902acbafd416df57417c4f /packaging
parent547faf5b968f48421e18ace9511ab407184eb4f8 (diff)
downloadqemu-accel-251a64d1bf61be4d75a82b7824dfac9282467b08.tar.gz
qemu-accel-251a64d1bf61be4d75a82b7824dfac9282467b08.tar.bz2
qemu-accel-251a64d1bf61be4d75a82b7824dfac9282467b08.zip
This patch is intended to fix build issues that were ontained during the total rebuild of clone of Tizen:Common project. We have obtained several build issues during the build of packages gumd, libsolv and glibc -- because of some mistakes in wrapper scripts. Now they're fixed by: 1. Removing ( ) construction that caused always-true return value from the script (this caused some bugs during ./configure run for some packages) 2. Removing "exec" command, because otherwise we cannnot launch native ld is cross ld fails. 3. Parsing command line option string and removing option "--sysroot" from it -- when we're calling native ld instead of cross ld 4. Adding "exit $?" command to avoid second launch of ld binary Change-Id: Iaf60eaed9ae215b12eaa6a229190a71adb1562c8 Signed-off-by: Ilya Palachev <i.palachev@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/qemu-accel-aarch64.spec5
-rw-r--r--packaging/qemu-accel-armv7l.spec7
2 files changed, 7 insertions, 5 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec
index e369d6b..ec8ce99 100644
--- a/packaging/qemu-accel-aarch64.spec
+++ b/packaging/qemu-accel-aarch64.spec
@@ -328,11 +328,12 @@ if [ -n "$LD_LIBRARY_PATH" ]; then
fi
for i in "$@"; do
if [ "${i:0:10}" = "--sysroot=" ]; then
- exec -a "$0" %{our_path}/usr/aarch64-tizen-linux/bin/ld.real "$@"
+ %{our_path}/usr/aarch64-tizen-linux/bin/ld.real "$@" || /usr/bin/qemu-aarch64 /usr/aarch64-tizen-linux/bin/ld -L/usr/lib/gcc/aarch64-tizen-linux/%{gcc_version_dot}/ `echo "$@" | sed -e "s#%{our_path}##;s#--sysroot=[^[:space:]]\+# #g"`
+ exit $?
fi
done
-%{our_path}/usr/aarch64-tizen-linux/bin/ld.real --sysroot=/ "$@" || ( /usr/bin/qemu-aarch64 /usr/aarch64-tizen-linux/bin/ld -L/usr/lib/gcc/aarch64-tizen-linux/%{gcc_version_dot}/ `echo "$@" | sed -e "s#%{our_path}##"` ; echo "Running native ld, because cross ld has failed with the following error: " )
+%{our_path}/usr/aarch64-tizen-linux/bin/ld.real --sysroot=/ "$@" || /usr/bin/qemu-aarch64 /usr/aarch64-tizen-linux/bin/ld -L/usr/lib/gcc/aarch64-tizen-linux/%{gcc_version_dot}/ `echo "$@" | sed -e "s#%{our_path}##;s#--sysroot=[^[:space:]]\+# #g"`
' > %{buildroot}%{our_path}/usr/aarch64-tizen-linux/bin/ld
chmod +x %{buildroot}%{our_path}/usr/aarch64-tizen-linux/bin/ld
diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec
index d8b86bd..43f8067 100644
--- a/packaging/qemu-accel-armv7l.spec
+++ b/packaging/qemu-accel-armv7l.spec
@@ -194,7 +194,7 @@ do
echo '#!/bin/bash
if [ "$LIBRARY_PATH" ]; then
mv %{our_path}{,.bkp}
- exec /usr/bin/qemu-arm /usr/bin/'${compiler}' "$@"
+ exec /usr/bin/qemu-arm /usr/bin/'${compiler}' "$@"
fi
exec -a /usr/bin/'${compiler}' %{our_path}/usr/bin/'${compiler}'.real "$@" -B%{our_path}/usr/armv7l-tizen-linux-gnueabi/bin -B%{our_path}/%{_libdir}/gcc/armv7l-tizen-linux-gnueabi/%{gcc_version_dot}
' > %{buildroot}%{our_path}/usr/bin/${compiler}
@@ -234,11 +234,12 @@ if [ -n "$LD_LIBRARY_PATH" ]; then
fi
for i in "$@"; do
if [ "${i:0:10}" = "--sysroot=" ]; then
- exec -a "$0" %{our_path}/usr/arm-tizen-linux-gnueabi/bin/ld.real "$@"
+ %{our_path}/usr/arm-tizen-linux-gnueabi/bin/ld.real "$@" || /usr/bin/qemu-arm /usr/armv7l-tizen-linux-gnueabi/bin/ld -L/usr/lib/gcc/armv7l-tizen-linux-gnueabi/%{gcc_version_dot}/ `echo "$@" | sed -e "s#%{our_path}##;s#--sysroot=[^[:space:]]\+# #g"`
+ exit $?
fi
done
-%{our_path}/usr/arm-tizen-linux-gnueabi/bin/ld.real --sysroot=/ "$@" || ( /usr/bin/qemu-arm /usr/armv7l-tizen-linux-gnueabi/bin/ld -L/usr/lib/gcc/armv7l-tizen-linux-gnueabi/4.9/ `echo "$@" | sed -e "s#%{our_path}##"` ; echo "Running native ld, because cross ld has failed with the following error: " )
+%{our_path}/usr/arm-tizen-linux-gnueabi/bin/ld.real --sysroot=/ "$@" || /usr/bin/qemu-arm /usr/armv7l-tizen-linux-gnueabi/bin/ld -L/usr/lib/gcc/armv7l-tizen-linux-gnueabi/%{gcc_version_dot}/ `echo "$@" | sed -e "s#%{our_path}##;s#--sysroot=[^[:space:]]\+# #g"`
' > %{buildroot}%{our_path}/usr/arm-tizen-linux-gnueabi/bin/ld
chmod +x %{buildroot}%{our_path}/usr/arm-tizen-linux-gnueabi/bin/ld