perl-cross: bump to version 1.1.4
[buildroot-gz.git] / package / lldpd / 0001-build-make-generation-of-atom-glue-compatible-with-o.patch
blobd5675d39af55340d339a563141d815115c9bba2a
1 From 106aa50d4e5b336f7dd2d5cf4d882e692d205e91 Mon Sep 17 00:00:00 2001
2 From: Vincent Bernat <vincent@bernat.im>
3 Date: Sat, 18 Jun 2016 22:18:41 +0200
4 Subject: [PATCH] build: make generation of atom-glue compatible with older gcc
5 versions
7 With old versions, cpp doesn't accept several files as input. See #186.
9 Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
10 ---
11 src/lib/Makefile.am | 8 +++++---
12 1 file changed, 5 insertions(+), 3 deletions(-)
14 diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
15 index 250e32a..2a5cdb3 100644
16 --- a/src/lib/Makefile.am
17 +++ b/src/lib/Makefile.am
18 @@ -20,8 +20,9 @@ nodist_liblldpctl_la_SOURCES = atom-glue.c
19 liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoint.la
21 atom-glue.c: $(ATOM_FILES) Makefile
22 - $(AM_V_GEN)($(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
23 - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ATOM_FILES:%=$(srcdir)/%) | \
24 + $(AM_V_GEN)(for f in $(ATOM_FILES:%=$(srcdir)/%); do \
25 + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
26 + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $$f; done | \
27 $(SED) -n 's+^void init_atom_builder_\([^(]*\)().*, \([0-9]*\)).*+\2 \1+p' | \
28 sort | \
29 $(AWK) '{ atoms[$$2] = 1 } \
30 @@ -30,8 +31,9 @@ atom-glue.c: $(ATOM_FILES) Makefile
31 print " static int init = 0; if (init) return; init++;"; \
32 for (atom in atoms) { print " init_atom_builder_"atom"();" } \
33 print "}"; }' && \
34 + for f in $(ATOM_FILES:%=$(srcdir)/%); do \
35 $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
36 - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ATOM_FILES:%=$(srcdir)/%) | \
37 + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $$f; done | \
38 $(SED) -n 's+^void init_atom_map_\([^(]*\)().*, \([0-9]*\)).*+\2 \1+p' | \
39 sort -n | \
40 $(AWK) '{ atoms[$$2] = 1 } \
41 --
42 2.9.0