summaryrefslogtreecommitdiff
path: root/packaging/qemu-accel-aarch64.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/qemu-accel-aarch64.spec')
-rw-r--r--packaging/qemu-accel-aarch64.spec5
1 files changed, 3 insertions, 2 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