patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/3] devtools/test-meson-builds: skip missing compilers
       [not found] <20190410205224.69977-1-bruce.richardson@intel.com>
@ 2019-04-10 20:52 ` Bruce Richardson
  2019-04-17 14:59   ` Thomas Monjalon
  2019-04-10 20:52 ` [dpdk-stable] [PATCH 2/3] devtools/test-meson-builds: support older compilers Bruce Richardson
  2019-04-10 20:52 ` [dpdk-stable] [PATCH 3/3] devtools/test-meson-builds: fix bash-isms Bruce Richardson
  2 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2019-04-10 20:52 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

if either gcc or clang are missing, skip doing those builds.
This allows a setup to only do, e.g. gcc tests.

CC: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index b3b5cfb..60e4168 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -54,10 +54,12 @@ fi
 
 # shared and static linked builds with gcc and clang
 for c in gcc clang ; do
-	for s in static shared ; do
-		export CC="ccache $c"
-		build build-$c-$s --default-library=$s
-	done
+	if command -v $c >/dev/null 2>&1 ; then
+		for s in static shared ; do
+			export CC="ccache $c"
+			build build-$c-$s --default-library=$s
+		done
+	fi
 done
 
 # test compilation with minimal x86 instruction set
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-stable] [PATCH 2/3] devtools/test-meson-builds: support older compilers
       [not found] <20190410205224.69977-1-bruce.richardson@intel.com>
  2019-04-10 20:52 ` [dpdk-stable] [PATCH 1/3] devtools/test-meson-builds: skip missing compilers Bruce Richardson
@ 2019-04-10 20:52 ` Bruce Richardson
  2019-04-10 20:52 ` [dpdk-stable] [PATCH 3/3] devtools/test-meson-builds: fix bash-isms Bruce Richardson
  2 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2019-04-10 20:52 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

Older versions of GCC, such as on Redhat/CentOS 7, don't support
-march=nehalem, but need -march=corei7 instead.

CC: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 60e4168..0b14030 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -63,7 +63,12 @@ for c in gcc clang ; do
 done
 
 # test compilation with minimal x86 instruction set
-build build-x86-default -Dmachine=nehalem $use_shared
+default_machine='nehalem'
+ok=$(cc -march=$default_machine -E - < /dev/null > /dev/null 2>&1 || echo false)
+if [ "$ok" = "false" ] ; then
+	default_machine='corei7'
+fi
+build build-x86-default -Dmachine=$default_machine $use_shared
 
 # enable cross compilation if gcc cross-compiler is found
 c=aarch64-linux-gnu-gcc
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-stable] [PATCH 3/3] devtools/test-meson-builds: fix bash-isms
       [not found] <20190410205224.69977-1-bruce.richardson@intel.com>
  2019-04-10 20:52 ` [dpdk-stable] [PATCH 1/3] devtools/test-meson-builds: skip missing compilers Bruce Richardson
  2019-04-10 20:52 ` [dpdk-stable] [PATCH 2/3] devtools/test-meson-builds: support older compilers Bruce Richardson
@ 2019-04-10 20:52 ` Bruce Richardson
  2 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2019-04-10 20:52 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

The use of "==" is non-standard extension from bash, so use "="
for comparisons instead.

CC: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 0b14030..17680f8 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -46,9 +46,9 @@ build () # <directory> <meson options>
 	fi
 }
 
-if [ "$1" == "-vv" ] ; then
+if [ "$1" = "-vv" ] ; then
 	TEST_MESON_BUILD_VERY_VERBOSE=1
-elif [ "$1" == "-v" ] ; then
+elif [ "$1" = "-v" ] ; then
 	TEST_MESON_BUILD_VERBOSE=1
 fi
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH 1/3] devtools/test-meson-builds: skip missing compilers
  2019-04-10 20:52 ` [dpdk-stable] [PATCH 1/3] devtools/test-meson-builds: skip missing compilers Bruce Richardson
@ 2019-04-17 14:59   ` Thomas Monjalon
  2019-04-17 15:04     ` Bruce Richardson
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2019-04-17 14:59 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: stable, dev

10/04/2019 22:52, Bruce Richardson:
> if either gcc or clang are missing, skip doing those builds.
> This allows a setup to only do, e.g. gcc tests.
> 
> CC: stable@dpdk.org
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
>  # shared and static linked builds with gcc and clang
>  for c in gcc clang ; do
> -	for s in static shared ; do
> -		export CC="ccache $c"
> -		build build-$c-$s --default-library=$s
> -	done
> +	if command -v $c >/dev/null 2>&1 ; then
> +		for s in static shared ; do
> +			export CC="ccache $c"
> +			build build-$c-$s --default-library=$s
> +		done
> +	fi

May I suggest this oneline change instead?

command -v $c >/dev/null 2>&1 || continue




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-stable] [PATCH 1/3] devtools/test-meson-builds: skip missing compilers
  2019-04-17 14:59   ` Thomas Monjalon
@ 2019-04-17 15:04     ` Bruce Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2019-04-17 15:04 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: stable, dev

On Wed, Apr 17, 2019 at 04:59:53PM +0200, Thomas Monjalon wrote:
> 10/04/2019 22:52, Bruce Richardson:
> > if either gcc or clang are missing, skip doing those builds.
> > This allows a setup to only do, e.g. gcc tests.
> > 
> > CC: stable@dpdk.org
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > --- a/devtools/test-meson-builds.sh
> > +++ b/devtools/test-meson-builds.sh
> >  # shared and static linked builds with gcc and clang
> >  for c in gcc clang ; do
> > -	for s in static shared ; do
> > -		export CC="ccache $c"
> > -		build build-$c-$s --default-library=$s
> > -	done
> > +	if command -v $c >/dev/null 2>&1 ; then
> > +		for s in static shared ; do
> > +			export CC="ccache $c"
> > +			build build-$c-$s --default-library=$s
> > +		done
> > +	fi
> 
> May I suggest this oneline change instead?
> 
> command -v $c >/dev/null 2>&1 || continue
> 
Looks fine to me. Make the change on apply if you like, otherwise let me
know if you want a V2.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-17 15:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190410205224.69977-1-bruce.richardson@intel.com>
2019-04-10 20:52 ` [dpdk-stable] [PATCH 1/3] devtools/test-meson-builds: skip missing compilers Bruce Richardson
2019-04-17 14:59   ` Thomas Monjalon
2019-04-17 15:04     ` Bruce Richardson
2019-04-10 20:52 ` [dpdk-stable] [PATCH 2/3] devtools/test-meson-builds: support older compilers Bruce Richardson
2019-04-10 20:52 ` [dpdk-stable] [PATCH 3/3] devtools/test-meson-builds: fix bash-isms Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).