Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
d90f33e6
Commit
d90f33e6
authored
8 years ago
by
Joakim Nohlgård
Browse files
Options
Downloads
Patches
Plain Diff
make: Add support for specifying a different compiler for assembler
parent
f6022a28
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile.base
+2
-2
2 additions, 2 deletions
Makefile.base
Makefile.vars
+4
-1
4 additions, 1 deletion
Makefile.vars
cpu/Makefile.include.gnu
+12
-11
12 additions, 11 deletions
cpu/Makefile.include.gnu
cpu/Makefile.include.llvm
+1
-0
1 addition, 0 deletions
cpu/Makefile.include.llvm
with
19 additions
and
14 deletions
Makefile.base
+
2
−
2
View file @
d90f33e6
...
@@ -53,8 +53,8 @@ $(BINDIR)/$(MODULE).a $(OBJ): | $(BINDIR)/$(MODULE)/
...
@@ -53,8 +53,8 @@ $(BINDIR)/$(MODULE).a $(OBJ): | $(BINDIR)/$(MODULE)/
$(BINDIR)/$(MODULE).a
:
$(OBJ) | ${DIRS:%=ALL--%}
$(BINDIR)/$(MODULE).a
:
$(OBJ) | ${DIRS:%=ALL--%}
$(
Q
)$(
AR
)
$(
ARFLAGS
)
$@
$?
$(
Q
)$(
AR
)
$(
ARFLAGS
)
$@
$?
CXXFLAGS
=
$(
filter-out
$(
CXXUWFLAGS
)
,
$(
CFLAGS
))
$(
CXXEXFLAGS
)
CXXFLAGS
=
$(
filter-out
$(
CXXUWFLAGS
)
,
$(
CFLAGS
))
$(
CXXEXFLAGS
)
CCASFLAGS
=
$(
filter-out
$(
CCASUWFLAGS
)
,
$(
CFLAGS
))
$(
CCASEXFLAGS
)
# compile and generate dependency info
# compile and generate dependency info
...
@@ -76,7 +76,7 @@ $(ASMOBJ): $(BINDIR)/$(MODULE)/%.o: %.s
...
@@ -76,7 +76,7 @@ $(ASMOBJ): $(BINDIR)/$(MODULE)/%.o: %.s
$(
Q
)$(
AS
)
$(
ASFLAGS
)
-o
$@
$(
abspath
$<
)
$(
Q
)$(
AS
)
$(
ASFLAGS
)
-o
$@
$(
abspath
$<
)
$(ASSMOBJ)
:
$(BINDIR)/$(MODULE)/%.o: %.S
$(ASSMOBJ)
:
$(BINDIR)/$(MODULE)/%.o: %.S
$(
Q
)$(
CC
)
$(
CFLAGS
)
$(
INCLUDES
)
-MD
-MP
-c
-o
$@
$(
abspath
$<
)
$(
Q
)$(
CC
AS
)
$(
C
CAS
FLAGS
)
$(
INCLUDES
)
-MD
-MP
-c
-o
$@
$(
abspath
$<
)
# pull in dependency info for *existing* .o files
# pull in dependency info for *existing* .o files
# deleted header files will be silently ignored
# deleted header files will be silently ignored
...
...
This diff is collapsed.
Click to expand it.
Makefile.vars
+
4
−
1
View file @
d90f33e6
...
@@ -27,9 +27,12 @@ export TARGET_ARCH # The target platform name, in GCC triple notation,
...
@@ -27,9 +27,12 @@ export TARGET_ARCH # The target platform name, in GCC triple notation,
export
PREFIX
# The prefix of the toolchain commands, usually "$(TARGET_ARCH)-", e.g. "arm-none-eabi-" or "msp430-".
export
PREFIX
# The prefix of the toolchain commands, usually "$(TARGET_ARCH)-", e.g. "arm-none-eabi-" or "msp430-".
export
CC
# The C compiler to use.
export
CC
# The C compiler to use.
export
CXX
# The CXX compiler to use.
export
CXX
# The CXX compiler to use.
export
CCAS
# The C compiler to use for assembler files, typically the same as CC.
export
CFLAGS
# The compiler flags. Must only ever be used with `+=`.
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
CXXUWFLAGS
# (Patter
n
s of) flags in CFLAGS that should not be passed to CXX.
export
CXXEXFLAGS
# Additional flags that should be passed to CXX.
export
CXXEXFLAGS
# Additional flags that should be passed to CXX.
export
CCASUWFLAGS
# (Patterns of) flags in CFLAGS that should not be passed to CCAS.
export
CCASEXFLAGS
# Additional flags that should be passed to CCAS.
export
AR
# The command to create the object file archives.
export
AR
# The command to create the object file archives.
export
ARFLAGS
# Command-line options to pass to AR, default `rcs`.
export
ARFLAGS
# Command-line options to pass to AR, default `rcs`.
export
AS
# The assembler.
export
AS
# The assembler.
...
...
This diff is collapsed.
Click to expand it.
cpu/Makefile.include.gnu
+
12
−
11
View file @
d90f33e6
export
GDBPREFIX
?=
$(
PREFIX
)
export
GDBPREFIX
?=
$(
PREFIX
)
export
CC
=
$(
PREFIX
)
gcc
export
CC
=
$(
PREFIX
)
gcc
export
CXX
=
$(
PREFIX
)
g++
export
CXX
=
$(
PREFIX
)
g++
export
CCAS
?=
$(
CC
)
ifeq
($(LTO),1)
ifeq
($(LTO),1)
export
AR
=
$(
PREFIX
)
gcc-ar
export
AR
=
$(
PREFIX
)
gcc-ar
else
else
export
AR
=
$(
PREFIX
)
ar
export
AR
=
$(
PREFIX
)
ar
endif
endif
export
AS
=
$(
PREFIX
)
as
export
AS
=
$(
PREFIX
)
as
export
LINK
=
$(
PREFIX
)
gcc
export
LINK
=
$(
PREFIX
)
gcc
export
SIZE
=
$(
PREFIX
)
size
export
SIZE
=
$(
PREFIX
)
size
export
OBJCOPY
=
$(
shell
command
-v
$(
PREFIX
)
objcopy gobjcopy objcopy |
head
-n
1
)
export
OBJCOPY
?
=
$(
shell
command
-v
$(
PREFIX
)
objcopy gobjcopy objcopy |
head
-n
1
)
ifeq
($(OBJCOPY),)
ifeq
($(OBJCOPY),)
$(
warning
objcopy not found. Hex file will not be created.
)
$(
warning
objcopy not found. Hex file will not be created.
)
export
OBJCOPY
=
true
export
OBJCOPY
=
true
endif
endif
export
OBJDUMP
=
$(
PREFIX
)
objdump
export
OBJDUMP
=
$(
PREFIX
)
objdump
export
DBG
=
$(
GDBPREFIX
)
gdb
export
DBG
=
$(
GDBPREFIX
)
gdb
This diff is collapsed.
Click to expand it.
cpu/Makefile.include.llvm
+
1
−
0
View file @
d90f33e6
...
@@ -9,6 +9,7 @@ export LLVMPREFIX :=
...
@@ -9,6 +9,7 @@ export LLVMPREFIX :=
endif
endif
export
CC
=
clang
export
CC
=
clang
export
CXX
=
clang++
export
CXX
=
clang++
export
CCAS
?=
$(
CC
)
export
LINK
=
$(
CC
)
export
LINK
=
$(
CC
)
export
AS
=
$(
LLVMPREFIX
)
as
export
AS
=
$(
LLVMPREFIX
)
as
export
AR
=
$(
LLVMPREFIX
)
ar
export
AR
=
$(
LLVMPREFIX
)
ar
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment