Skip to content

Commit

Permalink
coremark: fix passing LDFLAGS
Browse files Browse the repository at this point in the history
JIRA: RTOS-832
  • Loading branch information
lukileczo committed May 28, 2024
1 parent 89d4818 commit aa65266
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions coremark/01-core_portme.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ diff --git a/posix/core_portme.mak b/posix/core_portme.mak
index 2852069..3eaaabe 100755
--- a/posix/core_portme.mak
+++ b/posix/core_portme.mak
@@ -24,8 +24,12 @@ OUTFLAG= -o
@@ -24,8 +24,14 @@ OUTFLAG= -o
CC?= cc
# Flag: CFLAGS
# Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
-PORT_CFLAGS = -O2
-FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
+PORT_CFLAGS =
+# FLAGS_STR is used to define string of used flags for the test
+# Filter out some flags that are not necessary to print in benchmark output
+FLAGS_STR := $(filter-out -I%,$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END))
+FLAGS_STR := $(filter-out --sysroot=%,$(FLAGS_STR))
+FLAGS_STR := $(filter-out -B%,$(FLAGS_STR))
Expand All @@ -17,7 +19,7 @@ index 2852069..3eaaabe 100755
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -Iposix -I. -DFLAGS_STR=\"$(FLAGS_STR)\"
# Flag: NO_LIBRT
# Define if the platform does not provide a librt
@@ -65,7 +69,7 @@ LOAD = echo Loading done
@@ -65,7 +71,7 @@ LOAD = echo Loading done
RUN =

OEXT = .o
Expand Down
3 changes: 1 addition & 2 deletions coremark/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ if [ -z ${PORTS_COREMARK_THREADS+x} ]; then
PORTS_COREMARK_THREADS="1"
fi

export XCFLAGS="${CFLAGS} -DUSE_PTHREAD -DMULTITHREAD=${PORTS_COREMARK_THREADS}"
export XLFLAGS="${LDFLAGS}"
export XCFLAGS="${CFLAGS} -DUSE_PTHREAD -DMULTITHREAD=${PORTS_COREMARK_THREADS} ${LDFLAGS}"

# Build coremark
PORT_DIR=phoenix make compile
Expand Down

0 comments on commit aa65266

Please sign in to comment.