pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc/devel
On Thu, 2020-01-23 at 15:52 +0000, nia wrote:
> On Thu, Jan 23, 2020 at 10:25:45AM -0500, David H. Gutteridge wrote:
> > Linux.mk needs adjustments if it's really going to be used to
> > provide
> > that variable. (There's more than one way to do it, but that perhaps
> > up a can of worms...)
>
> Perhaps this would work for now? Can you test it?
>
> Index: platform/Linux.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/platform/Linux.mk,v
> retrieving revision 1.80
> diff -u -r1.80 Linux.mk
> --- platform/Linux.mk 24 Jan 2019 18:40:56 -0000 1.80
> +++ platform/Linux.mk 23 Jan 2020 15:50:42 -0000
> @@ -167,12 +167,17 @@
> CWRAPPERS_APPEND.ld+= -m elf_i386
> .endif
>
> +_GLIBC_PATHS+= /lib${LIBABISUFFIX}/libc.so.6
> +_GLIBC_PATHS+= /lib/${MACHINE_ARCH}-linux-gnu/libc.so.6
> +
> +.for _glibc_path in ${_GLIBC_PATHS}
> +. if exists(_glibc_path)
> ## Use _CMD so the command only gets run when needed!
> -.if exists(/lib${LIBABISUFFIX}/libc.so.6)
> -_GLIBC_VERSION_CMD= /lib${LIBABISUFFIX}/libc.so.6 --version | \
> +_GLIBC_VERSION_CMD= ${_glibc_path} --version | \
> sed -ne's/^GNU C.*version
> \(.*\),.*$$/\1/p'
> GLIBC_VERSION= ${_GLIBC_VERSION_CMD:sh}
> -.endif
> +. endif
> +.endfor
>
> # If this is defined pass it to the make process.
> .if defined(NOGCCERROR)
Hi Nia,
Yes, that worked for me in the same Debian test environment. The only
tweak was it needs:
. if exists(${_glibc_path})
I think it's quite reasonable to apply that for now, and wait to see if
we hit any edge cases later. (As for random packages "thinking" they
need glibc when they may not, that's another topic, anyway.)
Thanks,
Dave
Home |
Main Index |
Thread Index |
Old Index