aboutsummaryrefslogtreecommitdiffstats
path: root/otp_build
diff options
context:
space:
mode:
Diffstat (limited to 'otp_build')
-rwxr-xr-xotp_build26
1 files changed, 14 insertions, 12 deletions
diff --git a/otp_build b/otp_build
index f5a7a0be44..6e016c88d2 100755
--- a/otp_build
+++ b/otp_build
@@ -173,6 +173,14 @@ determine_version_controller ()
# Special static config flags for certain platforms are set here
set_config_flags ()
{
+ #
+ # NOTE! Do not add special flags here without a *very good*
+ # reason. We normally do not want "./otp_build configure"
+ # and "./configure" to produce different results.
+ # However, in the Windows case this does not matter, since
+ # the only supported way to build on Windows is using
+ # otp_build.
+ #
# * Extra flags to pass to configure are placed in `CONFIG_FLAGS'.
# * The command line is no longer added to `CONFIG_FLAGS' by
# `set_config_flags'. It is instead passed directly to
@@ -183,16 +191,6 @@ set_config_flags ()
# (in the cross compilation case the whole command line as well as
# the cross configuration have been moved here).
- if target_contains linux; then
- XX=`echo $* | grep -v able-fp-exceptions`
- if [ "$*" = "$XX" ]; then
- CONFIG_FLAGS="$CONFIG_FLAGS --disable-fp-exceptions"
- fi
- fi
- if target_contains "univel-sysv4"; then
- CONFIG_FLAGS="$CONFIG_FLAGS --x-libraries=/usr/lib/X11"
- fi
-
if target_contains free_source; then
CONFIG_FLAGS="$CONFIG_FLAGS --host=$TARGET"
fi
@@ -1216,8 +1214,12 @@ do_patch_app ()
echo "No OTP $otp_major_vsn installation in $target_dir" 1>&2
exit 1
fi
+
shift
+ otp_version=`cat "$target_dir/OTP_VERSION"` || { echo "Not able to read $target_dir/OTP_VERSION" 1>&2; exit 1; }
+ { echo "$otp_version" | sed "s|^\([^\*]*\)\**|\1\*\*|g" > $target_dir/OTP_VERSION; } 2>/dev/null || { echo "Not able to update $target_dir/OTP_VERSION" 1>&2; exit 1; }
+
# Build all applications to target
for app in "$@"; do
if [ "$app" = "erts" ] && [ -d $ERL_TOP/$app ]; then
@@ -1430,9 +1432,9 @@ cd $ERL_TOP
determine_version_controller
-# Unset ERL_FLAGS and ERL_OTP<Major-VSN>_FLAGS during bootstrap to
+# Unset ERL_FLAGS and ERL_OTP<OTP Release>_FLAGS during bootstrap to
# prevent potential problems
-otp_major_vsn=`cat erts/vsn.mk | grep SYSTEM_VSN | sed "s|SYSTEM_VSN[^=]*=[^0-9]*\([0-9]*\).*|\1|g"`
+otp_major_vsn=`cat OTP_VERSION | sed "s|\([0-9]*\).*|\1|"`
erl_otp_flags="ERL_OTP${otp_major_vsn}_FLAGS"
unset ERL_FLAGS
unset ${erl_otp_flags}