aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2021-05-09 14:00:12 +0200
committertgingold <tgingold@users.noreply.github.com>2021-05-10 07:56:17 +0200
commit1f189f146766eda9cc61d4fd163398fa826eb622 (patch)
tree396cc088f6247a8d118818b3468a99a0b9bd0164 /Makefile.in
parent82665d421e193998b576ea5b3cb992bf84596850 (diff)
downloadghdl-1f189f146766eda9cc61d4fd163398fa826eb622.tar.gz
ghdl-1f189f146766eda9cc61d4fd163398fa826eb622.tar.bz2
ghdl-1f189f146766eda9cc61d4fd163398fa826eb622.zip
Makefile.in: lift coverage flags from OPT_FLAGS
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in22
1 files changed, 10 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in
index 7cf69b6a6..f2752fd40 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -76,11 +76,11 @@ endif
# Coverage
ifeq "$(build_mode)" "coverage"
-OPT_FLAGS+=-fprofile-arcs -ftest-coverage
+COVERAGE_FLAGS+=-fprofile-arcs -ftest-coverage
endif
-GNATFLAGS=-gnat12 -gnaty3befhkmr -gnatwa -gnatwC -gnatf $(OPT_FLAGS) $(ADA_FLAGS)
-GRT_FLAGS=$(OPT_FLAGS)
+GNATFLAGS=-gnat12 -gnaty3befhkmr -gnatwa -gnatwC -gnatf $(OPT_FLAGS) $(COVERAGE_FLAGS) $(ADA_FLAGS)
+GRT_FLAGS=$(OPT_FLAGS) $(COVERAGE_FLAGS)
ifeq "$(default_pic)" "true"
GRT_FLAGS+=$(PIC_FLAGS)
@@ -194,7 +194,7 @@ ghdl_mcode$(EXEEXT): $(GRT_ADD_OBJS) $(GRT_SRC_DEPS) $(ORTHO_DEPS) \
$(GNATMAKE) -o $@ -gnat12 $(GHDL_MCODE_INCFLAGS) $(GNATFLAGS) -gnatw.A ghdl_jit.adb $(GNAT_BARGS) -largs memsegs_c.o chkstk.o $(GRT_ADD_OBJS) $(LDFLAGS) $(GNAT_LARGS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB) $(GRT_EXEC_OPTS))
memsegs_c.o: $(srcdir)/src/ortho/mcode/memsegs_c.c
- $(CC) -c $(OPT_FLAGS) -o $@ $<
+ $(CC) -c $(OPT_FLAGS) $(COVERAGE_FLAGS) -o $@ $<
libs.vhdl.mcode: ghdl_mcode$(EXEEXT)
$(MAKE) -f $(srcdir)/libraries/Makefile.inc $(LIBVHDL_FLAGS_TO_PASS) GHDL=$(PWD)/ghdl_mcode$(EXEEXT) GHDL_FLAGS="" VHDL_COPY_OBJS=no vhdl.libs.all
@@ -339,7 +339,7 @@ ghdl_llvm_jit$(EXEEXT): $(GRT_ADD_OBJS) $(GRT_SRC_DEPS) $(ORTHO_DEPS) \
llvm-cbindings.o: $(srcdir)/src/ortho/$(llvm_be)/llvm-cbindings.cpp
$(CXX) -c `$(LLVM_CONFIG) --includedir --cxxflags` \
- $(OPT_FLAGS) -o $@ $<
+ $(OPT_FLAGS) $(COVERAGE_FLAGS) -o $@ $<
libs.vhdl.llvmjit: ghdl_llvm_jit$(EXEEXT)
$(MAKE) -f $(srcdir)/libraries/Makefile.inc $(LIBVHDL_FLAGS_TO_PASS) GHDL=$(PWD)/ghdl_llvm$(EXEEXT) GHDL_FLAGS="" VHDLLIBS_COPY_OBJS=no vhdl.libs.all
@@ -361,7 +361,7 @@ ghdl1-llvm$(EXEEXT): version.ads force
ortho_srcdir=$(srcdir)/src/ortho ortho_exec=$@ \
GNATFLAGS="$(GHDL_LLVM_INCFLAGS) $(GNATFLAGS)" LDFLAGS="$(LDFLAGS)" \
LLVM_CONFIG="$(LLVM_CONFIG)" CXX="$(CXX)" \
- CFLAGS="$(WARN_FLAGS) $(OPT_FLAGS)" \
+ CFLAGS="$(WARN_FLAGS) $(OPT_FLAGS) $(COVERAGE_FLAGS)" \
GNATMAKE="$(GNATMAKE)" all
oread-llvm$(EXEEXT): force
@@ -481,10 +481,10 @@ libghw$(SOEXT): libghw.o
$(CC) $(PIC_FLAGS) -shared -o lib/$@ libghw.o
ghwdump.o: $(srcdir)/ghw/ghwdump.c $(srcdir)/ghw/libghw.h
- $(CC) -c -o $@ $< $(OPT_FLAGS) $(WARN_CFLAGS)
+ $(CC) -c -o $@ $< $(OPT_FLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS)
libghw.o: $(srcdir)/ghw/libghw.c $(srcdir)/ghw/libghw.h
- $(CC) $(PIC_FLAGS) -c -o $@ $< $(OPT_FLAGS) $(WARN_CFLAGS)
+ $(CC) $(PIC_FLAGS) -c -o $@ $< $(OPT_FLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS)
all.ghw: ghwdump$(EXEEXT) libghw$(SOEXT)
@@ -525,12 +525,10 @@ uninstall.grt:
################ VPI #####################################################
vpi_thunk.o: $(GRTSRCDIR)/vpi_thunk.c $(GRTSRCDIR)/vpi_thunk.h
-# Do not use OPT_FLAGS (do not enable coverage)
- $(CC) -c -o $@ $< $(PIC_FLAGS) -O $(WARN_CFLAGS)
+ $(CC) -c -o $@ $< $(PIC_FLAGS) $(OPT_FLAGS) $(WARN_CFLAGS)
vhpi_thunk.o: $(GRTSRCDIR)/vhpi_thunk.c $(GRTSRCDIR)/vhpi_thunk.h
-# Do not use OPT_FLAGS (do not enable coverage)
- $(CC) -c -o $@ $< $(PIC_FLAGS) -O $(WARN_CFLAGS)
+ $(CC) -c -o $@ $< $(PIC_FLAGS) $(OPT_FLAGS) $(WARN_CFLAGS)
lib/libghdlvpi$(SOEXT): vpi_thunk.o vhpi_thunk.o
$(CC) -o $@ $^ -shared $(SHLIB_FLAGS)