From 0d85193f39186ef35fc67ff599dd46570d5635eb Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Fri, 20 Dec 2013 20:36:04 +0900 Subject: [PATCH] Remove `-Wl,-rpath=...` from `LDFLAGS` on Darwin to fix build. We don't need to set `rpath` explicitly because the ld on Darwin embeds the full paths to each dylib by default --- plugins/python-build/bin/python-build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 94616e41..5d4430d9 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1316,8 +1316,11 @@ if [ -n "$DEBUG" ]; then PYTHON_CONFIGURE_OPTS="--with-pydebug $PYTHON_CONFIGURE_OPTS" fi -if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]] && [[ "$LDFLAGS" != *"-Wl,-rpath="* ]]; then - LDFLAGS="-Wl,-rpath=${PREFIX_PATH}/lib ${LDFLAGS}" +if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]] && [[ "$LDFLAGS" != *"-rpath="* ]]; then + # The ld on Darwin embeds the full paths to each dylib by default + if [[ "Darwin" != "$(uname -s)" ]]; then + export LDFLAGS="-Wl,-rpath=${PREFIX_PATH}/lib ${LDFLAGS}" + fi fi SEED="$(date "+%Y%m%d%H%M%S").$$"