From e3b7c0311aa81814823be3305baf7c4aed5c8ce3 Mon Sep 17 00:00:00 2001 From: "Ryan S. Arnold" Date: Wed, 30 Sep 2015 10:13:21 -0500 Subject: lib/configure.sh: Set libdir=/usr/lib, slibdir=/lib, and rtlddir=/lib Fix for https://bugs.linaro.org/show_bug.cgi?id=1717 ABE is to be consistent with Ubuntu library layouts because there is historic precedent for this layout in Linaro binary toolchains. "slibdir" stands for shared-objects libdir. Therefore all shared objects should go into slibdir. On Ubuntu systems this is /lib. "libdir" is where static libraries and linkers scripts are to be installed. On Ubuntu systems this is /usr/lib. "rtlddir" is where the dynamic-linker is to be installed. On Ubuntu systems this is /lib. Change-Id: I19242cb2ce118505a7f53224e1956b738ad2cd85 --- lib/configure.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/configure.sh b/lib/configure.sh index ba909ce4..af16cf8e 100755 --- a/lib/configure.sh +++ b/lib/configure.sh @@ -185,8 +185,15 @@ configure_build() # defaults to lib64/ for aarch64. We need to override this. # There's no need to install anything into lib64/ since we don't # have biarch systems. - echo libdir=/lib > ${builddir}/configparms - echo slibdir=/usr/lib > ${builddir}/configparms + + # libdir is where static libraries and linker scripts are installed, + # like libc.so, libc_nonshared.a, and libc.a. + echo libdir=/usr/lib > ${builddir}/configparms + + # slibdir is where shared objects are installed. + echo slibdir=/lib >> ${builddir}/configparms + + # rtlddir is where the dynamic-linker is installed. echo rtlddir=/lib >> ${builddir}/configparms local opts="${opts} --build=${build} --host=${target} --target=${target} --prefix=/usr" dryrun "(mkdir -p ${sysroots}/usr/lib)" -- cgit v1.2.3 From b69580653a31b02815fb513c987798fe3137d6a5 Mon Sep 17 00:00:00 2001 From: "Ryan S. Arnold" Date: Thu, 1 Oct 2015 16:33:51 -0500 Subject: lib/checkout.sh: prune git branches before git pull in checkout() 'Update' code path. This is required due to the following scenario: A git reference dir is populated with a git clone on day X. On day Y a developer removes a branch and then replaces the same branch with a new branch of the same name. On day Z ABE is executed against the reference dir copy and the git pull fails due to error: 'refs/remotes/origin/' exists; cannot create 'refs/remotes/origin/'. You have to remove the stale branches before pulling the new ones. Change-Id: I436b4961deb5496e3b28567bad59e22f91ee7d09 --- lib/checkout.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/checkout.sh b/lib/checkout.sh index 9f983535..5299b706 100644 --- a/lib/checkout.sh +++ b/lib/checkout.sh @@ -367,6 +367,17 @@ checkout() notice "Updating sources for ${tool} in ${srcdir}" dryrun "(cd ${repodir} && git stash --all)" dryrun "(cd ${repodir} && git reset --hard)" + + # This is required due to the following scenario: A git + # reference dir is populated with a git clone on day X. On day + # Y a developer removes a branch and then replaces the same + # branch with a new branch of the same name. On day Z ABE is + # executed against the reference dir copy and the git pull fails + # due to error: 'refs/remotes/origin/' exists; cannot + # create 'refs/remotes/origin/'. You have to remove the + # stale branches before pulling the new ones. + dryrun "(cd ${repodir} && git remote prune origin)" + dryrun "(cd ${repodir} && git_robust pull)" # Update branch directory (which maybe the same as repo # directory) -- cgit v1.2.3