d: Update __FreeBSD_version values [PR107469]

Message ID OP472vRO_13s3y8PI5nplVOCz6jhAMLTrsiRNglJYpsVepytiMkTHLMJAgzi83RBq0Lbv9VU0QNCuLNKiTUtVPJebd8pQPSAvXgzU7QL35k=@lorenzosalvadore.it
State New
Headers
Series d: Update __FreeBSD_version values [PR107469] |

Commit Message

Lorenzo Salvadore Nov. 10, 2022, 11:07 p.m. UTC
  Hello,

I would like to submit the patch below. Gerald Pfeifer already
volunteered to commit it once approved.

Thanks,

Lorenzo Salvadore

---

Update __FreeBSD_version values for the latest FreeBSD supported
versions. In particular, add __FreeBSD_version for FreeBSD 14, which is
necessary to compile libphobos successfully on FreeBSD 14.

The patch has already been applied successfully in the official FreeBSD
ports tree for the ports lang/gcc11 and lang/gcc11-devel. Please see the
following commits:

https://cgit.freebsd.org/ports/commit/?id=f61fb49b2e76fd4f7a5b7a11510b5109206c19f2
https://cgit.freebsd.org/ports/commit/?id=57936dba89ea208e5dbc1bd2d7fda3d29a1838b3

libphobos/ChangeLog:

2022-11-10  Lorenzo Salvadore  <developer@lorenzosalvadore.it>

	PR d/107469.
	* libdruntime/core/sys/freebsd/config.d: Update __FreeBSD_version.

---
 libphobos/libdruntime/core/sys/freebsd/config.d | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--
2.38.0
  

Comments

Lorenzo Salvadore Nov. 27, 2022, 8:23 a.m. UTC | #1
Hello,

Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605685.html

I would like to remind that Gerald Pfeifer already volunteered to commit this patch
when it is approved. However the patch has not been approved yet.

Thanks,

Lorenzo  Salvadore

------- Original Message -------
On Friday, November 11th, 2022 at 12:07 AM, Lorenzo Salvadore <developer@lorenzosalvadore.it> wrote:

> Update __FreeBSD_version values for the latest FreeBSD supported
> versions. In particular, add __FreeBSD_version for FreeBSD 14, which is
> necessary to compile libphobos successfully on FreeBSD 14.
> 
> The patch has already been applied successfully in the official FreeBSD
> ports tree for the ports lang/gcc11 and lang/gcc11-devel. Please see the
> following commits:
> 
> https://cgit.freebsd.org/ports/commit/?id=f61fb49b2e76fd4f7a5b7a11510b5109206c19f2
> https://cgit.freebsd.org/ports/commit/?id=57936dba89ea208e5dbc1bd2d7fda3d29a1838b3
> 
> libphobos/ChangeLog:
> 
> 2022-11-10 Lorenzo Salvadore developer@lorenzosalvadore.it
> 
> 
> PR d/107469.
> * libdruntime/core/sys/freebsd/config.d: Update __FreeBSD_version.
> 
> ---
> libphobos/libdruntime/core/sys/freebsd/config.d | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libphobos/libdruntime/core/sys/freebsd/config.d b/libphobos/libdruntime/core/sys/freebsd/config.d
> index 5e3129e2422..9d502e52e32 100644
> --- a/libphobos/libdruntime/core/sys/freebsd/config.d
> +++ b/libphobos/libdruntime/core/sys/freebsd/config.d
> @@ -14,8 +14,9 @@ public import core.sys.posix.config;
> // NOTE: When adding newer versions of FreeBSD, verify all current versioned
> // bindings are still compatible with the release.
> 
> - version (FreeBSD_13) enum __FreeBSD_version = 1300000;
> -else version (FreeBSD_12) enum __FreeBSD_version = 1202000;
> + version (FreeBSD_14) enum __FreeBSD_version = 1400000;
> +else version (FreeBSD_13) enum __FreeBSD_version = 1301000;
> +else version (FreeBSD_12) enum __FreeBSD_version = 1203000;
> else version (FreeBSD_11) enum __FreeBSD_version = 1104000;
> else version (FreeBSD_10) enum __FreeBSD_version = 1004000;
> else version (FreeBSD_9) enum __FreeBSD_version = 903000;
> --
> 2.38.0
  
Lorenzo Salvadore Dec. 14, 2022, 1:55 p.m. UTC | #2
Hello,

Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605685.html

I would like to remind that Gerald Pfeifer already volunteered to commit this patch
when it is approved. However the patch has not been approved yet.

Thanks,

Lorenzo Salvadore

> ------- Original Message -------
> On Friday, November 11th, 2022 at 12:07 AM, Lorenzo Salvadore developer@lorenzosalvadore.it wrote:
> 
> > Update __FreeBSD_version values for the latest FreeBSD supported
> > versions. In particular, add __FreeBSD_version for FreeBSD 14, which is
> > necessary to compile libphobos successfully on FreeBSD 14.
> > 
> > The patch has already been applied successfully in the official FreeBSD
> > ports tree for the ports lang/gcc11 and lang/gcc11-devel. Please see the
> > following commits:
> > 
> > https://cgit.freebsd.org/ports/commit/?id=f61fb49b2e76fd4f7a5b7a11510b5109206c19f2
> > https://cgit.freebsd.org/ports/commit/?id=57936dba89ea208e5dbc1bd2d7fda3d29a1838b3
> > 
> > libphobos/ChangeLog:
> > 
> > 2022-11-10 Lorenzo Salvadore developer@lorenzosalvadore.it
> > 
> > PR d/107469.
> > * libdruntime/core/sys/freebsd/config.d: Update __FreeBSD_version.
> > 
> > ---
> > libphobos/libdruntime/core/sys/freebsd/config.d | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libphobos/libdruntime/core/sys/freebsd/config.d b/libphobos/libdruntime/core/sys/freebsd/config.d
> > index 5e3129e2422..9d502e52e32 100644
> > --- a/libphobos/libdruntime/core/sys/freebsd/config.d
> > +++ b/libphobos/libdruntime/core/sys/freebsd/config.d
> > @@ -14,8 +14,9 @@ public import core.sys.posix.config;
> > // NOTE: When adding newer versions of FreeBSD, verify all current versioned
> > // bindings are still compatible with the release.
> > 
> > - version (FreeBSD_13) enum __FreeBSD_version = 1300000;
> > -else version (FreeBSD_12) enum __FreeBSD_version = 1202000;
> > + version (FreeBSD_14) enum __FreeBSD_version = 1400000;
> > +else version (FreeBSD_13) enum __FreeBSD_version = 1301000;
> > +else version (FreeBSD_12) enum __FreeBSD_version = 1203000;
> > else version (FreeBSD_11) enum __FreeBSD_version = 1104000;
> > else version (FreeBSD_10) enum __FreeBSD_version = 1004000;
> > else version (FreeBSD_9) enum __FreeBSD_version = 903000;
> > --
> > 2.38.0
  
Gerald Pfeifer Dec. 24, 2022, 12:10 a.m. UTC | #3
Hi Ian (and Andreas),

On Wed, 14 Dec 2022, Lorenzo Salvadore wrote:
> Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605685.html
> 
> I would like to remind that Gerald Pfeifer already volunteered to commit 
> this patch when it is approved. However the patch has not been approved 
> yet.

I am tempted to commit this under our obvious rule (and this has been part 
of the FreeBSD ports for weeks now). 

It still would be preferable to get your review (and approval ideally ;-), 
though. Would you mind having a look?

(Andreas, any take as GCC's FreeBSD maintainer?)

Thanks,
Gerald

>> ------- Original Message -------
>> On Friday, November 11th, 2022 at 12:07 AM, Lorenzo Salvadore developer@lorenzosalvadore.it wrote:
>> 
>>> Update __FreeBSD_version values for the latest FreeBSD supported
>>> versions. In particular, add __FreeBSD_version for FreeBSD 14, which is
>>> necessary to compile libphobos successfully on FreeBSD 14.
>>> 
>>> The patch has already been applied successfully in the official FreeBSD
>>> ports tree for the ports lang/gcc11 and lang/gcc11-devel. Please see the
>>> following commits:
>>> 
>>> https://cgit.freebsd.org/ports/commit/?id=f61fb49b2e76fd4f7a5b7a11510b5109206c19f2
>>> https://cgit.freebsd.org/ports/commit/?id=57936dba89ea208e5dbc1bd2d7fda3d29a1838b3
>>> 
>>> libphobos/ChangeLog:
>>> 
>>> 2022-11-10 Lorenzo Salvadore developer@lorenzosalvadore.it
>>> 
>>> PR d/107469.
>>> * libdruntime/core/sys/freebsd/config.d: Update __FreeBSD_version.
>>> 
>>> ---
>>> libphobos/libdruntime/core/sys/freebsd/config.d | 5 +++--
>>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/libphobos/libdruntime/core/sys/freebsd/config.d b/libphobos/libdruntime/core/sys/freebsd/config.d
>>> index 5e3129e2422..9d502e52e32 100644
>>> --- a/libphobos/libdruntime/core/sys/freebsd/config.d
>>> +++ b/libphobos/libdruntime/core/sys/freebsd/config.d
>>> @@ -14,8 +14,9 @@ public import core.sys.posix.config;
>>> // NOTE: When adding newer versions of FreeBSD, verify all current versioned
>>> // bindings are still compatible with the release.
>>> 
>>> - version (FreeBSD_13) enum __FreeBSD_version = 1300000;
>>> -else version (FreeBSD_12) enum __FreeBSD_version = 1202000;
>>> + version (FreeBSD_14) enum __FreeBSD_version = 1400000;
>>> +else version (FreeBSD_13) enum __FreeBSD_version = 1301000;
>>> +else version (FreeBSD_12) enum __FreeBSD_version = 1203000;
>>> else version (FreeBSD_11) enum __FreeBSD_version = 1104000;
>>> else version (FreeBSD_10) enum __FreeBSD_version = 1004000;
>>> else version (FreeBSD_9) enum __FreeBSD_version = 903000;
>>> --
>>> 2.38.0
  
Lorenzo Salvadore Jan. 10, 2023, 4:10 p.m. UTC | #4
Hello,

Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605685.html

I would like to remind that Gerald Pfeifer already volunteered to commit this patch
when it is approved. However the patch has not been approved yet.

Thanks,

Lorenzo Salvadore

> ------- Original Message -------
> On Friday, November 11th, 2022 at 12:07 AM, Lorenzo Salvadore developer@lorenzosalvadore.it wrote:
> 
> > Update __FreeBSD_version values for the latest FreeBSD supported
> > versions. In particular, add __FreeBSD_version for FreeBSD 14, which is
> > necessary to compile libphobos successfully on FreeBSD 14.
> > 
> > The patch has already been applied successfully in the official FreeBSD
> > ports tree for the ports lang/gcc11 and lang/gcc11-devel. Please see the
> > following commits:
> > 
> > https://cgit.freebsd.org/ports/commit/?id=f61fb49b2e76fd4f7a5b7a11510b5109206c19f2
> > https://cgit.freebsd.org/ports/commit/?id=57936dba89ea208e5dbc1bd2d7fda3d29a1838b3
> > 
> > libphobos/ChangeLog:
> > 
> > 2022-11-10 Lorenzo Salvadore developer@lorenzosalvadore.it
> > 
> > PR d/107469.
> > * libdruntime/core/sys/freebsd/config.d: Update __FreeBSD_version.
> > 
> > ---
> > libphobos/libdruntime/core/sys/freebsd/config.d | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libphobos/libdruntime/core/sys/freebsd/config.d b/libphobos/libdruntime/core/sys/freebsd/config.d
> > index 5e3129e2422..9d502e52e32 100644
> > --- a/libphobos/libdruntime/core/sys/freebsd/config.d
> > +++ b/libphobos/libdruntime/core/sys/freebsd/config.d
> > @@ -14,8 +14,9 @@ public import core.sys.posix.config;
> > // NOTE: When adding newer versions of FreeBSD, verify all current versioned
> > // bindings are still compatible with the release.
> > 
> > - version (FreeBSD_13) enum __FreeBSD_version = 1300000;
> > -else version (FreeBSD_12) enum __FreeBSD_version = 1202000;
> > + version (FreeBSD_14) enum __FreeBSD_version = 1400000;
> > +else version (FreeBSD_13) enum __FreeBSD_version = 1301000;
> > +else version (FreeBSD_12) enum __FreeBSD_version = 1203000;
> > else version (FreeBSD_11) enum __FreeBSD_version = 1104000;
> > else version (FreeBSD_10) enum __FreeBSD_version = 1004000;
> > else version (FreeBSD_9) enum __FreeBSD_version = 903000;
> > --
> > 2.38.0
  
Iain Buclaw Jan. 23, 2023, 2:45 p.m. UTC | #5
Excerpts from Lorenzo Salvadore's message of Januar 10, 2023 5:10 pm:
> Hello,
> 
> Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605685.html
> 
> I would like to remind that Gerald Pfeifer already volunteered to commit this patch
> when it is approved. However the patch has not been approved yet.
> 

Hi, sorry for belated reply.

Yes is fine for now, I'm concerned that it'll just be the same again
come FreeBSD 15, 16, 17...

There needs to be a better mechanism to determine which FreeBSD version
is being compiled for, but that shouldn't block this going in.

OK.
  
Lorenzo Salvadore Jan. 28, 2023, 8:48 a.m. UTC | #6
------- Original Message -------
On Monday, January 23rd, 2023 at 3:45 PM, Iain Buclaw <ibuclaw@gdcproject.org> wrote:


> 
> 
> Excerpts from Lorenzo Salvadore's message of Januar 10, 2023 5:10 pm:
> 
> > Hello,
> > 
> > Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605685.html
> > 
> > I would like to remind that Gerald Pfeifer already volunteered to commit this patch
> > when it is approved. However the patch has not been approved yet.
> 
> 
> Hi, sorry for belated reply.
> 
> Yes is fine for now, I'm concerned that it'll just be the same again
> come FreeBSD 15, 16, 17...
> 
> There needs to be a better mechanism to determine which FreeBSD version
> is being compiled for, but that shouldn't block this going in.
> 
> OK.

Thanks, I will keep this concern in mind when FreeBSD 15 starts its
development and then I will try to submit a patch proposing a better
mechanism.

Cheers,

Lorenzo Salvadore
  

Patch

diff --git a/libphobos/libdruntime/core/sys/freebsd/config.d b/libphobos/libdruntime/core/sys/freebsd/config.d
index 5e3129e2422..9d502e52e32 100644
--- a/libphobos/libdruntime/core/sys/freebsd/config.d
+++ b/libphobos/libdruntime/core/sys/freebsd/config.d
@@ -14,8 +14,9 @@  public import core.sys.posix.config;
 // NOTE: When adding newer versions of FreeBSD, verify all current versioned
 // bindings are still compatible with the release.

-     version (FreeBSD_13) enum __FreeBSD_version = 1300000;
-else version (FreeBSD_12) enum __FreeBSD_version = 1202000;
+     version (FreeBSD_14) enum __FreeBSD_version = 1400000;
+else version (FreeBSD_13) enum __FreeBSD_version = 1301000;
+else version (FreeBSD_12) enum __FreeBSD_version = 1203000;
 else version (FreeBSD_11) enum __FreeBSD_version = 1104000;
 else version (FreeBSD_10) enum __FreeBSD_version = 1004000;
 else version (FreeBSD_9)  enum __FreeBSD_version = 903000;