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

Use toolprefix for archiver ar when building libcompcert.a #380

Closed
wants to merge 1 commit into from
Closed
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
17 changes: 17 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ if test "$arch" = "arm"; then
clinker="${toolprefix}gcc"
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -U__GNUC__ '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="linux"
fi
Expand Down Expand Up @@ -275,6 +276,7 @@ if test "$arch" = "powerpc"; then
clinker="${toolprefix}dcc"
cprepro="${toolprefix}dcc"
cprepro_options="-E -D__GNUC__"
archiver="${toolprefix}ar"
libmath="-lm"
system="diab"
responsefile="diab"
Expand All @@ -287,6 +289,7 @@ if test "$arch" = "powerpc"; then
clinker="${toolprefix}gcc"
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -U__GNUC__ -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="linux"
;;
Expand All @@ -309,6 +312,7 @@ if test "$arch" = "x86" -a "$bitsize" = "32"; then
clinker_options="-m32"
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -m32 -U__GNUC__ -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="bsd"
;;
Expand All @@ -321,6 +325,7 @@ if test "$arch" = "x86" -a "$bitsize" = "32"; then
clinker_options="-m32"
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -m32 -U__GNUC__ '-D__attribute__(x)=' -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="cygwin"
;;
Expand All @@ -333,6 +338,7 @@ if test "$arch" = "x86" -a "$bitsize" = "32"; then
clinker_options="-m32"
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -m32 -U__GNUC__ -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="linux"
;;
Expand All @@ -358,6 +364,7 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
clinker_options="-m64"
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -m64 -U__GNUC__ -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="bsd"
;;
Expand All @@ -370,6 +377,7 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
clinker_options="-m64"
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -m64 -U__GNUC__ -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="linux"
;;
Expand All @@ -385,6 +393,7 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
clinker_needs_no_pie=false
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -arch x86_64 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' '-D_Nullable=' '-D_Nonnull=' -E"
archiver="${toolprefix}ar"
libmath=""
system="macosx"
;;
Expand All @@ -397,6 +406,7 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
clinker_options="-m64"
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -m64 -U__GNUC__ '-D__attribute__(x)=' -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="cygwin"
;;
Expand Down Expand Up @@ -425,6 +435,7 @@ if test "$arch" = "riscV"; then
clinker_options="$model_options"
cprepro="${toolprefix}gcc"
cprepro_options="$model_options -std=c99 -U__GNUC__ -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="linux"
fi
Expand All @@ -443,6 +454,7 @@ if test "$arch" = "aarch64"; then
clinker_options=""
cprepro="${toolprefix}gcc"
cprepro_options="-std=c99 -U__GNUC__ -E"
archiver="${toolprefix}ar"
libmath="-lm"
system="linux";;
*)
Expand Down Expand Up @@ -666,6 +678,7 @@ CLINKER=$clinker
CLINKER_OPTIONS=$clinker_options
CPREPRO=$cprepro
CPREPRO_OPTIONS=$cprepro_options
ARCHIVER=$archiver
ENDIANNESS=$endianness
HAS_RUNTIME_LIB=$has_runtime_lib
HAS_STANDARD_HEADERS=$has_standard_headers
Expand Down Expand Up @@ -750,6 +763,9 @@ CASMRUNTIME=gcc -c
# Linker
CLINKER=gcc

# Archiver
ARCHIVER=ar

# Math library. Set to empty under MacOS X
LIBMATH=-lm

Expand Down Expand Up @@ -839,6 +855,7 @@ CompCert configuration:
Assembler for runtime lib..... $casmruntime
Linker........................ $clinker
Linker needs '-no-pie'........ $clinker_needs_no_pie
Archiver...................... $archiver
Math library.................. $libmath
Build command to use.......... $make
Menhir API library............ $menhir_dir
Expand Down
2 changes: 1 addition & 1 deletion runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endif

$(LIB): $(OBJS)
rm -f $(LIB)
ar rcs $(LIB) $(OBJS)
$(ARCHIVER) rcs $(LIB) $(OBJS)

%.o: %.s
$(CASMRUNTIME) -o $@ $^
Expand Down