From b1c71448c4c88890cbd070b9f78f2530fd4c912d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 27 Sep 2018 10:01:59 +0200 Subject: [PATCH] buildsys: stop using ward for HPC-GAP It is not doing anything anymore, see issue #1742 --- .gitignore | 3 --- Makefile.rules | 36 ------------------------------------ configure.ac | 22 ---------------------- etc/ci-prepare.sh | 5 ----- src/debug.h | 3 +-- 5 files changed, 1 insertion(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index d7d66eac556..c63ceb482c5 100644 --- a/.gitignore +++ b/.gitignore @@ -82,9 +82,6 @@ doc/gapmacrodoc.idx /tags /src/TAGS -# ward -/hpcgap/ward - /builds/ /libgap.la diff --git a/Makefile.rules b/Makefile.rules index 4b5c5a685b4..48874a9cd57 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -223,40 +223,6 @@ GAP_LIBS += $(LIBATOMIC_OPS_LIBS) GAP_LIBS += $(LIBS) -######################################################################## -# HPC-GAP: transform code using ward -# -# For HPC-GAP, we must use ward as a preprocessor before invoking the C -# compiler. The following build rules achieve this. -######################################################################## -ifeq ($(HPCGAP),yes) - -# Compute new list of sources from ORIGINAL_SOURCES, by replacing src/ with gen/ -ORIGINAL_SOURCES := $(SOURCES) -SOURCES := $(patsubst src/%,gen/%,$(ORIGINAL_SOURCES)) - -# static pattern rule for translating sources via ward -# (note that ward needs to parse the sources, hence gen/config.h must already be made) -gen/%.c: src/%.c gen/config.h - @$(MKDIR_P) $(@D)/$(DEPDIRNAME) - @echo "$@: $<" > $(DEPFILE) # add dependency from gen/*.c to src/*.c - @echo "$<:" >> $(DEPFILE) # add empty rule for src/*.c, to avoid errors if a source file is renamed or removed - $(QUIET_WARD) CPP="$(CPP)" $(ADDGUARDS2) -cpp $(GAP_CPPFLAGS) -- $< > $@ - -# Normally, GNU make deletes intermediate build files, such as the gen/*.c -# files generated by ward. We do not want this for various reasons (performance -# being one of them), so we tell GNU make accordingly: -.SECONDARY: $(SOURCES) - -endif # end of HPCGAP specific code - - -# instruct GNU make to delete output files of failed build rules, -# so that if Ward errors out, any incomplete generated files are -# deleted. -.DELETE_ON_ERROR: - - ######################################################################## # Object files ######################################################################## @@ -279,7 +245,6 @@ ifneq ($(findstring $(MAKEFLAGS),s),s) ifndef V QUIET_CC = @echo " C $< => $@"; QUIET_LINK = @echo " LINK $@"; -QUIET_WARD = @echo " WARD $< => $@"; QUIET_SED = @echo " SED $< => $@"; QUIET_INSTALL = @echo " INSTALL $< => $@"; QUIET = @ @@ -672,7 +637,6 @@ sysinfo.gap: config.status $(srcdir)/Makefile.rules cnf/GAP-CFLAGS cnf/GAP-CPPFL @echo "GAParch=$(GAPARCH)" >> $@ @echo "GAP_ABI=$(ABI)" >> $@ @echo "GAP_HPCGAP=$(HPCGAP)" >> $@ - @echo "GAP_ADDGUARDS2=$(ADDGUARDS2)" >> $@ @echo "" >> $@ @echo "GAP_BIN_DIR=\"$(abs_builddir)\"" >> $@ @echo "GAP_LIB_DIR=\"$(abs_srcdir)\"" >> $@ diff --git a/configure.ac b/configure.ac index 5c58a06b514..b397fac3c65 100644 --- a/configure.ac +++ b/configure.ac @@ -516,28 +516,6 @@ AC_SUBST([JULIA_LDFLAGS]) AC_SUBST([JULIA_LIBS]) -dnl Find ward (if HPC-GAP mode is enabled) -AC_ARG_WITH([ward], - [AS_HELP_STRING([--with-ward@<:@=PREFIX@:>@], - [prefix to the ward tool (used for building HPC-GAP)])], - [], - [with_ward=check]) - -dnl If HPC-GAP is enabled, check for a usable ward, either in the prefix -dnl specified by the user, or else in $srcdir/hpcgap/ward -AS_IF([test "x$enable_hpcgap" = xyes], - [ - # If the user specified a prefix, check only there. - # Otherwise, check in various relative paths, and in $PATH - AS_IF([test "x$with_ward" != xcheck], - [WARD_PATH="$with_ward/bin"], - [WARD_PATH="$srcdir/hpcgap/ward/bin:ward/bin:../ward/bin:$PATH"] - ) - AC_PATH_PROG([ADDGUARDS2], [addguards2c addguards2], [], [$WARD_PATH]) - AS_IF([test "x$ADDGUARDS2" = x], AC_MSG_ERROR([could not locate addguards2])) - ] -) - AS_IF([test "x$with_gc" = xboehm], [ # We bundle two libraries we need for HPC-GAP: diff --git a/etc/ci-prepare.sh b/etc/ci-prepare.sh index 0ec71468a06..be960984103 100644 --- a/etc/ci-prepare.sh +++ b/etc/ci-prepare.sh @@ -20,13 +20,8 @@ then fi BUILDDIR=$PWD -# for HPC-GAP we install ward inside BUILDDIR if [[ $HPCGAP = yes ]] then - git clone https://github.com/gap-system/ward - cd ward - CFLAGS= LDFLAGS= ./build.sh - cd .. CONFIGFLAGS="$CONFIGFLAGS --enable-hpcgap" fi diff --git a/src/debug.h b/src/debug.h index 2513c6ca8fc..b220bebd9fa 100644 --- a/src/debug.h +++ b/src/debug.h @@ -29,9 +29,8 @@ #endif // Portable compile time assertion. -#if defined(static_assert) && !defined(WARD_ENABLED) +#if defined(static_assert) // If available, use _Static_assert resp. static_assert from C11. -// However, ward currently cannot deal with it. #define GAP_STATIC_ASSERT(cond, msg) static_assert(cond, msg) #else // If the compiler does not support _Static_assert resp. static_assert,