Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ranlib call with s flag in ar call #56

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/tools/clang-darwin.jam
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ rule init ( version ? : command * : options * )
common.handle-options clang-darwin : $(condition) : $(command) : $(options) ;
clang.init-cxxstd-flags clang-darwin : $(condition) : $(version) ;

# - Ranlib.
local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
toolset.flags clang-darwin.archive .RANLIB $(condition) : $(ranlib[1]) ;

# - Archive builder.
local archiver = [ feature.get-values <archiver> : $(options) ] ;
toolset.flags clang-darwin.archive .AR $(condition) : $(archiver[1]) ;
Expand Down Expand Up @@ -165,7 +161,6 @@ actions compile.mm
# logic in clang-linux, but that's hardly worth the trouble
# as on Linux, 'ar' is always available.
.AR = ar ;
.RANLIB = ranlib -cs ;

rule archive ( targets * : sources * : properties * )
{
Expand Down Expand Up @@ -198,8 +193,7 @@ rule archive ( targets * : sources * : properties * )

actions piecemeal archive
{
"$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
"$(.RANLIB)" "$(<)"
"$(.AR)" $(AROPTIONS) rsc "$(<)" "$(>)"
}

# Declare actions for linking
Expand Down
8 changes: 0 additions & 8 deletions src/tools/clang-linux.jam
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ rule init ( version ? : command * : options * ) {
toolset.flags clang-linux.link RUN_PATH $(condition) : $(lib_path) ;
}

# - Ranlib.
local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
if ( ! $(ranlib) ) && $(root)
{
ranlib = $(root)/bin/ranlib ;
}
toolset.flags clang-linux.archive .RANLIB $(condition) : $(ranlib[1]) ;

# - Archive builder.
local archiver = [ feature.get-values <archiver> : $(options) ] ;
if ( ! $(archiver) ) && $(root)
Expand Down
11 changes: 3 additions & 8 deletions src/tools/cray.jam
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ rule init ( : : options * : requirements * )
# Archive builder.
local command-ar = [ validate-command $(toolset) ar ] ;

# Archive indexer.
local command-ranlib = [ validate-command $(toolset) ranlib ] ;

# The 'command' variables always have one element, but they may contain
# spaces (e.g. if 'command' is an absolute path and some path components
# have spaces).
Expand Down Expand Up @@ -171,7 +168,7 @@ rule init ( : : options * : requirements * )
handle-options
$(toolset)
: $(identifying-condition)
: $(command-c) $(command-cxx) $(command-fortran) $(command-ar) $(command-ranlib)
: $(command-c) $(command-cxx) $(command-fortran) $(command-ar)
: $(options) ;

# Add compiler version to 'VERSION' variable on all targets. 'VERSION' is
Expand Down Expand Up @@ -472,8 +469,7 @@ actions link.dll bind LIBRARIES

actions piecemeal archive
{
"$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
"$(.RANLIB)" "$(<)"
"$(.AR)" $(AROPTIONS) rsc "$(<)" "$(>)"
}

###
Expand Down Expand Up @@ -935,7 +931,7 @@ local rule options-helper ( rule-or-module variable-name condition * : feature o
rule handle-options (
toolset
: toolset-condition *
: command-c command-cxx command-fortran command-ar command-ranlib
: command-c command-cxx command-fortran command-ar
: options *
)
{
Expand All @@ -955,7 +951,6 @@ rule handle-options (
toolset.flags $(toolset) CONFIG_COMMAND_CXX $(toolset-condition) : $(command-cxx) : unchecked ;
toolset.flags $(toolset) CONFIG_COMMAND_FORTRAN $(toolset-condition) : $(command-fortran) : unchecked ;
toolset.flags $(toolset).archive .AR $(toolset-condition) : $(command-ar) : unchecked ;
toolset.flags $(toolset).archive .RANLIB $(toolset-condition) : $(command-ranlib) : unchecked ;

# The following flags are applied to all targets built by this
# configuration of this toolset. This particular configuration of this
Expand Down
23 changes: 1 addition & 22 deletions src/tools/gcc.jam
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ option or defaulted to `ar`, but in some cases you might want to
override it, for example to explicitly use a system version instead of
one included with gcc.

`ranlib`::
Specifies the ranlib command that is used to generated symbol table
for static libraries. Normally, it is autodetected using gcc
`-print-prog-name` option or defaulted to `ranlib`, but in some cases
you might want to override it, for example to explicitly use a system
version instead of one included with gcc.

`rc`::
Specifies the resource compiler command that will be used with the
version of gcc that is being configured. This setting makes sense only
Expand Down Expand Up @@ -247,18 +240,6 @@ rule init ( version ? : command * : options * : requirement * )
local arflags = [ feature.get-values <arflags> : $(options) ] ;
toolset.flags gcc.archive .ARFLAGS $(condition) : $(arflags) ;

# - Ranlib.
local ranlib = [ common.get-invocation-command gcc
: [ .get-prog-name $(command-string) : ranlib : $(flavor) ]
: [ feature.get-values <ranlib> : $(options) ]
: $(bin)
: search-path ] ;
toolset.flags gcc.archive .RANLIB $(condition) : $(ranlib[1]) ;
if $(.debug-configuration)
{
ECHO "notice:" using gcc ranlib "::" $(condition) "::" $(ranlib[1]) ;
}

# - Resource compiler.
local rc = [ common.get-invocation-command-nodefault gcc : windres :
[ feature.get-values <rc> : $(options) ] : $(bin) : search-path ] ;
Expand Down Expand Up @@ -1048,8 +1029,7 @@ actions link.dll bind LIBRARIES
# logic in intel-linux, but that is hardly worth the trouble as on Linux, 'ar'
# is always available.
.AR = ar ;
.ARFLAGS = rc ;
.RANLIB = ranlib ;
.ARFLAGS = rsc ;

toolset.flags gcc.archive AROPTIONS <archiveflags> ;

Expand Down Expand Up @@ -1091,7 +1071,6 @@ rule archive ( targets * : sources * : properties * )
actions piecemeal archive
{
"$(.AR)" $(AROPTIONS) $(.ARFLAGS) "$(<)" "$(>)"
"$(.RANLIB)" "$(<)"
}

###
Expand Down
8 changes: 0 additions & 8 deletions src/tools/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,6 @@ def init(version = None, command = None, options = None):
if debug():
print 'notice: using gcc archiver ::', condition, '::', archiver

# - Ranlib
ranlib = common.get_invocation_command('gcc',
'ranlib', feature.get_values('<ranlib>', options), [bin], path_last=True)
toolset.flags('gcc.archive', '.RANLIB', condition, [ranlib])
if debug():
print 'notice: using gcc archiver ::', condition, '::', ranlib

# - The resource compiler.
rc_command = common.get_invocation_command_nodefault('gcc',
'windres', feature.get_values('<rc>', options), [bin], path_last=True)
Expand Down Expand Up @@ -669,7 +662,6 @@ def gcc_archive(targets, sources, properties):
# That warning is produced only on some platforms, for whatever reasons.
engine.register_action('gcc.archive',
'''"$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
"$(.RANLIB)" "$(<)"
''',
function=gcc_archive,
flags=['piecemeal'])
Expand Down
8 changes: 1 addition & 7 deletions src/tools/intel-darwin.jam
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ rule init ( version ? : command * : options * )
flags intel-darwin.compile DEFINES $(condition) : __WINT_TYPE__=int : unchecked ;
}

# - Ranlib.
local ranlib = [ feature.get-values <ranlib> : $(options) ] ;
toolset.flags intel-darwin.archive .RANLIB $(condition) : $(ranlib[1]) ;

# - Archive builder.
local archiver = [ feature.get-values <archiver> : $(options) ] ;
toolset.flags intel-darwin.archive .AR $(condition) : $(archiver[1]) ;
Expand Down Expand Up @@ -183,7 +179,6 @@ flags intel-darwin ARFLAGS <archiveflags> ;
# logic in intel-linux, but that's hardly worth the trouble
# as on Linux, 'ar' is always available.
.AR = ar ;
.RANLIB = ranlib ;

rule archive ( targets * : sources * : properties * )
{
Expand Down Expand Up @@ -216,8 +211,7 @@ rule archive ( targets * : sources * : properties * )

actions piecemeal archive
{
"$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
"$(.RANLIB)" -cs "$(<)"
"$(.AR)" $(AROPTIONS) rsc "$(<)" "$(>)"
}

flags intel-darwin.link USER_OPTIONS <linkflags> ;
Expand Down
3 changes: 0 additions & 3 deletions test/toolset-mock/project-config.jam
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ using darwin : 4.2.1 : $(PYTHON) $(here)/src/darwin-4.2.1.py

using clang-darwin : 3.9.0 : $(PYTHON) $(here)/src/clang-3.9.0-darwin.py
: <archiver>$(here)/src/bin/ar
<ranlib>$(here)/src/bin/ranlib
;

using clang-linux : 3.9.0 : $(PYTHON) $(here)/src/clang-linux-3.9.0.py
: <archiver>$(here)/src/bin/ar
<ranlib>$(here)/src/bin/ranlib
;

using clang-vxworks : 4.0.1 : $(PYTHON) $(here)/src/clang-vxworks-4.0.1.py
Expand All @@ -39,5 +37,4 @@ using clang-vxworks : 4.0.1 : $(PYTHON) $(here)/src/clang-vxworks-4.0.1.py

using intel-darwin : 10.2 : $(PYTHON) $(here)/src/intel-darwin-10.2.py
: <archiver>$(here)/src/bin/ar
<ranlib>$(here)/src/bin/ranlib
;
4 changes: 0 additions & 4 deletions test/toolset-mock/src/Jamroot.jam
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import feature ;

.PYTHON = [ os.environ PYTHON_CMD ] ;
path-constant .AR : ar.py ;
path-constant .RANLIB : ranlib.py ;
path-constant .LIBTOOL : libtool.py ;
path-constant .STRIP : strip.py ;
path-constant .LD : ld.py ;
Expand All @@ -25,14 +24,12 @@ rule cfg-header ( target : : properties * )
{
local PYTHON = [ c-escape $(.PYTHON) ] ;
local AR = [ c-escape $(.AR) ] ;
local RANLIB = [ c-escape $(.RANLIB) ] ;
local LIBTOOL = [ c-escape $(.LIBTOOL) ] ;
local STRIP = [ c-escape $(.STRIP) ] ;
local LD = [ c-escape $(.LD) ] ;
print.output $(target) ;
print.text "#define PYTHON_CMD "\"$(PYTHON)\" : true ;
print.text "#define AR_CMD "\"$(AR)\" : true ;
print.text "#define RANLIB_CMD "\"$(RANLIB)\" : true ;
print.text "#define LIBTOOL_CMD "\"$(LIBTOOL)\" : true ;
print.text "#define STRIP_CMD "\"$(STRIP)\" : true ;
print.text "#define LD_CMD "\"$(LD)\" : true ;
Expand All @@ -55,7 +52,6 @@ rule write-target-os ( target : : properties * )
make target-os.txt : : @write-target-os ;

exe ar : [ obj ar.obj : mock-program.cpp : <define>PY_SCRIPT=AR_CMD ] ;
exe ranlib : [ obj ranlib.obj : mock-program.cpp : <define>PY_SCRIPT=RANLIB_CMD ] ;
exe libtool : [ obj libtool.obj : mock-program.cpp : <define>PY_SCRIPT=LIBTOOL_CMD ] ;
exe strip : [ obj strip.obj : mock-program.cpp : <define>PY_SCRIPT=STRIP_CMD ] ;
exe ld : [ obj ld.obj : mock-program.cpp : <define>PY_SCRIPT=LD_CMD ] ;
22 changes: 11 additions & 11 deletions test/toolset-mock/src/ar.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@

from MockProgram import *

command('ar', 'rc', output_file('bin/gcc-gnu-4.8.3/debug/link-static/libl1.a'), input_file('bin/gcc-gnu-4.8.3/debug/link-static/lib.o'))
command('ar', 'rc', output_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/libl1.a'), input_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/lib.o'))
command('ar', 'rc', output_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/lib.o'))
command('ar', 'rc', output_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
command('ar', 'rc', output_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/lib.o'))
command('ar', 'rc', output_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
command('ar', 'rc', output_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/lib.o'))
command('ar', 'rc', output_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
command('ar', 'rc', output_file('bin/clang-linux-3.9.0/debug/link-static/libl1.a'), input_file('bin/clang-linux-3.9.0/debug/link-static/lib.o'))
command('ar', 'rc', output_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/libl1.a'), input_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/lib.o'))
command('ar', 'rsc', output_file('bin/gcc-gnu-4.8.3/debug/link-static/libl1.a'), input_file('bin/gcc-gnu-4.8.3/debug/link-static/lib.o'))
command('ar', 'rsc', output_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/libl1.a'), input_file('bin/gcc-gnu-4.8.3/debug/link-static/runtime-link-static/lib.o'))
command('ar', 'rsc', output_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/target-os-darwin/lib.o'))
command('ar', 'rsc', output_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/gcc-darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
command('ar', 'rsc', output_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/clang-darwin-3.9.0/debug/link-static/target-os-darwin/lib.o'))
command('ar', 'rsc', output_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/clang-darwin-3.9.0/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
command('ar', 'rsc', output_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/intel-darwin-10.2/debug/link-static/target-os-darwin/lib.o'))
command('ar', 'rsc', output_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/intel-darwin-10.2/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
command('ar', 'rsc', output_file('bin/clang-linux-3.9.0/debug/link-static/libl1.a'), input_file('bin/clang-linux-3.9.0/debug/link-static/lib.o'))
command('ar', 'rsc', output_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/libl1.a'), input_file('bin/clang-linux-3.9.0/debug/link-static/runtime-link-static/lib.o'))
command('ar', 'rcu', output_file('bin/clang-vxworks-4.0.1/debug/link-static/libl1.a'), input_file('bin/clang-vxworks-4.0.1/debug/link-static/lib.o'))
command('ar', 'rcu', output_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/libl1.a'), input_file('bin/clang-vxworks-4.0.1/debug/link-static/runtime-link-static/lib.o'))
command('ar', 'rc', output_file('bin/clang-linux-3.9.0/debug/link-static/target-os-windows/libl1.lib'), input_file('bin/clang-linux-3.9.0/debug/link-static/target-os-windows/lib.obj'))
command('ar', 'rsc', output_file('bin/clang-linux-3.9.0/debug/link-static/target-os-windows/libl1.lib'), input_file('bin/clang-linux-3.9.0/debug/link-static/target-os-windows/lib.obj'))

main()
1 change: 0 additions & 1 deletion test/toolset-mock/src/clang-3.9.0-darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from MockProgram import *

command('clang++', '-print-prog-name=ar', stdout=script('ar.py'))
command('clang++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))

# all builds are multi-threaded for darwin
if allow_properties("variant=debug", "link=shared", "runtime-link=shared"):
Expand Down
1 change: 0 additions & 1 deletion test/toolset-mock/src/clang-linux-3.9.0.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from MockProgram import *

command('clang++', '-print-prog-name=ar', stdout=script('ar.py'))
command('clang++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))

# target-os=linux ..

Expand Down
1 change: 0 additions & 1 deletion test/toolset-mock/src/clang-vxworks-4.0.1.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from MockProgram import *

command('clang++', '-print-prog-name=ar', stdout=script('ar.py'))
command('clang++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))

if allow_properties('variant=debug', 'link=shared', 'threading=single', 'runtime-link=shared'):
command('clang++', unordered(ordered('-x', 'c++'), '-O0', '-fno-inline', '-Wall', '-g', '-fPIC', '-c'), '-o', output_file('bin/clang-vxworks-4.0.1/debug/lib.o'), input_file(source='lib.cpp'))
Expand Down
1 change: 0 additions & 1 deletion test/toolset-mock/src/gcc-4.2.1-darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from MockProgram import *

command('g++', '-print-prog-name=ar', stdout=script('ar.py'))
command('g++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))

# all builds are multi-threaded for darwin
if allow_properties("variant=debug", "link=shared", "runtime-link=shared"):
Expand Down
1 change: 0 additions & 1 deletion test/toolset-mock/src/gcc-4.8.3-linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from MockProgram import *

command('g++', '-print-prog-name=ar', stdout=script('ar.py'))
command('g++', '-print-prog-name=ranlib', stdout=script('ranlib.py'))

if allow_properties("variant=debug", "link=shared", "threading=single", "runtime-link=shared"):
command("g++", unordered("-O0", "-fno-inline", "-Wall", "-g", "-fPIC"), "-c", "-o", output_file("bin/gcc-gnu-4.8.3/debug/lib.o"), input_file(source="lib.cpp"))
Expand Down
1 change: 0 additions & 1 deletion test/toolset-mock/src/intel-darwin-10.2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from MockProgram import *

command('icc', '-print-prog-name=ar', stdout=script('ar.py'))
command('icc', '-print-prog-name=ranlib', stdout=script('ranlib.py'))

# all builds are multi-threaded for darwin
if allow_properties("variant=debug", "link=shared", "runtime-link=shared"):
Expand Down
25 changes: 0 additions & 25 deletions test/toolset-mock/src/ranlib.py

This file was deleted.