diff mbox

[PATCHv2,3/3] dpdk: make use of variable --with-external-sysroot

Message ID 1406277401-28679-4-git-send-email-anders.roxell@linaro.org
State New
Headers show

Commit Message

Anders Roxell July 25, 2014, 8:36 a.m. UTC
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 platform/linux-dpdk/Makefile.am | 12 +++++++++++-
 platform/linux-dpdk/README      |  5 +++--
 2 files changed, 14 insertions(+), 3 deletions(-)

Comments

Maxim Uvarov July 28, 2014, 7:19 a.m. UTC | #1
On 07/25/2014 12:36 PM, Anders Roxell wrote:
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>   platform/linux-dpdk/Makefile.am | 12 +++++++++++-
>   platform/linux-dpdk/README      |  5 +++--
>   2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
> index b80bf14..4e51f17 100644
> --- a/platform/linux-dpdk/Makefile.am
> +++ b/platform/linux-dpdk/Makefile.am
> @@ -8,7 +8,17 @@ nodist_pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp.pc
>   
>   .PHONY: pkgconfig/libodp.pc
>   
> -PLAT_CFLAGS = -msse4.2
> +PLAT_CFLAGS  = -msse4.2
> +if SYSROOT_PATH_
> +PLAT_CFLAGS += -include $(SYSROOT_PATH)/include/rte_config.h
> +PLAT_CFLAGS += -I$(SYSROOT_PATH)/include
> +PLAT_CFLAGS += -I$(SYSROOT_PATH)/include/arch
> +PLAT_CFLAGS += -I$(SYSROOT_PATH)/include/exec-env
> +
> +AM_LDFLAGS  += -L$(SYSROOT_PATH)/lib
> +else
> +PLAT_CFLAGS += -include rte_config.h
> +endif
>   
>   AM_CFLAGS +=  $(PLAT_CFLAGS)
>   AM_CFLAGS +=  -I$(srcdir)/include
> diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
> index 04a49d9..f2ac6df 100644
> --- a/platform/linux-dpdk/README
> +++ b/platform/linux-dpdk/README
> @@ -19,9 +19,10 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
>   # To compile ODP with linux-dpdk
>   $ cd <odp-dir>
>   $ sudo ./bootstrap
> -$ sudo ./configure --with-platform=linux-dpdk LDFLAGS=-L<dpdk-build-dir>/lib CFLAGS="-include <dpdk-build-dir>/include/rte_config.h -I<dpdk-build-dir>/include -I<dpdk-build-dir>/include/arch -I<dpdk-build-dir>/include/exec-env"
> +$ sudo ./configure --with-platform=linux-dpdk --with-sysroot-path=<dpdk-install-path>
>   # For example
> -$ sudo ./configure --with-platform=linux-dpdk LDFLAGS=-L/root/dpdk/build/lib CFLAGS="-include /root/dpdk/build/include/rte_config.h -I/root/dpdk/build/include -I/root/dpdk/build/include/arch -I/root/dpdk/build/include/exec-env"
> +$ sudo ./configure --with-platform=linux-dpdk --with-sysroot-path=/root/dpdk/build
in previous patchset you removed sudo, here is sudo again. Please remove it.

Maxim.
> +# if dpdk is installed to the default path then you don't need to specify --with-sysroot-path=<dpdk-install-path> when you run configure.
>   $ sudo make clean
>   $ sudo make
>
Anders Roxell July 28, 2014, 1:24 p.m. UTC | #2
On 2014-07-28 11:19, Maxim Uvarov wrote:
> On 07/25/2014 12:36 PM, Anders Roxell wrote:
> >Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> >---
> >  platform/linux-dpdk/Makefile.am | 12 +++++++++++-
> >  platform/linux-dpdk/README      |  5 +++--
> >  2 files changed, 14 insertions(+), 3 deletions(-)
> >
> >diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
> >index b80bf14..4e51f17 100644
> >--- a/platform/linux-dpdk/Makefile.am
> >+++ b/platform/linux-dpdk/Makefile.am
> >@@ -8,7 +8,17 @@ nodist_pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp.pc
> >  .PHONY: pkgconfig/libodp.pc
> >-PLAT_CFLAGS = -msse4.2
> >+PLAT_CFLAGS  = -msse4.2
> >+if SYSROOT_PATH_
> >+PLAT_CFLAGS += -include $(SYSROOT_PATH)/include/rte_config.h
> >+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include
> >+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include/arch
> >+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include/exec-env
> >+
> >+AM_LDFLAGS  += -L$(SYSROOT_PATH)/lib
> >+else
> >+PLAT_CFLAGS += -include rte_config.h
> >+endif
> >  AM_CFLAGS +=  $(PLAT_CFLAGS)
> >  AM_CFLAGS +=  -I$(srcdir)/include
> >diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
> >index 04a49d9..f2ac6df 100644
> >--- a/platform/linux-dpdk/README
> >+++ b/platform/linux-dpdk/README
> >@@ -19,9 +19,10 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2
> >  # To compile ODP with linux-dpdk
> >  $ cd <odp-dir>
> >  $ sudo ./bootstrap
> >-$ sudo ./configure --with-platform=linux-dpdk LDFLAGS=-L<dpdk-build-dir>/lib CFLAGS="-include <dpdk-build-dir>/include/rte_config.h -I<dpdk-build-dir>/include -I<dpdk-build-dir>/include/arch -I<dpdk-build-dir>/include/exec-env"
> >+$ sudo ./configure --with-platform=linux-dpdk --with-sysroot-path=<dpdk-install-path>
> >  # For example
> >-$ sudo ./configure --with-platform=linux-dpdk LDFLAGS=-L/root/dpdk/build/lib CFLAGS="-include /root/dpdk/build/include/rte_config.h -I/root/dpdk/build/include -I/root/dpdk/build/include/arch -I/root/dpdk/build/include/exec-env"
> >+$ sudo ./configure --with-platform=linux-dpdk --with-sysroot-path=/root/dpdk/build
> in previous patchset you removed sudo, here is sudo again. Please remove it.

Urgh... I'm sorry!

Sending out new version.

> 
> Maxim.
> >+# if dpdk is installed to the default path then you don't need to specify --with-sysroot-path=<dpdk-install-path> when you run configure.
> >  $ sudo make clean
> >  $ sudo make
> 
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index b80bf14..4e51f17 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -8,7 +8,17 @@  nodist_pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp.pc
 
 .PHONY: pkgconfig/libodp.pc
 
-PLAT_CFLAGS = -msse4.2
+PLAT_CFLAGS  = -msse4.2
+if SYSROOT_PATH_
+PLAT_CFLAGS += -include $(SYSROOT_PATH)/include/rte_config.h
+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include
+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include/arch
+PLAT_CFLAGS += -I$(SYSROOT_PATH)/include/exec-env
+
+AM_LDFLAGS  += -L$(SYSROOT_PATH)/lib
+else
+PLAT_CFLAGS += -include rte_config.h
+endif
 
 AM_CFLAGS +=  $(PLAT_CFLAGS)
 AM_CFLAGS +=  -I$(srcdir)/include
diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README
index 04a49d9..f2ac6df 100644
--- a/platform/linux-dpdk/README
+++ b/platform/linux-dpdk/README
@@ -19,9 +19,10 @@  $ git checkout -b 1.6.0 tags/v1.6.0r2
 # To compile ODP with linux-dpdk
 $ cd <odp-dir>
 $ sudo ./bootstrap
-$ sudo ./configure --with-platform=linux-dpdk LDFLAGS=-L<dpdk-build-dir>/lib CFLAGS="-include <dpdk-build-dir>/include/rte_config.h -I<dpdk-build-dir>/include -I<dpdk-build-dir>/include/arch -I<dpdk-build-dir>/include/exec-env"
+$ sudo ./configure --with-platform=linux-dpdk --with-sysroot-path=<dpdk-install-path>
 # For example
-$ sudo ./configure --with-platform=linux-dpdk LDFLAGS=-L/root/dpdk/build/lib CFLAGS="-include /root/dpdk/build/include/rte_config.h -I/root/dpdk/build/include -I/root/dpdk/build/include/arch -I/root/dpdk/build/include/exec-env"
+$ sudo ./configure --with-platform=linux-dpdk --with-sysroot-path=/root/dpdk/build
+# if dpdk is installed to the default path then you don't need to specify --with-sysroot-path=<dpdk-install-path> when you run configure.
 $ sudo make clean
 $ sudo make