Fix test failure on FreeBSD (#2521)
* Don't use thin-archive to merge multiple archives because it is gnu-ar specific. * remove -time option that may caues -Wunused-command-line-argument warning
This commit is contained in:
parent
bed3101dfc
commit
ef04ada12b
|
|
@ -201,20 +201,23 @@ else
|
|||
endif
|
||||
|
||||
# When archiving just objects (.o), single $(AR) run is enough.
|
||||
# When merging objects (.o) and archives (.a), the following step is taken.
|
||||
# 1. create a temporary archive ($*__tmp.a) which contains only .o
|
||||
# 2. create a thin archive that refers all archives including $*__tmp.a
|
||||
# 3. convert the thin archive to the ordinal archive
|
||||
# When merging objects (.o) and archives (.a), the following steps are taken.
|
||||
# 1. Extract object files from .a
|
||||
# 2. Create a new archive from extracted .o and given .o
|
||||
%.a:
|
||||
if test $(words $(filter %.a,$^)) -eq 0; then \
|
||||
$(AR) -cr $@ $^; \
|
||||
$(RANLIB) $@; \
|
||||
else \
|
||||
$(RM) -f $*__tmp.a; \
|
||||
$(AR) -cr $*__tmp.a $(filter-out %.a,$^); \
|
||||
$(AR) -cqT $@ $*__tmp.a $(filter %.a,$^); \
|
||||
printf "create $@\n addlib $@\n save\\n end" | $(AR) -M; \
|
||||
$(RM) -f $*__tmp.a; \
|
||||
$(RM) -rf $*__tmpdir; \
|
||||
for archive in $(filter %.a,$^); do \
|
||||
mkdir -p $*__tmpdir/$$(basename $${archive}); \
|
||||
cd $*__tmpdir/$$(basename $${archive}); \
|
||||
$(AR) -x ../../$${archive}; \
|
||||
cd ../..; \
|
||||
done; \
|
||||
$(AR) -cr $@ $(filter %.o,$^) $*__tmpdir/*/*.o; \
|
||||
$(RM) -rf $*__tmpdir; \
|
||||
fi
|
||||
|
||||
$(VM_PREFIX)__ALL.a: $(VK_OBJS) $(VM_HIER_LIBS)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ compile(
|
|||
v_flags2 => ['t/t_hier_block.cpp'],
|
||||
verilator_flags2 => ['--stats', ($Self->{vltmt} ? ' --threads 6' : ''),
|
||||
'--hierarchical',
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus -time"'
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus"'
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ compile(
|
|||
v_flags2 => ['t/t_hier_block.cpp'],
|
||||
verilator_flags2 => ['--stats',
|
||||
'--hierarchical',
|
||||
'--CFLAGS', "'-pipe -DCPP_MACRO=cplusplus -time'",
|
||||
'--CFLAGS', "'-pipe -DCPP_MACRO=cplusplus '",
|
||||
'--make cmake',
|
||||
($Self->{vltmt} ? ' --threads 6' : '')],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ compile(
|
|||
v_flags2 => ['t/t_hier_block.cpp'],
|
||||
verilator_flags2 => ['--stats',
|
||||
'+define+USE_VLT', 't/t_hier_block_vlt.vlt',
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus -time"',
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus"',
|
||||
($Self->{vltmt} ? ' --threads 6' : '')],
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ while (1) {
|
|||
"PROTECT_KEY",
|
||||
"t/t_hier_block.v",
|
||||
"-DAS_PROT_LIB",
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus -time"',
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus"',
|
||||
$Self->{vltmt} ? ' --threads 1' : '',
|
||||
"--build"],
|
||||
verilator_run => 1,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ compile(
|
|||
'--stats',
|
||||
'--hierarchical',
|
||||
($Self->{vltmt} ? ' --threads 6' : ''),
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus -time"'
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus"'
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ compile(
|
|||
verilator_flags2 => ['--stats',
|
||||
'--hierarchical',
|
||||
'+define+USE_VLT', 't/t_hier_block_vlt.vlt',
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus -time"',
|
||||
'--CFLAGS', '"-pipe -DCPP_MACRO=cplusplus"',
|
||||
($Self->{vltmt} ? ' --threads 6' : '')],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue