aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.py3
-rw-r--r--doc/dev_ref/configure.rst1
-rw-r--r--src/build-data/cc/clang.txt1
-rw-r--r--src/build-data/makefile.in3
-rw-r--r--src/build-data/os/macos.txt4
-rw-r--r--src/lib/math/bigint/big_ops2.cpp19
-rwxr-xr-xsrc/scripts/ci_build.py1
-rwxr-xr-xsrc/scripts/install.py15
8 files changed, 1 insertions, 46 deletions
diff --git a/configure.py b/configure.py
index c106fcfcf..a25d5e6aa 100755
--- a/configure.py
+++ b/configure.py
@@ -1476,7 +1476,6 @@ class OsInfo(InfoObject): # pylint: disable=too-many-instance-attributes
'doc_dir': 'share/doc',
'man_dir': 'share/man',
'use_stack_protector': 'true',
- 'so_post_link_command': '',
'cli_exe_name': 'botan',
'lib_prefix': 'lib',
'library_name': 'botan{suffix}-{major}',
@@ -1525,7 +1524,6 @@ class OsInfo(InfoObject): # pylint: disable=too-many-instance-attributes
self.man_dir = lex.man_dir
self.obj_suffix = lex.obj_suffix
self.program_suffix = lex.program_suffix
- self.so_post_link_command = lex.so_post_link_command
self.static_suffix = lex.static_suffix
self.target_features = lex.target_features
self.use_stack_protector = (lex.use_stack_protector == "true")
@@ -2177,7 +2175,6 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
variables['soname_patch'] = osinfo.soname_pattern_patch.format(**variables)
variables['lib_link_cmd'] = variables['lib_link_cmd'].format(**variables)
- variables['post_link_cmd'] = osinfo.so_post_link_command.format(**variables) if options.build_shared_lib else ''
lib_targets = []
if options.build_static_lib:
diff --git a/doc/dev_ref/configure.rst b/doc/dev_ref/configure.rst
index 1e0043be4..eda261642 100644
--- a/doc/dev_ref/configure.rst
+++ b/doc/dev_ref/configure.rst
@@ -383,7 +383,6 @@ Variables:
* ``obj_suffix`` (default "o") specifies the suffix used for object files
* ``program_suffix`` (default "") specifies the suffix used for executables
* ``shared_lib_symlinks``
- * ``so_post_link_command``
* ``soname_pattern_abi``
* ``soname_pattern_base``
* ``soname_pattern_patch``
diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt
index b183f60ef..3df4d8328 100644
--- a/src/build-data/cc/clang.txt
+++ b/src/build-data/cc/clang.txt
@@ -40,7 +40,6 @@ default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
</so_link_commands>
<binary_link_commands>
-macos -> "$(LINKER) -headerpad_max_install_names"
linux -> "$(LINKER) -Wl,-rpath=\$$ORIGIN"
freebsd -> "$(LINKER) -Wl,-rpath=\$$ORIGIN"
default -> "$(LINKER)"
diff --git a/src/build-data/makefile.in b/src/build-data/makefile.in
index 76e054378..4766d4754 100644
--- a/src/build-data/makefile.in
+++ b/src/build-data/makefile.in
@@ -19,7 +19,6 @@ LIB_FLAGS = %{lib_flags}
LDFLAGS = %{ldflags}
EXE_LINK_CMD = %{exe_link_cmd}
-POST_LINK_CMD = %{post_link_cmd}
LIB_LINKS_TO = %{link_to}
EXE_LINKS_TO = %{link_to_botan} $(LIB_LINKS_TO)
@@ -71,11 +70,9 @@ TESTOBJS = %{join test_objs}
$(CLI): $(LIBRARIES) $(CLIOBJS)
$(EXE_LINK_CMD) $(ABI_FLAGS) $(CLIOBJS) $(EXE_LINKS_TO) $(LDFLAGS) %{output_to_exe}$@
- $(POST_LINK_CMD)
$(TEST): $(LIBRARIES) $(TESTOBJS)
$(EXE_LINK_CMD) $(ABI_FLAGS) $(TESTOBJS) $(EXE_LINKS_TO) $(LDFLAGS) %{output_to_exe}$@
- $(POST_LINK_CMD)
%{if build_fuzzers}
diff --git a/src/build-data/os/macos.txt b/src/build-data/os/macos.txt
index cd8c8eb97..4349637b8 100644
--- a/src/build-data/os/macos.txt
+++ b/src/build-data/os/macos.txt
@@ -5,10 +5,6 @@ soname_pattern_base "lib{libname}.dylib"
soname_pattern_abi "lib{libname}.{abi_rev}.dylib"
soname_pattern_patch "lib{libname}.{abi_rev}.{version_minor}.{version_patch}.dylib"
-# In order that these executables work from the build directory,
-# we need to change the install names
-so_post_link_command "install_name_tool -change '$(INSTALLED_LIB_DIR)/{soname_abi}' '@executable_path/{soname_abi}' $@"
-
doc_dir doc
<target_features>
diff --git a/src/lib/math/bigint/big_ops2.cpp b/src/lib/math/bigint/big_ops2.cpp
index 28147b589..cc85f5e96 100644
--- a/src/lib/math/bigint/big_ops2.cpp
+++ b/src/lib/math/bigint/big_ops2.cpp
@@ -107,31 +107,12 @@ BigInt& BigInt::mod_sub(const BigInt& s, const BigInt& mod, secure_vector<word>&
if(ws.size() < mod_sw)
ws.resize(mod_sw);
-#if 0
- //Faster but not const time:
-
- // Compute t - s
- word borrow = bigint_sub3(ws.data(), data(), mod_sw, s.data(), mod_sw);
-
- if(borrow)
- {
- // If t < s, instead compute p - (s - t)
- bigint_sub2_rev(mutable_data(), s.data(), mod_sw);
- bigint_sub2_rev(mutable_data(), mod.data(), mod_sw);
- }
- else
- {
- // No borrow so we already have the result we need
- swap_reg(ws);
- }
-#else
if(mod_sw == 4)
bigint_mod_sub_n<4>(mutable_data(), s.data(), mod.data(), ws.data());
else if(mod_sw == 6)
bigint_mod_sub_n<6>(mutable_data(), s.data(), mod.data(), ws.data());
else
bigint_mod_sub(mutable_data(), s.data(), mod.data(), mod_sw, ws.data());
-#endif
return (*this);
}
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py
index 0c9e7dd1f..234cc7e22 100755
--- a/src/scripts/ci_build.py
+++ b/src/scripts/ci_build.py
@@ -301,6 +301,7 @@ def run_cmd(cmd, root_dir):
cmd = [os.path.expandvars(elem) for elem in cmd]
sub_env = os.environ.copy()
sub_env['LD_LIBRARY_PATH'] = os.path.abspath(root_dir)
+ sub_env['DYLD_LIBRARY_PATH'] = os.path.abspath(root_dir)
sub_env['PYTHONPATH'] = os.path.abspath(os.path.join(root_dir, 'src/python'))
cwd = None
diff --git a/src/scripts/install.py b/src/scripts/install.py
index ed6fe897f..32a7a7e9e 100755
--- a/src/scripts/install.py
+++ b/src/scripts/install.py
@@ -15,7 +15,6 @@ import optparse # pylint: disable=deprecated-module
import os
import shutil
import sys
-import subprocess
import traceback
def parse_command_line(args):
@@ -212,20 +211,6 @@ def main(args):
if build_cli:
copy_executable(cfg['cli_exe'], prepend_destdir(os.path.join(bin_dir, cfg['cli_exe_name'])))
- # On MacOS, if we are using shared libraries and we install, we should fix
- # up the library name, otherwise the botan command won't work; ironically
- # we only need to do this because we previously changed it from a setting
- # that would be correct for installation to one that lets us run it from
- # the build directory
- if target_os == 'macos' and build_shared_lib and build_cli:
- soname_abi = cfg['soname_abi']
-
- subprocess.check_call(['install_name_tool',
- '-change',
- os.path.join('@executable_path', soname_abi),
- os.path.join(lib_dir, soname_abi),
- os.path.join(bin_dir, cfg['cli_exe_name'])])
-
if 'botan_pkgconfig' in cfg:
pkgconfig_dir = os.path.join(options.prefix, options.libdir, options.pkgconfigdir)
makedirs(prepend_destdir(pkgconfig_dir))