From 5cc31057d5dc666129176a89d61cdd6cfeba81e6 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Fri, 20 May 2016 23:03:30 +0200 Subject: [PATCH] add example to create an HermitCore App with Intel's C compiler --- hermit/usr/benchmarks/Makefile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/hermit/usr/benchmarks/Makefile b/hermit/usr/benchmarks/Makefile index f50df1c66..b462bf750 100644 --- a/hermit/usr/benchmarks/Makefile +++ b/hermit/usr/benchmarks/Makefile @@ -29,6 +29,13 @@ ifeq ($V,0) P = > /dev/null endif +INTEL = 0 +ifeq ($INTEL,0) +ICC_EXE = +else +ICC_EXE = stream_icc +endif + # other implicit rules %.o : %.c @echo [CC] $@ @@ -44,7 +51,7 @@ endif default: all -all: stream hg netio RCCE_pingping RCCE_pingpong basic +all: stream hg netio RCCE_pingping RCCE_pingpong basic $(ICC_EXE) stream.o: stream.c @echo [CC] $@ @@ -57,6 +64,18 @@ stream: stream.o $Q$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@ $Qchmod a-x $@.sym +stream_icc.o: stream.c + @echo [ICC] $@ + icc -m64 -c -o $@ -mno-red-zone -O3 -xHost -fno-stack-protector -I$(TOPDIR)/hermit/usr/x86/x86_64-hermit/include/ -openmp -ffreestanding $< + $Q$(ELFEDIT_FOR_TARGET) --output-osabi HermitCore $@ + +stream_icc: stream_icc.o + @echo [LD] + $Q$(CC_FOR_TARGET) -o $@ $< $(LDFLAGS_FOR_TARGET) $(CFLAGS_FOR_TARGET) -fopenmp + $Q$(OBJCOPY_FOR_TARGET) $(KEEP_DEBUG) $@ $@.sym + $Q$(OBJCOPY_FOR_TARGET) $(STRIP_DEBUG) $@ + $Qchmod a-x $@.sym + basic.o: basic.c @echo [CC] $@ $Q$(CC_FOR_TARGET) -c $(CFLAGS_FOR_TARGET) -pthread -o $@ $<