On Fri, Dec 06, 2019 at 09:21:12AM +0000, Stuart Henderson wrote: > Date: Fri, 6 Dec 2019 09:21:12 +0000 > From: Stuart Henderson <s...@spacehopper.org> > To: Xiyue Deng <manp...@gmail.com> > Cc: Brian Callahan <call...@rpi.edu>, ports@openbsd.org > Subject: Re: Fails to build textproc/mupdf on mips64el/loongson > > On 2019/12/05 18:44, Xiyue Deng wrote: > > On Thu, Dec 05, 2019 at 11:09:57PM +0000, Stuart Henderson wrote: > > > Date: Thu, 5 Dec 2019 23:09:57 +0000 > > > From: Stuart Henderson <s...@spacehopper.org> > > > To: Brian Callahan <call...@rpi.edu> > > > Cc: Xiyue Deng <manp...@gmail.com>, ports@openbsd.org > > > Subject: Re: Fails to build textproc/mupdf on mips64el/loongson > > > > > > On 2019/12/05 18:00, Brian Callahan wrote: > > > > > > > > > > > > On 2019-12-05 5:55 PM, Stuart Henderson wrote: > > > > > On 2019/12/04 16:35, Xiyue Deng wrote: > > > > > > > # https://marc.info/?l=openbsd-ports&m=156448467232400&w=2 > > > > > > > # possible alignment issue? > > > > > > > -MODULES += gcc4 > > > > > > > +MODULES += gcc4 lang/clang > > > > > > > MODGCC4_ARCHS = armv7 > > > > > > > MODGCC4_LANGS = c > > > > > > > +MODCLANG_ARCHS = mips64 mips64el > > > > > > > +MODCLANG_LANGS = c > > > > > > Thanks for the updated patch. It's definitely clearner this way. > > > > > > > > > > > > As it's now using clang from ports, it needs to build lang/clang > > > > > > first > > > > > > which may take a few days on this loongson box. Will report back as > > > > > > soon as it's finished. > > > > > hmm, actually can you skip the MODULES/MODCLANG_* change above and see > > > > > if it works with base-gcc? I doubt it needs to build with a different > > > > > compiler, just use the different linker.. > > > > > > > > base-gcc doesn't support the -fuse-ld= option. What you're suggesting > > > > was > > > > already tried and unfortunately didn't work. > > > > > > Was it tried with the USE_LLD mechanism? If not, it's unlikely to have > > > been a valid test. > > > > > > USE_LLD is already aware that base-gcc doesn't support -fuse-ld. > > > > > > > The failed stage during building mupdf uses "cc" instead of the shim > > from ports, so if its cc is /usr/bin/cc then I guess it will use > > ld.bfd unconditionally? Correct me if I'm wrong. > > Why are you guessing when you can just try it? > > If you have not tested with USE_LLD=Yes then it was not a valid test. >
Agreed. So I gave it a try, and it looks like USE_LLD does change the default ld to ld.lld. But it failed with a different error when used with /usr/bin/gcc saying that some of the libraries it tried to link is not found (e.g. -lm, -lz, etc.) I've attached the build log.
mupdf.log.gz
Description: application/gunzip
signature.asc
Description: PGP signature