From 748e0c55d126c4b2eb2f8280e81ef191389fa392 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 21 Feb 2015 01:05:43 +0530 Subject: [PATCH] Make cargo build work without visible link hacks (beware: contains invisible link hacks) --- ports/gonk/.cargo/config | 4 ++-- ports/gonk/fake-ld.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 ports/gonk/fake-ld.sh diff --git a/ports/gonk/.cargo/config b/ports/gonk/.cargo/config index a4d8b3b6fdb..417f118e43b 100644 --- a/ports/gonk/.cargo/config +++ b/ports/gonk/.cargo/config @@ -1,6 +1,6 @@ [target.arm-linux-androideabi] ar = "arm-linux-androideabi-ar" -linker = "arm-linux-androideabi-g++" +linker = "./fake-ld.sh" [target.arm-linux-androideabi.openssl] -rustc-flags = "-l crypto -l ssl" \ No newline at end of file +rustc-flags = "-l crypto -l ssl" diff --git a/ports/gonk/fake-ld.sh b/ports/gonk/fake-ld.sh new file mode 100755 index 00000000000..11f893d7263 --- /dev/null +++ b/ports/gonk/fake-ld.sh @@ -0,0 +1,2 @@ +#!/bin/bash +arm-linux-androideabi-g++ $@ $LDFLAGS -lGLESv2 -lsupc++ -L $GONKDIR/backup-flame/system/lib/ -L$GONKDIR/prebuilts/ndk/9/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/