On 12.02.19 21:54, Iain Buclaw wrote: > On Tue, 12 Feb 2019 at 10:40, Richard Biener <richard.guent...@gmail.com> > wrote: >> >> On Sat, Feb 9, 2019 at 10:37 AM Iain Buclaw <ibuc...@gdcproject.org> wrote: >>> >>> On Mon, 28 Jan 2019 at 13:10, Richard Biener <richard.guent...@gmail.com> >>> wrote: >>>> >>>> On Mon, Jan 21, 2019 at 7:35 PM Iain Buclaw <ibuc...@gdcproject.org> wrote: >>>>> >>>>> Hi, >>>>> >>>>> Following on from the last, this adds target-zlib to target_libraries >>>>> and updates libphobos build scripts to link to libz_convenience.a. >>>>> The D front-end already has target-zlib in d/config-lang.in. >>>>> >>>>> Is the top-level part OK? I considered disabling target-zlib if >>>>> libphobos is not being built, but decided against unless it's >>>>> requested. >>>> >>>> Hmm, you overload --with-system-zlib to apply to both host and target >>>> (I guess it already applied to build), not sure if that's really desired? >>>> I suppose libphobos is the first target library linking against zlib? >>>> >>> >>> Originally, libgcj linked to zlib. >>> >>>> You are also falling back to in-tree zlib if --with-system-zlib was >>>> specified but no zlib was found - I guess for cross builds that >>>> will easily get not noticed... The toplevel --with-system-zlib makes >>>> it much harder and simply fails. >>>> >>> >>> OK, so keep --with-target-system-zlib to distinguish between the two? >> >> Yes, and fail if specificed but not found. >> > > Updated patch. Checked that it correctly fails when > --with-target-system-zlib and zlib missing.
For the GC enabled libobjc I added an --enable-objc-gc=auto to fall-back to the in-tree library when no system library is found. Could you do the same for zlib? There might be some multilib variants missing in distros. Matthias