mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Makefile: Add ARFLAGS for overriding command line options to ar
- Makefile.base: Respect ARFLAGS when building static archives. - Makefile.cflags: Add default ARFLAGS. - Makefile.vars: Add description for ARFLAGS.
This commit is contained in:
parent
5e2b9f52ba
commit
8d68afa6e6
@ -49,7 +49,7 @@ $(BINDIR)$(MODULE)/:
|
||||
$(BINDIR)$(MODULE).a $(OBJ): | $(BINDIR)$(MODULE)/
|
||||
|
||||
$(BINDIR)$(MODULE).a: $(OBJ) | ${DIRS:%=ALL--%}
|
||||
$(AD)$(AR) -rcs $@ $?
|
||||
$(AD)$(AR) $(ARFLAGS) $@ $?
|
||||
|
||||
|
||||
CXXFLAGS = $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS)
|
||||
|
@ -50,3 +50,9 @@ endif
|
||||
|
||||
# Forbid common symbols to prevent accidental aliasing.
|
||||
CFLAGS += -fno-common
|
||||
|
||||
# Default ARFLAGS for platforms which do not specify it.
|
||||
# Note: make by default provides ARFLAGS=rv which we want to override
|
||||
ifeq ($(origin ARFLAGS),default)
|
||||
ARFLAGS = rcs
|
||||
endif
|
||||
|
@ -26,6 +26,7 @@ export CFLAGS # The compiler flags. Must only ever be used with `
|
||||
export CXXUWFLAGS # (Patters of) flags in CFLAGS, that should not be passed to CXX.
|
||||
export CXXEXFLAGS # Additional flags that should be passed to CXX.
|
||||
export AR # The command to create the object file archives.
|
||||
export ARFLAGS # Command-line options to pass to AR, default `rcs`.
|
||||
export AS # The assembler.
|
||||
export ASFLAGS # Flags for the assembler.
|
||||
export LINK # The command used to link the files. Must take the same parameters as GCC, i.e. "ld" won't work.
|
||||
|
Loading…
Reference in New Issue
Block a user