Openembedded Core Discussions
 help / color / mirror / Atom feed
From: <Chong.Lu@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] ppp: Fix compilation errors in Makefile
Date: Tue, 5 Nov 2013 18:39:26 +0800	[thread overview]
Message-ID: <1383647966-9903-1-git-send-email-Chong.Lu@windriver.com> (raw)

From: Lu Chong <Chong.Lu@windriver.com>

This patch fixes below issues:

1. Make can't exit while compilation error occurs in subdir for plugins building.

2. If build ppp with newer kernel (3.10.10), it will pick 'if_pppox.h' from sysroot-dir and
   'if_pppol2tp.h' from its own source dir, this cause below build errors:

        bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:84:26:
        error: field 'pppol2tp' has incomplete type
          struct pppol2tpin6_addr pppol2tp;
                                  ^
        bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:99:28:
        error: field 'pppol2tp' has incomplete type
          struct pppol2tpv3in6_addr pppol2tp;
                                    ^

The 'sysroot-dir/if_pppox.h' enabled ipv6 support but the 'source-dir/if_pppol2tp.h' lost
related structure definitions, we should use both header files from sysroots to fix this
build failure.

Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
---
 ...01-ppp-Fix-compilation-errors-in-Makefile.patch |   75 ++++++++++++++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.5.bb         |    4 +-
 2 files changed, 78 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/ppp/ppp-2.4.5/0001-ppp-Fix-compilation-errors-in-Makefile.patch

diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/0001-ppp-Fix-compilation-errors-in-Makefile.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/0001-ppp-Fix-compilation-errors-in-Makefile.patch
new file mode 100644
index 0000000..8aa2d2e
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/0001-ppp-Fix-compilation-errors-in-Makefile.patch
@@ -0,0 +1,75 @@
+From ba0f6058d1f25b2b60fc31ab2656bf12a71ffdab Mon Sep 17 00:00:00 2001
+From: Lu Chong <Chong.Lu@windriver.com>
+Date: Tue, 5 Nov 2013 17:32:56 +0800
+Subject: [PATCH] ppp: Fix compilation errors in Makefile
+
+This patch fixes below issues:
+
+1. Make can't exit while compilation error occurs in subdir for plugins building.
+
+2. If build ppp with newer kernel (3.10.10), it will pick 'if_pppox.h' from sysroot-dir and
+   'if_pppol2tp.h' from its own source dir, this cause below build errors:
+
+        bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:84:26:
+        error: field 'pppol2tp' has incomplete type
+          struct pppol2tpin6_addr pppol2tp;
+                                  ^
+        bitbake_build/tmp/sysroots/intel-x86-64/usr/include/linux/if_pppox.h:99:28:
+        error: field 'pppol2tp' has incomplete type
+          struct pppol2tpv3in6_addr pppol2tp;
+                                    ^
+
+The 'sysroot-dir/if_pppox.h' enabled ipv6 support but the 'source-dir/if_pppol2tp.h' lost
+related structure definitions, we should use both header files from sysroots to fix this
+build failure.
+
+Upstream-Status: Pending
+
+Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
+---
+ pppd/plugins/Makefile.linux          |    2 +-
+ pppd/plugins/pppol2tp/Makefile.linux |    2 +-
+ pppd/plugins/rp-pppoe/Makefile.linux |    2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
+index 0a7ec7b..2a2c15a 100644
+--- a/pppd/plugins/Makefile.linux
++++ b/pppd/plugins/Makefile.linux
+@@ -20,7 +20,7 @@ include .depend
+ endif
+ 
+ all:	$(PLUGINS)
+-	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
++	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all || exit 1; done
+ 
+ %.so: %.c
+ 	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
+diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
+index 19eff67..feb2f52 100644
+--- a/pppd/plugins/pppol2tp/Makefile.linux
++++ b/pppd/plugins/pppol2tp/Makefile.linux
+@@ -1,6 +1,6 @@
+ #CC	= gcc
+ COPTS	= -O2 -g
+-CFLAGS	= $(COPTS) -I. -I../.. -I../../../include -fPIC
++CFLAGS	= $(COPTS) -I. -I../.. -fPIC
+ LDFLAGS	= -shared
+ INSTALL	= install
+ 
+diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
+index f078991..15b9118 100644
+--- a/pppd/plugins/rp-pppoe/Makefile.linux
++++ b/pppd/plugins/rp-pppoe/Makefile.linux
+@@ -26,7 +26,7 @@ INSTALL	= install
+ RP_VERSION=3.8p
+ 
+ COPTS=-O2 -g
+-CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
++CFLAGS=$(COPTS) '-DRP_VERSION="$(RP_VERSION)"'
+ all: rp-pppoe.so pppoe-discovery
+ 
+ pppoe-discovery: pppoe-discovery.o debug.o
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.5.bb b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
index 39354ef..f89e4b9 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
@@ -29,7 +29,9 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
            file://copts.patch \
            file://pap \
            file://ppp_on_boot \
-           file://provider "
+           file://provider \
+           file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
+"
 
 SRC_URI[md5sum] = "4621bc56167b6953ec4071043fe0ec57"
 SRC_URI[sha256sum] = "43317afec9299f9920b96f840414c977f0385410202d48e56d2fdb8230003505"
-- 
1.7.9.5



                 reply	other threads:[~2013-11-05 10:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383647966-9903-1-git-send-email-Chong.Lu@windriver.com \
    --to=chong.lu@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox