tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

compiler.mk nits



(retitled from a point question on pkgsrc-users, to a more general
compiler.mk thread)

First, I will observe that if you have a system that has gcc 7, and you
build packages that end up GCC_REQD=8 and some that end up GCC_REQD=10,
then probably you will think it would have been better if they all used
10.  At least I do.  I have in my local tree -- that I know is icky and
I am NOT proposing to commit -- this diff:

  diff -u -p -r1.267 gcc.mk
  --- compiler/gcc.mk     10 Nov 2023 11:52:27 -0000      1.267
  +++ compiler/gcc.mk     2 Jan 2024 23:46:38 -0000
  @@ -452,6 +452,7 @@ USE_PKGSRC_GCC_RUNTIME=     yes
   PKG_FAIL_REASON+=      "Package requires at least gcc 8 to build"
   .    endif
   _NEED_GCC8=    yes
  +_NEED_GCC10=   yes
   .  endif
   .endfor
   _NEED_GCC9?=   no
  @@ -465,6 +466,7 @@ USE_PKGSRC_GCC_RUNTIME=     yes
   PKG_FAIL_REASON+=      "Package requires at least gcc 9 to build"
   .    endif
   _NEED_GCC9=    yes
  +_NEED_GCC10=   yes
   .  endif
   .endfor
   _NEED_GCC10?=  no

to avoid this on NetBSD 9.


While improving a comment in gcc.mk, which explains that we tend to gcc
5/7/10 as shipped in NetBSD 8/9/10, I noticed:

  The base GCC_REQ is 3.0.0 if we need c99 or x86_64 and 2.8.0
  otherwise.

    - Probably this should be "if not i386" rather than "if x86_64".

    - I guess it's good for retrocomputing to not object if the base
      system is 2.8.0 and we are building a package that only needs c,
      on i386.  But maybe we should gc the if and just say 3.0.0.

    - I don't see that we require something for c++, which seems to mean
      c++03.  (I have no idea if gcc 2.8.0 can build c++03 -- but not c99??)

    - (The above argues that this if and setting is not getting used
      much.)

  We ask for 4.9 for c11, cxx:unique_ptr and cxx:regex.  This violates
  the general "align to releeas" rule.  I could see us doing one of the
  following:

    - change to 5 with a comment that 4.9 would work

    - add a comment that we are staying with 4.9 instead of the plan
      that says 5 because we don't want to burden systems with 4.9 that
      only need this

  Same for cxx:charconv which requires gcc 8.  Comment, change to 10
  with comment, something else?


Home | Main Index | Thread Index | Old Index