On 2018/09/10 18:11, Christian Weisgerber wrote: > Stuart Henderson: > > > arch-defines seems the right place - it might be helpful to add the > > "-m" in ${LLD_EMUL} so that it can be used directly in command lines, > > rather than have consumers check whether it's non-empty and add "-m" > > themselves? > > Hmm, I guess we could do that. > That will require tweaking the arch-defines.mk diff, so that LLD_EMUL > is only defined on LLD_ARCHS. > > Meanwhile here's what I had ready:
Oh, those are complicated enough that adding the -m in LLD_EMUL doesn't help much then - I was hoping just adding to LDFLAGS would work - I'm happy to go with what you already have then. > Index: net/utox/Makefile > =================================================================== > RCS file: /cvs/ports/net/utox/Makefile,v > retrieving revision 1.4 > diff -u -p -r1.4 Makefile > --- net/utox/Makefile 9 Aug 2018 23:25:58 -0000 1.4 > +++ net/utox/Makefile 10 Sep 2018 16:04:13 -0000 > @@ -34,4 +34,10 @@ NO_TEST = yes > > WRKDIST = ${WRKDIR}/uTox > > +.include <bsd.port.arch.mk> > + > +.if ${PROPERTIES:Mlld} > +CONFIGURE_ARGS += -DLDEMU:String=-m${LLD_EMUL} > +.endif > + > .include <bsd.port.mk> > Index: net/utox/patches/patch-src_xlib_CMakeLists_txt > =================================================================== > RCS file: net/utox/patches/patch-src_xlib_CMakeLists_txt > diff -N net/utox/patches/patch-src_xlib_CMakeLists_txt > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ net/utox/patches/patch-src_xlib_CMakeLists_txt 10 Sep 2018 16:04:13 > -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +lld 6.0.0 needs an explicit -memulation > + > +Index: src/xlib/CMakeLists.txt > +--- src/xlib/CMakeLists.txt.orig > ++++ src/xlib/CMakeLists.txt > +@@ -13,7 +13,7 @@ endif() > + ## Native Icon data > + ######################################### > + add_custom_command(OUTPUT icon.o > +- COMMAND cd ${uTox_SOURCE_DIR}/ && ld -r -b binary -o > ${utoxNATIVE_BINARY_DIR}/icon.o icons/utox-128x128.png > ++ COMMAND cd ${uTox_SOURCE_DIR}/ && ld -r -b binary ${LDEMU} -o > ${utoxNATIVE_BINARY_DIR}/icon.o icons/utox-128x128.png > + DEPENDS ../../icons/utox-128x128.png ) > + set_source_files_properties( icon.o PROPERTIES EXTERNAL_OBJECT true > GENERATED true ) > + add_library(icon STATIC icon.o) > Index: www/mozplugger/Makefile > =================================================================== > RCS file: /cvs/ports/www/mozplugger/Makefile,v > retrieving revision 1.17 > diff -u -p -r1.17 Makefile > --- www/mozplugger/Makefile 4 Sep 2018 12:46:25 -0000 1.17 > +++ www/mozplugger/Makefile 10 Sep 2018 16:04:13 -0000 > @@ -24,6 +24,13 @@ CONFIGURE_STYLE = gnu dest > > FAKE_FLAGS = PLUGINDIRS=${WRKINST}${TRUEPREFIX}/lib/mozilla/plugins > > +.include <bsd.port.arch.mk> > + > +# lld 6.0.0 needs an explicit -memulation > +.if ${PROPERTIES:Mlld} > +MAKE_FLAGS += BIN2O='ld -r -b binary -m${LLD_EMUL}' > +.endif > + > post-install: > ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mozplugger > mv ${WRKINST}/etc/mozpluggerrc ${PREFIX}/share/examples/mozplugger > -- > Christian "naddy" Weisgerber na...@mips.inka.de >