From d27de61ef206e411f16f587aaa09636d8e4f20ca Mon Sep 17 00:00:00 2001 From: Cristiano Giuffrida Date: Wed, 18 Jun 2014 21:34:11 +0200 Subject: [PATCH] llvm: Fix llvm-apps bridging. --- minix/llvm/configure.llvm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/minix/llvm/configure.llvm b/minix/llvm/configure.llvm index e4602ae8e..1b370257d 100755 --- a/minix/llvm/configure.llvm +++ b/minix/llvm/configure.llvm @@ -63,21 +63,20 @@ echo "LLVM root directory is set to :" echo " ${ROOT}" # Persist the LLVM ROOT path information -. ${MINIX_LLVM_DIR}/minix.inc +[ -f ${MINIX_LLVM_DIR}/common.inc ] || cp ${MINIX_LLVM_DIR}/common.inc.default ${MINIX_LLVM_DIR}/common.inc ROOT_1=`echo ${ROOT} | sed "s/\\\//\\\\\\\\\//g"` sed -i "s/ROOT=.*$/ROOT=\"${ROOT_1}\"/g" ${MINIX_LLVM_DIR}/common.inc +. ${MINIX_LLVM_DIR}/minix.inc # Configure llvm-apps cp ${ROOT}/conf/common.overrides.llvm-minix.inc ${ROOT}/common.overrides.llvm.inc -sed -i "s/MINIX_ROOT=.*$/MINIX_ROOT=\"${MINIX_ROOT}\"/g" ${ROOT}/common.overrides.llvm.inc +MINIX_ROOT_1=`readlink -f ${MINIX_ROOT} | sed "s/\\\//\\\\\\\\\//g"` +sed -i "s/_MINIX_ROOT=.*$/_MINIX_ROOT=\"${MINIX_ROOT_1}\"/g" ${ROOT}/common.overrides.llvm.inc if [ ! -d ${ROOT}/.tmp ]; then mkdir ${ROOT}/.tmp 2>/dev/null || true fi -# Load useful functions and environment variables from llvm-apps repo. -. ${ROOT}/apps/scripts/include/configure.llvm.inc - # Set default values for essential variables : ${JOBS=1} : ${GEN_GOLD_PLUGIN="yes"} @@ -98,8 +97,6 @@ if [ "${GEN_GOLD_PLUGIN}" == "yes" ] && [ -f "${MYPWD}/.gold_generated" ]; then fi if [ "${GEN_GOLD_PLUGIN}" == "yes" ]; then - - echo LLVMPREFIX= ${LLVMPREFIX} ${MINIX_LLVM_DIR}/generate_gold_plugin.sh if [ ! -f "${GOLD_DEST_DIR}/libLTO.so" ] || [ ! -f "${GOLD_DEST_DIR}/LLVMgold.so" ]; then echo "Failure: generate_gold_plugin.sh" @@ -138,5 +135,6 @@ else fi # Reconfigure llvm-apps -MINIX_TOOLS_DIR=$(readlink -f ${MINIX_ROOT}/obj.386/tooldir.*) -sed -i "s/MINIX_TOOLS_DIR=.*$/MINIX_TOOLS_DIR=\"${MINIX_TOOLS_DIR}\"/g" ${ROOT}/common.overrides.llvm.inc +MINIX_TOOLS_DIR=$(readlink -f ${MINIX_ROOT}/../obj.i386/tooldir.*) +MINIX_TOOLS_DIR_1=`echo ${MINIX_TOOLS_DIR} | sed "s/\\\//\\\\\\\\\//g"` +sed -i "s/MINIX_TOOLS_DIR=.*$/MINIX_TOOLS_DIR=\"${MINIX_TOOLS_DIR_1}\"/g" ${ROOT}/common.overrides.llvm.inc -- 2.44.0