Skip to content

Commit

Permalink
packages/exim: enable parallel make
Browse files Browse the repository at this point in the history
Parallel make used to be broken in exim, as reported in its docs. Now that
line has disappeared from the docs, and parallel make is actually working.

Tested with 'make exim-dirclean ; time make BR2_JLEVEL=999 exim': builds
still succeed and the build time decreases from 34 to 11 seconds on my
host.

Signed-off-by: Luca Ceresoli <[email protected]>
Cc: Bernd Kuhls <[email protected]>
Tested-by: Bernd Kuhls <[email protected]>
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
lucaceresoli authored and yann-morin-1998 committed Apr 20, 2020
1 parent f1f0ed6 commit 153b78e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions package/exim/exim.mk
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,22 @@ endif

# We need the host version of macro_predef during the build, before
# building it we need to prepare the makefile.
# "The -j (parallel) flag must not be used with make"
# (http://www.exim.org/exim-html-current/doc/html/spec_html/ch04.html)
define EXIM_BUILD_CMDS
$(TARGET_MAKE_ENV) build=br $(MAKE1) -C $(@D) makefile
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D)/build-br macro_predef \
$(TARGET_MAKE_ENV) build=br $(MAKE) -C $(@D) makefile
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build-br macro_predef \
CC=$(HOSTCC) \
LNCC=$(HOSTCC) \
CFLAGS="-std=c99 $(HOST_CFLAGS)" \
LFLAGS="-fPIC $(HOST_LDFLAGS)"
$(TARGET_MAKE_ENV) build=br $(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) \
$(TARGET_MAKE_ENV) build=br $(MAKE) -C $(@D) $(EXIM_STATIC_FLAGS) \
CFLAGS="-std=c99 $(TARGET_CFLAGS)"
endef

# Need to replicate the LFLAGS in install, as exim still wants to build
# something when installing...
define EXIM_INSTALL_TARGET_CMDS
DESTDIR=$(TARGET_DIR) INSTALL_ARG="-no_chown -no_symlink" build=br \
$(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) \
$(MAKE) -C $(@D) $(EXIM_STATIC_FLAGS) \
CFLAGS="-std=c99 $(TARGET_CFLAGS)" \
install
chmod u+s $(TARGET_DIR)/usr/sbin/exim
Expand Down

0 comments on commit 153b78e

Please sign in to comment.