* [dpdk-dev] [PATCH] build: explicitly enable SSE4 for x86 meson builds
@ 2019-12-17 14:08 Bruce Richardson
2019-12-23 10:38 ` [dpdk-dev] [PATCH v2] build: explicitly enable sse4 for " Bruce Richardson
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2019-12-17 14:08 UTC (permalink / raw)
To: david.marchand; +Cc: dev, Bruce Richardson
If the compiler does not recognise the specific CPU when building with the
default "native" machine type, SSE4.2 instructions can be missing, causing
a build error. Rather than advising the user to change the machine type,
we can just turn on SSE4.2 directly. This can prevent issues with running
automated tests with older compilers/distros on newer hardware.
Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
config/x86/meson.build | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/config/x86/meson.build b/config/x86/meson.build
index 8b0fa3e6f..0d60204a5 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -15,11 +15,9 @@ if not is_windows
endif
# we require SSE4.2 for DPDK
-sse_errormsg = '''SSE4.2 instruction set is required for DPDK.
-Please set the machine type to "nehalem" or "corei7" or higher value'''
-
if cc.get_define('__SSE4_2__', args: machine_args) == ''
- error(sse_errormsg)
+ message('SSE 4.2 not enabled by default, explicitly enabling')
+ machine_args += -msse4
endif
base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
--
2.23.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] build: explicitly enable sse4 for meson builds
2019-12-17 14:08 [dpdk-dev] [PATCH] build: explicitly enable SSE4 for x86 meson builds Bruce Richardson
@ 2019-12-23 10:38 ` Bruce Richardson
2020-01-03 13:55 ` Bruce Richardson
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2019-12-23 10:38 UTC (permalink / raw)
To: david.marchand; +Cc: dev, Bruce Richardson
If the compiler does not recognise the specific CPU when building with the
default "native" machine type, sse4.2 instructions can be missing, causing
a build error. Rather than advising the user to change the machine type,
we can just turn on SSE4.2 directly. This can prevent issues with running
automated tests with older compilers/distros on newer hardware.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
V2: insert missing quotes around "-msse4"
---
config/x86/meson.build | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/config/x86/meson.build b/config/x86/meson.build
index 8b0fa3e6f..adc857ba2 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -15,11 +15,9 @@ if not is_windows
endif
# we require SSE4.2 for DPDK
-sse_errormsg = '''SSE4.2 instruction set is required for DPDK.
-Please set the machine type to "nehalem" or "corei7" or higher value'''
-
if cc.get_define('__SSE4_2__', args: machine_args) == ''
- error(sse_errormsg)
+ message('SSE 4.2 not enabled by default, explicitly enabling')
+ machine_args += '-msse4'
endif
base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
--
2.24.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] build: explicitly enable sse4 for meson builds
2019-12-23 10:38 ` [dpdk-dev] [PATCH v2] build: explicitly enable sse4 for " Bruce Richardson
@ 2020-01-03 13:55 ` Bruce Richardson
2020-01-03 14:52 ` David Marchand
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2020-01-03 13:55 UTC (permalink / raw)
To: david.marchand; +Cc: dev, stable
+stable
This patch is probably worthwhile taking into 19.11 and 18.11 branches to
reduce chances of failures on CI of stable trees.
On Mon, Dec 23, 2019 at 10:38:40AM +0000, Bruce Richardson wrote:
> If the compiler does not recognise the specific CPU when building with the
> default "native" machine type, sse4.2 instructions can be missing, causing
> a build error. Rather than advising the user to change the machine type,
> we can just turn on SSE4.2 directly. This can prevent issues with running
> automated tests with older compilers/distros on newer hardware.
>
Cc: stable@dpdk.org
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> V2: insert missing quotes around "-msse4"
> ---
> config/x86/meson.build | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/config/x86/meson.build b/config/x86/meson.build
> index 8b0fa3e6f..adc857ba2 100644
> --- a/config/x86/meson.build
> +++ b/config/x86/meson.build
> @@ -15,11 +15,9 @@ if not is_windows
> endif
>
> # we require SSE4.2 for DPDK
> -sse_errormsg = '''SSE4.2 instruction set is required for DPDK.
> -Please set the machine type to "nehalem" or "corei7" or higher value'''
> -
> if cc.get_define('__SSE4_2__', args: machine_args) == ''
> - error(sse_errormsg)
> + message('SSE 4.2 not enabled by default, explicitly enabling')
> + machine_args += '-msse4'
> endif
>
> base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
> --
> 2.24.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] build: explicitly enable sse4 for meson builds
2020-01-03 13:55 ` Bruce Richardson
@ 2020-01-03 14:52 ` David Marchand
0 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2020-01-03 14:52 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, dpdk stable
On Fri, Jan 3, 2020 at 2:55 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> +stable
>
> This patch is probably worthwhile taking into 19.11 and 18.11 branches to
> reduce chances of failures on CI of stable trees.
+1
>
> On Mon, Dec 23, 2019 at 10:38:40AM +0000, Bruce Richardson wrote:
> > If the compiler does not recognise the specific CPU when building with the
> > default "native" machine type, sse4.2 instructions can be missing, causing
> > a build error. Rather than advising the user to change the machine type,
> > we can just turn on SSE4.2 directly. This can prevent issues with running
> > automated tests with older compilers/distros on newer hardware.
> >
> Cc: stable@dpdk.org
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
--
David Marchand
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-03 14:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 14:08 [dpdk-dev] [PATCH] build: explicitly enable SSE4 for x86 meson builds Bruce Richardson
2019-12-23 10:38 ` [dpdk-dev] [PATCH v2] build: explicitly enable sse4 for " Bruce Richardson
2020-01-03 13:55 ` Bruce Richardson
2020-01-03 14:52 ` David Marchand
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).