tech-pkg archive

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

Removing obsolete gcc.mk section



There is a piece of code in mk/compiler/gcc.mk from around 10 years
ago which re-computes the location of pkgsrc gcc:

  .  if empty(_GCC_ARCHDIR:M*not_found*)
  .    if defined(MABIFLAG) && !empty(MABIFLAG)
  _GCC_PREFIX:=          ${_GCC_ARCHDIR:H:H:H:H:H}/
  _GCC_SUBPREFIX:=       ${_GCC_ARCHDIR:H:H:H:H:H:T}/
  .    else
  _GCC_PREFIX:=          ${_GCC_ARCHDIR:H:H:H:H}/
  _GCC_SUBPREFIX:=       ${_GCC_ARCHDIR:H:H:H:H:T}/
  .    endif
  .  endif

I'm struggling to understand why it was added in the first place,
given that it can only work if we already know where pkgsrc gcc is
located and we have successfully executed it with
-print-libgcc-file-name to compute _GCC_ARCHDIR.

It is mostly harmless, but does cause problems with multiarch
implementations of pkgsrc, as the hardcoded number of :H operations
can differ compared to the current $ABI setting, and I'm not convinced
they are accurate for every gcc installation so would like to
pre-emptively avoid any issues anyway.

I'd like to remove it completely, and cleanup the MABIFLAG variable
whilst there.  Diff to achieve that is here:

  http://us-east.manta.joyent.com/pkgsrc/public/patches/gcc-mk-cleanup.diff

As always I have pushed this through a full bulk build and there
appear to be no regressions caused.

Cheers,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index