From 5afb9345f74a41dbdd96953602c1b2f6941dee83 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 31 Oct 2022 12:18:51 +0100 Subject: bootstrap: allow overwriting of ar ... in the same way, as we support different names for cc and c++. --- bin/bootstrap.py | 5 ++++- etc/repos.json | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/bootstrap.py b/bin/bootstrap.py index 5fbf6a23..dcbd8586 100755 --- a/bin/bootstrap.py +++ b/bin/bootstrap.py @@ -58,9 +58,12 @@ if 'SOURCE_DATE_EPOCH' in os.environ: CONF_STRING = json.dumps(CONF) +AR="ar" CC="clang" CXX="clang++" +if "AR" in CONF: + AR=CONF["AR"] if "CC" in CONF: CC=CONF["CC"] if "CXX" in CONF: @@ -158,7 +161,7 @@ def setup_deps(src_wrkdir): os.symlink(os.path.normpath(include_dir), os.path.join(include_location, include_name)) if "build" in hints: - run(["sh", "-c", hints["build"].format(cc=CC, cxx=CXX)], + run(["sh", "-c", hints["build"].format(cc=CC, cxx=CXX, ar=AR)], cwd=subdir) if "link" in hints: link_flags.extend(["-L", subdir]) diff --git a/etc/repos.json b/etc/repos.json index 80365e6f..56793e0a 100644 --- a/etc/repos.json +++ b/etc/repos.json @@ -174,7 +174,7 @@ , "bindings": {"rules": "rules"} , "bootstrap": { "include_dir": "include/fmt" - , "build": "cd src && {cxx} -I ../include -c *.cc && ar cqs ../libfmt.a *.o" + , "build": "cd src && {cxx} -I ../include -c *.cc && {ar} cqs ../libfmt.a *.o" , "link": ["-lfmt"] } , "local_bootstrap": @@ -193,7 +193,7 @@ , "target_file_name": "TARGETS.boringssl" , "bindings": {"rules": "rules-boringssl"} , "bootstrap": - { "build": "SYS=`uname -s | tr 'A-Z' 'a-z'` && ARCH=`uname -m` && {cc} -I . -I src/include -c *.c src/crypto/*.c src/crypto/*/*.c $SYS-$ARCH/crypto/fipsmodule/*.S && ar cqs libcrypto.a *.o" + { "build": "SYS=`uname -s | tr 'A-Z' 'a-z'` && ARCH=`uname -m` && {cc} -I . -I src/include -c *.c src/crypto/*.c src/crypto/*/*.c $SYS-$ARCH/crypto/fipsmodule/*.S && {ar} cqs libcrypto.a *.o" , "link": ["-lcrypto", "-lpthread"] , "include_dir": "src/include/openssl" , "include_name": "openssl" -- cgit v1.2.3