From 92352d5323d39bdcd32f9a560bfa00185ff99c52 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 3 Sep 2016 16:15:18 +0300 Subject: Make build.sh not to use rpath and sudo on some platforms --- build.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index c8cf2cc..c70f66f 100755 --- a/build.sh +++ b/build.sh @@ -118,6 +118,8 @@ fi PATH="$idir/bin:$PATH" export PATH +sys="$(build2/config.guess | sed -n 's/^[^-]*-[^-]*-\(.*\)$/\1/p')" + # Bootstrap, stage 1. # run cd build2 @@ -130,6 +132,17 @@ run build2/b-boot config.cxx="$cxx" config.bin.lib=static mv build2/b build2/b-boot run build2/b-boot --version +case "$sys" in + mingw32 | mingw64 | msys | msys2 | cygwin) + conf_rpath="[null]" + conf_sudo="[null]" + ;; + *) + conf_rpath="$idir/lib" + conf_sudo="$sudo" + ;; +esac + # Stage. # run cd .. @@ -138,10 +151,10 @@ run build2/build2/b-boot configure \ config.cxx="$cxx" \ config.bin.lib=shared \ config.bin.suffix=-stage \ -config.bin.rpath="$idir/lib" \ +config.bin.rpath="$conf_rpath" \ config.install.root="$idir" \ config.install.data_root=root/stage \ -config.install.sudo="$sudo" +config.install.sudo="$conf_sudo" run build2/build2/b-boot install @@ -160,9 +173,9 @@ cc \ config.cxx="$cxx" \ config.cc.coptions=-O3 \ config.bin.lib=shared \ -config.bin.rpath="$idir/lib" \ +config.bin.rpath="$conf_rpath" \ config.install.root="$idir" \ -config.install.sudo="$sudo" +config.install.sudo="$conf_sudo" run bpkg-stage add "$BUILD2_REPO" run bpkg-stage fetch -- cgit v1.1