mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-10-27 07:11:01 +01:00
Remove implicit LDFLAGS, CPPFLAGS, and "ldflags_dirs" build step
The default settings for LDFLAGS and CPPFLAGS were there since the initial commit to ruby-build:
LDFLAGS="-L${PREFIX_PATH}/lib"
CPPFLAGS="-I${PREFIX_PATH}/include"
However, it's not clear to me what these settings help with. A typical Ruby installation will initialize files in these directories, but it will do so regardless of the environment variables.
So, let's remove them and see what breaks.
This commit is contained in:
parent
4bf2fece5e
commit
47eda17460
3 changed files with 6 additions and 21 deletions
|
|
@ -1190,21 +1190,9 @@ build_package_verify_openssl() {
|
|||
' "$(basename "$(type -p yum apt-get | head -1)")" >&4 2>&1
|
||||
}
|
||||
|
||||
# Ensure that directories listed in LDFLAGS exist
|
||||
# Kept for backward compatibility with 3rd-party definitions.
|
||||
build_package_ldflags_dirs() {
|
||||
local ldflags
|
||||
read -d '' -r -a ldflags <<<"$LDFLAGS" || true
|
||||
local index=0
|
||||
local dir
|
||||
while [ "$index" -lt "${#ldflags[@]}" ]; do
|
||||
dir=""
|
||||
case "${ldflags[index]}" in
|
||||
-L ) dir="${ldflags[index+1]}" ;;
|
||||
-L* ) dir="${ldflags[index]#-L}" ;;
|
||||
esac
|
||||
[ -z "$dir" ] || mkdir -p "$dir"
|
||||
index=$((index+1))
|
||||
done
|
||||
true
|
||||
}
|
||||
|
||||
build_package_enable_shared() {
|
||||
|
|
@ -1511,9 +1499,6 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
export LDFLAGS="-L${PREFIX_PATH}/lib ${LDFLAGS}"
|
||||
export CPPFLAGS="-I${PREFIX_PATH}/include ${CPPFLAGS}"
|
||||
|
||||
unset RUBYOPT
|
||||
unset RUBYLIB
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue