Skip to content

Commit ca2ebae

Browse files
committed
Configure the correct archiver to build runtime/libcompcert.a
- Use `${toolprefix}ar` instead of `ar` so as to match the choice of C compiler (as proposed by Michael Soegtrop in PR #380) - Use the Diab archiver `dar` if configured for powerpc-eabi-diab Closes: #380
1 parent e76c156 commit ca2ebae

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

configure

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ casmruntime=""
211211
clinker_needs_no_pie=true
212212
clinker_options=""
213213
cprepro_options=""
214-
214+
archiver="${toolprefix}ar rcs"
215215

216216
#
217217
# ARM Target Configuration
@@ -275,6 +275,7 @@ if test "$arch" = "powerpc"; then
275275
clinker="${toolprefix}dcc"
276276
cprepro="${toolprefix}dcc"
277277
cprepro_options="-E -D__GNUC__"
278+
archiver="${toolprefix}dar -q"
278279
libmath="-lm"
279280
system="diab"
280281
responsefile="diab"
@@ -666,6 +667,7 @@ CLINKER=$clinker
666667
CLINKER_OPTIONS=$clinker_options
667668
CPREPRO=$cprepro
668669
CPREPRO_OPTIONS=$cprepro_options
670+
ARCHIVER=$archiver
669671
ENDIANNESS=$endianness
670672
HAS_RUNTIME_LIB=$has_runtime_lib
671673
HAS_STANDARD_HEADERS=$has_standard_headers
@@ -750,6 +752,9 @@ CASMRUNTIME=gcc -c
750752
# Linker
751753
CLINKER=gcc
752754
755+
# Archiver to build .a libraries
756+
ARCHIVER=ar rcs
757+
753758
# Math library. Set to empty under MacOS X
754759
LIBMATH=-lm
755760
@@ -839,6 +844,7 @@ CompCert configuration:
839844
Assembler for runtime lib..... $casmruntime
840845
Linker........................ $clinker
841846
Linker needs '-no-pie'........ $clinker_needs_no_pie
847+
Archiver...................... $archiver
842848
Math library.................. $libmath
843849
Build command to use.......... $make
844850
Menhir API library............ $menhir_dir

runtime/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ endif
4848

4949
$(LIB): $(OBJS)
5050
rm -f $(LIB)
51-
ar rcs $(LIB) $(OBJS)
51+
$(ARCHIVER) $(LIB) $(OBJS)
5252

5353
%.o: %.s
5454
$(CASMRUNTIME) -o $@ $^

0 commit comments

Comments
 (0)