Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RTEMS-build-workflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thanassis Tsiodras
RTEMS-build-workflows
Commits
6dcc07df
Commit
6dcc07df
authored
Apr 08, 2016
by
Thanassis Tsiodras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deal with EDISOFT FPU handling issue
parent
4cfe64aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
16 deletions
+40
-16
EDISOFT/Makefile
EDISOFT/Makefile
+40
-16
No files found.
EDISOFT/Makefile
View file @
6dcc07df
# Configuration section
#
# Use environment variables if found, otherwise fallback to sane defaults
#
# If not explicitely selected (with 'make FPU=1'), compile for FPU emulation
ifeq
($(FPU),)
FPU
=
0
...
...
@@ -17,7 +17,8 @@ endif
# Build up our settings from our inputs and our environment
LEON
?=
leon3
RTEMS_MAKEFILE_PATH
=
/opt/rtems-4.8/sparc-rtems4.8/
${LEON}
RTEMS
?=
/opt/rtems-4.8
RTEMS_MAKEFILE_PATH
=
${RTEMS}
/sparc-rtems4.8/
${LEON}
RTEMS_LIB
=
${RTEMS_MAKEFILE_PATH}
/lib
EDISOFT_SUPPORT_PATH
?=
/root/development/build/rtems-impr/testsuites/support
CROSS_PREFIX
=
sparc-rtems4.8
...
...
@@ -51,18 +52,22 @@ EDISOFT_SRC += ${LEON}.c
# VPATH will locate them...
#
# DEAR USER, YOU MUST EDIT THIS
SRC
=
\
NONFPU_
SRC
=
\
init.c
\
task1.c
\
task2.c
\
${EDISOFT_SRC}
FPU_SRC
=
\
task1.c
\
SUFFIX
=
$(CFG)
.
$(FPU_SUFFIX)
.
$(LEON)
# Build a Dependency list and an Object list, by replacing the .c
# extension to .d for dependency files, and .o for object files.
DEP
=
$(
patsubst
%.c, deps.
$(SUFFIX)
/%.d,
${SRC}
)
OBJ
=
$(
patsubst
%.c, objs.
$(SUFFIX)
/%.o,
${SRC}
)
NONFPU_DEP
=
$(
patsubst
%.c, deps.
$(SUFFIX)
/NONFPU_%.d,
${NONFPU_SRC}
)
NONFPU_OBJ
=
$(
patsubst
%.c, objs.
$(SUFFIX)
/NONFPU_%.o,
${NONFPU_SRC}
)
FPU_DEP
=
$(
patsubst
%.c, deps.
$(SUFFIX)
/FPU_%.d,
${FPU_SRC}
)
FPU_OBJ
=
$(
patsubst
%.c, objs.
$(SUFFIX)
/FPU_%.o,
${FPU_SRC}
)
# Your final binary
#
...
...
@@ -71,7 +76,7 @@ TARGET=fputest
# What compiler to use for generating dependencies:
# it will be invoked with -MM -MP
CC
=
${CROSS_PREFIX}
-gcc
CC
=
${
RTEMS}
/bin/
${
CROSS_PREFIX}
-gcc
CDEP
=
${CC}
# What include flags to pass to the compiler
...
...
@@ -88,9 +93,11 @@ else
CFLAGS
+=
${COMMON}
-g
-O2
-Wall
${INCLUDEFLAGS}
endif
# Should we generate emulated FPU instructions for the SRC?
# FPU section
CFLAGS_FPU
=
${CFLAGS}
CFLAGS_NONFPU
=
${CFLAGS}
-msoft-float
ifeq
($(FPU),0)
CFLAGS
+=
-msoft-float
CFLAGS
_FPU
+=
-msoft-float
LDFLAGS
+=
-msoft-float
endif
...
...
@@ -126,7 +133,7 @@ endif
endif
bin.$(SUFFIX)/${TARGET}
:
${OBJ} | inform
bin.$(SUFFIX)/${TARGET}
:
${
NONFPU_OBJ} ${FPU_
OBJ} | inform
@
mkdir
-p
$(
dir
$@
)
ifeq
($(V),1)
$(CC)
-g
-o
$@
$^
${LDFLAGS}
...
...
@@ -140,20 +147,36 @@ ifeq ($(CFG),release)
endif
@
echo
Built with RTEMS at
${RTEMS_LIB}
for
${LEON}
.
objs.$(SUFFIX)/%.o
:
%.c
objs.$(SUFFIX)/NONFPU_%.o
:
%.c
@
mkdir
-p
$(
dir
$@
)
ifeq
($(V),1)
$(CC)
-c
$(CFLAGS_NONFPU)
-o
$@
$<
else
@
echo
[
CC]
$@
@
$(CC)
-c
$(CFLAGS_NONFPU)
-o
$@
$<
endif
objs.$(SUFFIX)/FPU_%.o
:
%.c
@
mkdir
-p
$(
dir
$@
)
ifeq
($(V),1)
$(CC)
-c
$(CFLAGS)
-o
$@
$<
$(CC)
-c
$(CFLAGS
_FPU
)
-o
$@
$<
else
@
echo
[
CC]
$@
@
$(CC)
-c
$(CFLAGS)
-o
$@
$<
@
$(CC)
-c
$(CFLAGS
_FPU
)
-o
$@
$<
endif
deps.$(SUFFIX)/%.d
:
%.c
deps.$(SUFFIX)/NONFPU_%.d
:
%.c
@
mkdir
-p
$(
dir
$@
)
@
echo
Generating dependencies
for
$<
@
set
-e
;
$(CDEP)
-MM
-MP
$(INCLUDEFLAGS)
$<
>
$@
.
$$$$
;
\
sed
's,\($*\)\.o[ :]*,objs.
$(SUFFIX)
\/NONFPU_\1.o $@ : ,g'
<
$@
.
$$$$
>
$@
;
\
rm
-f
$@
.
$$$$
deps.$(SUFFIX)/FPU_%.d
:
%.c
@
mkdir
-p
$(
dir
$@
)
@
echo
Generating dependencies
for
$<
@
set
-e
;
$(CDEP)
-MM
-MP
$(INCLUDEFLAGS)
$<
>
$@
.
$$$$
;
\
sed
's,\($*\)\.o[ :]*,objs.
$(
CFG)
\/
\1.o $@ : ,g'
<
$@
.
$$$$
>
$@
;
\
sed
's,\($*\)\.o[ :]*,objs.
$(
SUFFIX)
\/FPU_
\1.o $@ : ,g'
<
$@
.
$$$$
>
$@
;
\
rm
-f
$@
.
$$$$
clean
:
...
...
@@ -164,6 +187,7 @@ clean:
# (-include), since they will be missing in the first invocation!
ifneq
($(MAKECMDGOALS),clean)
ifneq
($(CFG),)
-include
${DEP}
-include
${NONFPU_DEP}
-include
${FPU_DEP}
endif
endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment