buildroot/package/exim/0001-Build-buildconfig-for-the-host.patch
Thomas Petazzoni b872d829d0 exim: do not link buildconfig with $(LIBS)
The existing patch 0001-Build-buildconfig-for-the-host.patch changes
the exim build system to use the host compiler to build the
"buildconfig" program instead of the cross-compiler.

However, it still uses $(LIBS) which lists the target libraries to
link with, which shouldn't be used. Since buildconfig doesn't use any
library beyond the C library, we can simply drop using $(LIBS).

This will fix build failures of exim on Fedora 28, where libnsl is no
longer provided by the C library, causing build failures such as:

/usr/bin/gcc buildconfig.c
/usr/bin/ld: cannot find -lnsl

Fixes:

  http://autobuild.buildroot.net/results/ac78fe18657558b3c12c03c08bf1081d7c06ca85/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-05-17 22:16:25 +02:00

24 lines
792 B
Diff

buildconfig is meant to be executed on the host, so it has to be compiled
using $(HOSTCC), not $(CC).
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
OS/Makefile-Base | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/OS/Makefile-Base b/OS/Makefile-Base
index 29a6ad3..420ba60 100644
--- a/OS/Makefile-Base
+++ b/OS/Makefile-Base
@@ -114,8 +114,8 @@ allexim: config.h $(EXIM_MONITOR) exicyclog exinext exiwhat \
# Targets for special-purpose configuration header builders
buildconfig: buildconfig.c
- @echo "$(CC) buildconfig.c"
- $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
+ @echo "$(HOSTCC) buildconfig.c"
+ $(FE)$(HOSTCC) $(HOSTCFLAGS) $(INCLUDE) -o buildconfig buildconfig.c
# Target for the exicyclog utility script