Re: [PATCH 1/1] trace: build with c++17 if building against llvm 16+

2023-11-12 Thread Chris Johns
On 10/11/2023 7:27 pm, Sebastian Huber wrote:
> On 25.09.23 11:25, Sebastian Huber wrote:
>> On 25.09.23 08:45, Chris Johns wrote:
>>> On 22/9/2023 2:47 pm, Sebastian Huber wrote:
 On 22.09.23 04:36, Joel Sherrill wrote:
> Are we doing something that particularly requires C++17? AFAIK we haven't
> needed it yet and why wouldn't it also be needed with gcc? If the default 
> on
> recent gcc versions is that, ok but we should be precise in case an older 
> gcc
> with a different default is used.
 The problem is not that we use features of a particular standard. It is 
 that
 LLVM requires a particular standard for the header files it ships and that
 we use.

 I already fixed this some time ago:

 https://lists.rtems.org/pipermail/devel/2023-May/075269.html

 However, Chris didn't like the change.
>>> The issue was not specially about that change but the tested hosts. I am 
>>> fine if
>>> the referenced change builds on a recent MacOS and FreeBSD 13. I am still 
>>> none
>>> the wiser?
>>
>> Ok, lets wait until the RTEMS Project has the appropriate CI runners to do 
>> this.
> 
> The next RTEMS user hit this problem which I fixed May this year:
> 
> http://devel.rtems.org/ticket/4965
> 

Any test results? I am sorry but I have not had time to check.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/1] trace: build with c++17 if building against llvm 16+

2023-11-10 Thread Sebastian Huber

On 25.09.23 11:25, Sebastian Huber wrote:

On 25.09.23 08:45, Chris Johns wrote:

On 22/9/2023 2:47 pm, Sebastian Huber wrote:

On 22.09.23 04:36, Joel Sherrill wrote:
Are we doing something that particularly requires C++17? AFAIK we 
haven't
needed it yet and why wouldn't it also be needed with gcc? If the 
default on
recent gcc versions is that, ok but we should be precise in case an 
older gcc

with a different default is used.
The problem is not that we use features of a particular standard. It 
is that
LLVM requires a particular standard for the header files it ships and 
that we use.


I already fixed this some time ago:

https://lists.rtems.org/pipermail/devel/2023-May/075269.html

However, Chris didn't like the change.
The issue was not specially about that change but the tested hosts. I 
am fine if
the referenced change builds on a recent MacOS and FreeBSD 13. I am 
still none

the wiser?


Ok, lets wait until the RTEMS Project has the appropriate CI runners to 
do this.


The next RTEMS user hit this problem which I fixed May this year:

http://devel.rtems.org/ticket/4965

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 1/1] trace: build with c++17 if building against llvm 16+

2023-09-25 Thread Sebastian Huber

On 25.09.23 08:45, Chris Johns wrote:

On 22/9/2023 2:47 pm, Sebastian Huber wrote:

On 22.09.23 04:36, Joel Sherrill wrote:

Are we doing something that particularly requires C++17? AFAIK we haven't
needed it yet and why wouldn't it also be needed with gcc? If the default on
recent gcc versions is that, ok but we should be precise in case an older gcc
with a different default is used.

The problem is not that we use features of a particular standard. It is that
LLVM requires a particular standard for the header files it ships and that we 
use.

I already fixed this some time ago:

https://lists.rtems.org/pipermail/devel/2023-May/075269.html

However, Chris didn't like the change.

The issue was not specially about that change but the tested hosts. I am fine if
the referenced change builds on a recent MacOS and FreeBSD 13. I am still none
the wiser?


Ok, lets wait until the RTEMS Project has the appropriate CI runners to 
do this.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 1/1] trace: build with c++17 if building against llvm 16+

2023-09-25 Thread Chris Johns
On 22/9/2023 2:47 pm, Sebastian Huber wrote:
> On 22.09.23 04:36, Joel Sherrill wrote:
>> Are we doing something that particularly requires C++17? AFAIK we haven't
>> needed it yet and why wouldn't it also be needed with gcc? If the default on
>> recent gcc versions is that, ok but we should be precise in case an older gcc
>> with a different default is used.
> 
> The problem is not that we use features of a particular standard. It is that
> LLVM requires a particular standard for the header files it ships and that we 
> use.
> 
> I already fixed this some time ago:
> 
> https://lists.rtems.org/pipermail/devel/2023-May/075269.html
> 
> However, Chris didn't like the change.

The issue was not specially about that change but the tested hosts. I am fine if
the referenced change builds on a recent MacOS and FreeBSD 13. I am still none
the wiser?

Chria
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/1] trace: build with c++17 if building against llvm 16+

2023-09-21 Thread Sebastian Huber

On 22.09.23 04:36, Joel Sherrill wrote:
Are we doing something that particularly requires C++17? AFAIK we 
haven't needed it yet and why wouldn't it also be needed with gcc? If 
the default on recent gcc versions is that, ok but we should be precise 
in case an older gcc with a different default is used.


The problem is not that we use features of a particular standard. It is 
that LLVM requires a particular standard for the header files it ships 
and that we use.


I already fixed this some time ago:

https://lists.rtems.org/pipermail/devel/2023-May/075269.html

However, Chris didn't like the change.

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 1/1] trace: build with c++17 if building against llvm 16+

2023-09-21 Thread Joel Sherrill
Are we doing something that particularly requires C++17? AFAIK we haven't
needed it yet and why wouldn't it also be needed with gcc? If the default
on recent gcc versions is that, ok but we should be precise in case an
older gcc with a different default is used.

This may also eliminate some hoats.

Just asking configuration management type questions.

--jorl

On Thu, Sep 21, 2023, 8:31 PM JJL772  wrote:

> ---
>  trace/wscript | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/trace/wscript b/trace/wscript
> index a3dd5d5..0ae90f8 100644
> --- a/trace/wscript
> +++ b/trace/wscript
> @@ -33,11 +33,14 @@ def options(opt):
>  def configure(conf):
>  conf.load('compiler_c')
>  conf.load('compiler_cxx')
> +needs_cxx17 = False
>  try:
>  cppflags = conf.cmd_and_log(['llvm-config', '--cppflags'])
>  ldflags = conf.cmd_and_log(['llvm-config', '--ldflags'])
>  conf.env.append_value('CPPFLAGS', cppflags.split())
>  conf.env.append_value('LDFLAGS', ldflags.split())
> +# llvm 16+ requires C++17 to build
> +needs_cxx17 = int(conf.cmd_and_log(['llvm-config',
> '--version']).split()[0]) >= 16
>  except:
>  pass
>  if conf.check_cxx(lib = 'LLVM', mandatory=False):
> @@ -46,6 +49,7 @@ def configure(conf):
>  conf.check_cxx(lib = 'z')
>  conf.check_cxx(lib = 'ws2_32', mandatory=False)
>  conf.check_cxx(cxxflags='-std=c++14', mandatory=False,
> define_name="HAVE_STD_CXX14")
> +conf.check_cxx(cxxflags='-std=c++17', mandatory=needs_cxx17,
> define_name="HAVE_STD_CXX17")
>  conf.write_config_header('config.h')
>
>  def build(bld):
> @@ -63,7 +67,9 @@ def build(bld):
>  cstd = '-std=c99'
>  conf['cflags'] = [cstd] + ['-pipe', '-g'] + conf['optflags']
>  cxxstd = '-std=c++11'
> -if bld.env.HAVE_STD_CXX14:
> +if bld.env.HAVE_STD_CXX17:
> +cxxstd = '-std=c++17'
> +elif bld.env.HAVE_STD_CXX14:
>  cxxstd = '-std=c++14'
>  conf['cxxflags'] = [cxxstd] + ['-pipe', '-g'] + conf['optflags']
>  conf['linkflags'] = ['-g']
> --
> 2.40.1
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 1/1] trace: build with c++17 if building against llvm 16+

2023-09-21 Thread JJL772
---
 trace/wscript | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/trace/wscript b/trace/wscript
index a3dd5d5..0ae90f8 100644
--- a/trace/wscript
+++ b/trace/wscript
@@ -33,11 +33,14 @@ def options(opt):
 def configure(conf):
 conf.load('compiler_c')
 conf.load('compiler_cxx')
+needs_cxx17 = False
 try:
 cppflags = conf.cmd_and_log(['llvm-config', '--cppflags'])
 ldflags = conf.cmd_and_log(['llvm-config', '--ldflags'])
 conf.env.append_value('CPPFLAGS', cppflags.split())
 conf.env.append_value('LDFLAGS', ldflags.split())
+# llvm 16+ requires C++17 to build
+needs_cxx17 = int(conf.cmd_and_log(['llvm-config', 
'--version']).split()[0]) >= 16
 except:
 pass
 if conf.check_cxx(lib = 'LLVM', mandatory=False):
@@ -46,6 +49,7 @@ def configure(conf):
 conf.check_cxx(lib = 'z')
 conf.check_cxx(lib = 'ws2_32', mandatory=False)
 conf.check_cxx(cxxflags='-std=c++14', mandatory=False, 
define_name="HAVE_STD_CXX14")
+conf.check_cxx(cxxflags='-std=c++17', mandatory=needs_cxx17, 
define_name="HAVE_STD_CXX17")
 conf.write_config_header('config.h')
 
 def build(bld):
@@ -63,7 +67,9 @@ def build(bld):
 cstd = '-std=c99'
 conf['cflags'] = [cstd] + ['-pipe', '-g'] + conf['optflags']
 cxxstd = '-std=c++11'
-if bld.env.HAVE_STD_CXX14:
+if bld.env.HAVE_STD_CXX17:
+cxxstd = '-std=c++17'
+elif bld.env.HAVE_STD_CXX14:
 cxxstd = '-std=c++14'
 conf['cxxflags'] = [cxxstd] + ['-pipe', '-g'] + conf['optflags']
 conf['linkflags'] = ['-g']
-- 
2.40.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel