tech-pkg archive

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

Re: Removing obsolete gcc.mk section



Am 28.08.2014 um 15:24 schrieb Jonathan Perkin <jperkin%joyent.com@localhost>:

> 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.

Looks to me as if AIX/HP-UX is missing as PowerPC (IIRC -m32/-m64 for gcc,
-X32/64 for ld, ar ...) and PA-RISC (-ilp32/-lp64 at least on HP-UX, no
clue for Linux on PA-RISC).

But that's missing in the original part anyway, so it can be added later
and saner than now.

/me votes for the commit

Cheers
-- 
Jens Rehsack
rehsack%gmail.com@localhost







Home | Main Index | Thread Index | Old Index