Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/configure b/configure 2index 87d5c14..5e2a1a4 100755 3--- a/configure 4+++ b/configure 5@@ -112,21 +112,26 @@ def compilerversion(c): 6 except: 7 pass 8 9-firstcompiler = None 10- 11-with open('compilers/default') as f: 12- for c in f.readlines(): 13- c = c.strip() 14- cv = compilerversion(c) 15- if cv == None: 16- print('skipping default compiler %s' % c) 17- continue 18- print('using default compiler %s' % c) 19- firstcompiler = c 20- break 21- 22-if firstcompiler is None: 23- raise ValueError('did not find a working compiler') 24+if c := os.getenv("CC"): 25+ firstcompiler = c 26+ print('using default compiler %s' % c) 27+else: 28+ firstcompiler = None 29+ 30+ with open('compilers/default') as f: 31+ for c in f.readlines(): 32+ c = c.strip() 33+ cv = compilerversion(c) 34+ if cv == None: 35+ print('skipping default compiler %s' % c) 36+ continue 37+ print('using default compiler %s' % c) 38+ firstcompiler = c 39+ break 40+ 41+ if firstcompiler is None: 42+ raise ValueError('did not find a working compiler') 43+ 44 45 with open('build/%s/scripts/compiledefault' % host,'w') as f: 46 f.write('#!/bin/sh\n') 47diff --git a/scripts-build/staticlib b/scripts-build/staticlib 48index bb23658..111ab13 100755 49--- a/scripts-build/staticlib 50+++ b/scripts-build/staticlib 51@@ -1,6 +1,6 @@ 52 #!/bin/sh 53 54 rm -f package/lib/libcpucycles.a 55-ar cr package/lib/libcpucycles.a "$@" 56-ranlib package/lib/libcpucycles.a || : 57+${AR:-ar} cr package/lib/libcpucycles.a "$@" 58+${RANLIB:-ranlib} package/lib/libcpucycles.a || : 59 chmod 644 package/lib/libcpucycles.a