From 5a15f63cfe7a436b50830f5a5049af82aca44c08 Mon Sep 17 00:00:00 2001 From: milisbir Date: Tue, 5 Sep 2017 10:40:15 +0300 Subject: [PATCH] rust.guncellendi --- ...llvm-build-Force-link-against-libffi.patch | 32 +++++++++++++++++++ talimatname/genel/rust/bootstrap-config.toml | 5 +++ talimatname/genel/rust/talimat | 21 ++++++------ 3 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 talimatname/genel/rust/0001-librustc_llvm-build-Force-link-against-libffi.patch create mode 100644 talimatname/genel/rust/bootstrap-config.toml diff --git a/talimatname/genel/rust/0001-librustc_llvm-build-Force-link-against-libffi.patch b/talimatname/genel/rust/0001-librustc_llvm-build-Force-link-against-libffi.patch new file mode 100644 index 000000000..02d25e4e4 --- /dev/null +++ b/talimatname/genel/rust/0001-librustc_llvm-build-Force-link-against-libffi.patch @@ -0,0 +1,32 @@ +From 5dbc650a60ddb230f59e5a18ffd298b033566945 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= +Date: Thu, 20 Jul 2017 23:07:01 +0200 +Subject: [PATCH] librustc_llvm/build: Force link against libffi +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +`llvm-config --libs` doesn't output libffi in many cases. Fixing it +turned out to take quite a bit of effort, so force libffi linking in +here for now. + +Signed-off-by: Johannes Löthberg +--- + src/librustc_llvm/build.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs +index 3f0f536960..7dc0c40c9d 100644 +--- a/src/librustc_llvm/build.rs ++++ b/src/librustc_llvm/build.rs +@@ -220,6 +220,7 @@ fn main() { + }; + println!("cargo:rustc-link-lib={}={}", kind, name); + } ++ println!("cargo:rustc-link-lib=dylib=ffi"); + + // LLVM ldflags + // +-- +2.13.3 + diff --git a/talimatname/genel/rust/bootstrap-config.toml b/talimatname/genel/rust/bootstrap-config.toml new file mode 100644 index 000000000..0cbc5805b --- /dev/null +++ b/talimatname/genel/rust/bootstrap-config.toml @@ -0,0 +1,5 @@ +[install] +prefix = "/usr" + +[rust] +channel = "stable" diff --git a/talimatname/genel/rust/talimat b/talimatname/genel/rust/talimat index 270ab2751..97a40052e 100644 --- a/talimatname/genel/rust/talimat +++ b/talimatname/genel/rust/talimat @@ -6,20 +6,19 @@ name=rust version=1.20.0 release=1 -source=(http://static.rust-lang.org/dist/rustc-$version-src.tar.gz) +source=(http://static.rust-lang.org/dist/rustc-$version-src.tar.gz + 0001-librustc_llvm-build-Force-link-against-libffi.patch + bootstrap-config.toml) build() { - cd rustc-$version-src + cd ${name}c-$version-src - ./configure --prefix=/usr \ - --release-channel=stable \ - --disable-docs \ - --enable-ccache - make CFLAGS=" -fPIC -w" - make DESTDIR=$PKG install + patch -p1 -i $SRC/0001-librustc_llvm-build-Force-link-against-libffi.patch + cp $SRC/bootstrap-config.toml config.toml - cd "$PKG/usr/lib" - rm rustlib/{components,manifest-rustc,rust-installer-version} - ln -sf rustlib/x86_64-unknown-linux-gnu/lib/*.so . + /usr/bin/python ./x.py build --verbose + DESTDIR=$PKG /usr/bin/python ./x.py install + rm -r $PKG/usr/lib/rustlib/{components,manifest-rustc,rust-installer-version} + rm -r $PKG/usr/share/doc }