summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAchim Kriso <achim.kriso@student.kit.edu>2020-01-16 11:26:03 +0100
committerAchim Kriso <achim.kriso@student.kit.edu>2020-01-16 11:26:03 +0100
commit5be874a45a94ec752915fc48bd0cd407d3ae4f09 (patch)
treea5d9f683c61ff087bc0e408f141add7868e085e5
parentbd28a10f91f26185a3cda099778ad2302ecf36a4 (diff)
Fixed makefile and other minor issues
-rw-r--r--Makefile9
-rw-r--r--config.default.mak4
m---------libfirm0
-rw-r--r--src/driver/c_driver.c4
-rw-r--r--src/firm/firm_opt.c2
5 files changed, 9 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 21173a5..fec6c18 100644
--- a/Makefile
+++ b/Makefile
@@ -122,8 +122,7 @@ $(LIBFIRM_FILE): libfirm_subdir
Makefile: libfirm_subdir
# Build libfirm in subdirectory
libfirm_subdir:
- $(Q)$(MAKE) -w -C $(FIRM_HOME) $(LIBFIRM_FILE_BASE)
-
+ $(Q)$(MAKE) -w -C $(FIRM_HOME) top_builddir=$(top_builddir) $(LIBFIRM_FILE_BASE)
$(LIBFIRM_FILE_DLL): libfirm_subdir_dll
libfirm_subdir_dll:
$(Q)$(MAKE) -w -C $(FIRM_HOME) $(LIBFIRM_FILE_DLL_BASE)
@@ -164,12 +163,12 @@ $(builddir)/%.o: %.c
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -MP -MMD -c -o $@ $<
# lfmalloc runtime
-libfirm_lfmalloc_firm = build/$(variant)/$(libfirm_lfmalloc_name)
+libfirm_lfmalloc_firm = $(top_builddir)/$(variant)/$(libfirm_lfmalloc_name)
.PHONY: $(libfirm_lfmalloc)
$(libfirm_lfmalloc):
- $(Q)$(MAKE) -s -C $(FIRM_HOME) $(libfirm_lfmalloc_firm) #TODO Achim: with -s or not?
- $(Q)cp $(FIRM_HOME)/$(libfirm_lfmalloc_firm) $@ #TODO Achim: Always copy, not sure how to fix
+ $(Q)$(MAKE) CC=$(CC) builddir=$(top_builddir) -C $(FIRM_HOME) $(libfirm_lfmalloc_firm)
+ $(Q)cp $(FIRM_HOME)/$(libfirm_lfmalloc_firm) $@
clean:
@echo 'CLEAN'
diff --git a/config.default.mak b/config.default.mak
index 4ca65c1..34b8ebc 100644
--- a/config.default.mak
+++ b/config.default.mak
@@ -5,9 +5,9 @@ ifneq ("$(wildcard $(top_srcdir)/libfirm)", "")
FIRM_HOME ?= $(top_srcdir)/libfirm
FIRM_CPPFLAGS ?= -I$(FIRM_HOME)/include -I$(FIRM_HOME)/build/gen/include/libfirm
FIRM_LIBS ?= -lm
-LIBFIRM_FILE_BASE ?= build/$(variant)/libfirm.a
+LIBFIRM_FILE_BASE ?= $(top_builddir)/$(variant)/libfirm.a
LIBFIRM_FILE ?= $(FIRM_HOME)/$(LIBFIRM_FILE_BASE)
-LIBFIRM_FILE_DLL_BASE ?= build/$(variant)/libfirm$(DLLEXT)
+LIBFIRM_FILE_DLL_BASE ?= $(top_builddir)/$(variant)/libfirm$(DLLEXT)
LIBFIRM_FILE_DLL ?= $(FIRM_HOME)/$(LIBFIRM_FILE_DLL_BASE)
else
PKG_CONFIG ?= pkg-config
diff --git a/libfirm b/libfirm
-Subproject afa594c17193b74c8d0198a158784c41004b1c7
+Subproject 55bfca9ceb89a3b7bc0c4e3bfd0bc3d94e6958d
diff --git a/src/driver/c_driver.c b/src/driver/c_driver.c
index 6e962f3..1f004a9 100644
--- a/src/driver/c_driver.c
+++ b/src/driver/c_driver.c
@@ -891,8 +891,8 @@ bool link_program(compilation_env_t *env, compilation_unit_t *units)
/* TODO: Remove. Only temporary for benchmarking */
//driver_add_flag(&file_obst, "-L/data1/firm/");
- driver_add_flag(&file_obst, "-L/home/achim/Daten/uni/Bachelorarbeit/cparser/build/optimize/");
- driver_add_flag(&file_obst, "-llfmalloc");
+ //driver_add_flag(&file_obst, "-L/home/achim/Daten/uni/Bachelorarbeit/cparser/build/optimize/");
+ //driver_add_flag(&file_obst, "-llfmalloc");
char *const commandline = obstack_nul_finish(&file_obst);
diff --git a/src/firm/firm_opt.c b/src/firm/firm_opt.c
index d3ccd18..e472058 100644
--- a/src/firm/firm_opt.c
+++ b/src/firm/firm_opt.c
@@ -387,7 +387,7 @@ static opt_config_t opts[] = {
IRG("unroll-loops", do_loop_unrolling2, "loop unrolling", OPT_FLAG_NONE),
IRG("vrp", set_vrp_data, "value range propagation", OPT_FLAG_NONE),
IRG("rts", rts_map, "optimization of known library functions", OPT_FLAG_NONE),
- IRG("lf-asan", lowfat_asan, "lowfat adresssanitizer instrumentation", OPT_FLAG_NONE),
+ IRG("lf-asan", lowfat_asan, "lowfat adresssanitizer instrumentation", OPT_FLAG_ESSENTIAL),
IRP("inline", do_inline, "inlining", OPT_FLAG_NONE),
IRP("lower-const", lower_const_code, "lowering of constant code", OPT_FLAG_HIDE_OPTIONS | OPT_FLAG_NO_DUMP | OPT_FLAG_NO_VERIFY | OPT_FLAG_ESSENTIAL),
IRP("local-const", local_opts_const_code, "local optimisation of constant initializers",