Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
d7020e_srp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
d7020e
d7020e_srp
Commits
c1da7c1d
Commit
c1da7c1d
authored
5 years ago
by
Henrik Tjäder
Browse files
Options
Downloads
Patches
Plain Diff
Update to latest LLVM 9 and working with KLEE 2
parent
c6adb653
No related branches found
No related tags found
No related merge requests found
Pipeline
#227
canceled
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+36
-10
36 additions, 10 deletions
Makefile
with
36 additions
and
10 deletions
Makefile
+
36
−
10
View file @
c1da7c1d
...
@@ -63,7 +63,15 @@ endif
...
@@ -63,7 +63,15 @@ endif
# Optimize for size
# Optimize for size
#OPTIMIZE = -Os
#OPTIMIZE = -Os
# No optimization at all
# No optimization at all
ifeq
"$(MAKECMDGOALS)" "rel"
# GCC
OPTIMIZE
=
-O0
else
ifeq
"$(MAKECMDGOALS)" "wcet"
OPTIMIZE
=
-O0
else
# CLANG
OPTIMIZE
=
-O0
-Xclang
-disable-O0-optnone
OPTIMIZE
=
-O0
-Xclang
-disable-O0-optnone
endif
#INCSEARCH = include
#INCSEARCH = include
#SRCIGNORE =! -iname 'tiny_printf.c'
#SRCIGNORE =! -iname 'tiny_printf.c'
...
@@ -91,16 +99,34 @@ else
...
@@ -91,16 +99,34 @@ else
# Start of the CLANG block
# Start of the CLANG block
# CLANG
# CLANG
CLANGMCFLAGS
=
-target
$(
TARGETTRIPLE
)
# -fno-integrated-as
CLANGMCFLAGS
=
#
-target
$(
TARGETTRIPLE
)
# -fno-integrated-as
# MCU Specific flags
# MCU Specific flags
MCFLAGS
=
-mcpu
=
$(
MCU
)
-mlittle-endian
-mthumb
-ffreestanding
\
#MCFLAGS = -mcpu=$(MCU) -mlittle-endian -mthumb -ffreestanding \
-fmessage-length
=
0
-fsigned-char
-ffunction-sections
-fdata-sections
-mfpu
=
fpv4-sp-d16
-mfloat-abi
=
hard
-fshort-enums
\
#-fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fshort-enums \
-g3
-std
=
gnu11
-Wall
-Wextra
#-g3 -std=gnu11 -Wall -Wextra
ifeq
"$(MAKECMDGOALS)" "rel"
TARGETHWFLAGS
=
-target
$(
TARGETTRIPLE
)
-mcpu
=
$(
MCU
)
-mlittle-endian
-mthumb
-mfpu
=
fpv4-sp-d16
-mfloat-abi
=
hard
TARGETHWLDFLAGS
=
else
ifeq
"$(MAKECMDGOALS)" "wcet"
TARGETHWFLAGS
=
-target
$(
TARGETTRIPLE
)
-mcpu
=
$(
MCU
)
-mlittle-endian
-mthumb
-mfpu
=
fpv4-sp-d16
-mfloat-abi
=
hard
TARGETHWLDFLAGS
=
else
TARGETHWFLAGS
=
# Link for some triple, not really used, but needed for linking with interrupt vectors
TARGETHWLDFLAGS
=
-mtriple
=
$(
TARGETTRIPLE
)
-march
=
thumb
-mcpu
=
$(
MCU
)
-float-abi
=
hard
endif
MCFLAGS
=
-ffreestanding
\
-fmessage-length
=
0
-fsigned-char
-ffunction-sections
-fdata-sections
\
-fshort-enums
-g3
-std
=
gnu11
-Wall
-Wextra
# For creating object file from LLVM IR
# For creating object file from LLVM IR
LLCFLAGS
=
-mtriple
=
$(
TARGETTRIPLE
)
-march
=
thumb
-mcpu
=
$(
MCU
)
-filetype
=
obj
-float-abi
=
hard
LLCFLAGS
=
$(
TARGETHWLDFLAGS
)
-filetype
=
obj
# Assembler flags
# Assembler flags
(unnused)
ASFLAGS
=
-mcpu
=
$(
MCU
)
-mlittle-endian
-mthumb
-mfpu
=
fpv4-sp-d16
-mfloat-abi
=
hard
ASFLAGS
=
-mcpu
=
$(
MCU
)
-mlittle-endian
-mthumb
-mfpu
=
fpv4-sp-d16
-mfloat-abi
=
hard
...
@@ -110,11 +136,11 @@ LDFLAGS = --specs=nosys.specs -Wl,-T "ldscripts/flash.ld" -nostartfiles -Wl,-no
...
@@ -110,11 +136,11 @@ LDFLAGS = --specs=nosys.specs -Wl,-T "ldscripts/flash.ld" -nostartfiles -Wl,-no
# Not used:
# Not used:
#--specs=nano.specs --specs=nosys.specs -lc -lnosys
#--specs=nano.specs --specs=nosys.specs -lc -lnosys
CLANGLDFLAGS
=
-flto
-target
$(
TARGETTRIPLE
)
-mfloat-abi
=
hard
# -save-temps=obj
CLANGLDFLAGS
=
-flto
#or if you want .bc
in
object
s
-save-temps=obj
#or if you want .bc
for each
object
:
-save-temps=obj
# Build the compile command
# Build the compile command
CFLAGS
=
$(
CLANGMCFLAGS
)
$(
MCFLAGS
)
$(
OPTIMIZE
)
$(
DEFS
)
CFLAGS
=
$(
CLANGMCFLAGS
)
$(
TARGETHWFLAGS
)
$(
MCFLAGS
)
$(
OPTIMIZE
)
$(
DEFS
)
# Recursively add all .c files
# Recursively add all .c files
...
...
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