Skip to content

Commit ace70cf

Browse files
committed
Make runguard compile against our own libcgroup, linked shared.
1 parent 63a805b commit ace70cf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

configure.ac

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ if test "x$JUDGEHOST_BUILD_ENABLED" = xyes; then
153153
AC_SUBST(RUNGROUP,$with_rungroup)
154154
AC_MSG_RESULT($RUNGROUP)
155155
fi
156-
157-
# Check for using Linux cgroups for memory control
158-
AC_CHECK_LIB(cgroup, cgroup_init, AC_SUBST(LIBCGROUP,[-lcgroup]), AC_MSG_ERROR([Linux cgroup library not found.]))
159156
fi
160157
# }}}
161158

judge/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ $(SUBST_FILES): %: %.in $(TOPDIR)/paths.mk
1616
evict: evict.c $(LIBHEADERS) $(LIBSOURCES)
1717
$(CC) $(CFLAGS) -o $@ $< $(LIBSOURCES)
1818

19+
LIBCGROUP_DIR = lib/libcgroup-3.1.0
1920
runguard: runguard.cc $(LIBHEADERS) $(LIBSOURCES) $(TOPDIR)/etc/runguard-config.h
20-
$(CXX) $(CXXFLAGS) -o $@ $< $(LIBSOURCES) $(LIBCGROUP)
21+
$(CXX) $(CXXFLAGS) -L$(TOPDIR)/$(LIBCGROUP_DIR)/src/.libs -I$(TOPDIR)/$(LIBCGROUP_DIR)/include -o $@ $< $(LIBSOURCES) -lcgroup
2122

2223
runpipe: runpipe.cc $(LIBHEADERS) $(LIBSOURCES)
2324
$(CXX) $(CXXFLAGS) -static -o $@ $< $(LIBSOURCES)

0 commit comments

Comments
 (0)