On Mon, May 10, 2021 at 09:49:24PM +0200, Mark Kettenis wrote:
> > Date: Mon, 10 May 2021 14:22:33 -0400
> > From: George Koehler <kern...@gmail.com>
> > 
> > On Fri, 7 May 2021 10:31:55 +0200 (CEST)
> > Mark Kettenis <mark.kette...@xs4all.nl> wrote:
> > 
> > > Makes sense to me.  It seems ldd always seems to require a little bit
> > > more coercion to produce non-standard binaries.  We use linker scripts
> > > for the various EFI bootloaders as well.
> > > 
> > > ok kettenis@
> > 
> > My diff had an extra "pwd" in arch/macppc/stand/ofwboot/Makefile;
> > I deleted the "pwd" before committing it.
> > 
> > > > -${PROG}: ${OBJS} ${LIBSA} ${LIBZ}
> > > > -       ${LD} -nopie -znorelro -N -X -Ttext ${RELOC} -e ${ENTRY} -o 
> > > > ${PROG} \
> > > > +${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ld.script
> > > > +       pwd
> > > > +       ${LD} -nopie -znorelro -N -X -T ${.CURDIR}/ld.script -o ${PROG} 
> > > > \
> > > >             ${OBJS} ${LIBS}
> > 
> > >From my experiments with lld 10, I believe that macppc is almost ready
> > to switch from ld.bfd to ld.lld.  I know of 2 other problems:
> > 
> >   1.  ports/lang/gcc/8 needs USE_LLD = No, because lld 10 can't link
> >       C++ code from gcc.  (I have not yet checked lld 11.)  lld had no
> >       problem with Fortran ports built by gcc.
> > 
> >   2.  All instances of -Wl,-relax or -Wl,--relax in src or ports must
> >       be deleted, because it is an unknown option to lld, but lld can
> >       link large binaries without the option.
> 
> Maybe just coordinate with Theo and the ports folks and move ahead.


Index: gnu/usr.bin/clang/Makefile.inc
===================================================================
RCS file: /home/cvs/src/gnu/usr.bin/clang/Makefile.inc,v
retrieving revision 1.24
diff -u -p -u -p -r1.24 Makefile.inc
--- gnu/usr.bin/clang/Makefile.inc      19 May 2021 23:18:40 -0000      1.24
+++ gnu/usr.bin/clang/Makefile.inc      5 Jun 2021 03:40:20 -0000
@@ -77,7 +77,3 @@ DPADD+=       ${.OBJDIR}/../lib${lib}/lib${lib
 LDADD+=        ${.OBJDIR}/../lib${lib}/lib${lib}.a
 .endfor
 LDADD+=-Wl,--end-group
-
-.if ${MACHINE_ARCH} == "powerpc"
-LDADD+=-Wl,-relax
-.endif



Index: devel/clang-tools-extra/Makefile
===================================================================
RCS file: /home/cvs/ports/devel/clang-tools-extra/Makefile,v
retrieving revision 1.16
diff -u -p -u -p -r1.16 Makefile
--- devel/clang-tools-extra/Makefile    18 May 2021 06:19:48 -0000      1.16
+++ devel/clang-tools-extra/Makefile    5 Jun 2021 03:32:01 -0000
@@ -67,11 +67,6 @@ CONFIGURE_ARGS +=    -DCLANG_ENABLE_STATIC_
                        -DLLVM_INCLUDE_EXAMPLES=OFF \
                        -DLLVM_INCLUDE_TESTS=OFF
 
-.if ${MACHINE_ARCH} == "powerpc"
-CONFIGURE_ARGS +=      -DCMAKE_EXE_LINKER_FLAGS="-Wl,--relax"
-CONFIGURE_ARGS +=      -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--relax"
-.endif
-
 GCC_VER =              8.4.0
 .if ${MACHINE_ARCH} == "amd64"
 GCC_CONFIG =           x86_64-unknown-openbsd${OSREV}
Index: devel/llvm/Makefile
===================================================================
RCS file: /home/cvs/ports/devel/llvm/Makefile,v
retrieving revision 1.277
diff -u -p -u -p -r1.277 Makefile
--- devel/llvm/Makefile 22 May 2021 20:27:35 -0000      1.277
+++ devel/llvm/Makefile 5 Jun 2021 03:32:12 -0000
@@ -112,11 +112,6 @@ CXXFLAGS+= -mno-retpoline
 CXXFLAGS+=     -fomit-frame-pointer
 .endif
 
-.if ${MACHINE_ARCH} == "powerpc"
-CONFIGURE_ARGS +=      -DCMAKE_EXE_LINKER_FLAGS="-Wl,-relax"
-CONFIGURE_ARGS +=      -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-relax"
-.endif
-
 TEST_TARGET =          check check-clang
 
 # XXX sync
Index: games/godot/Makefile
===================================================================
RCS file: /home/cvs/ports/games/godot/Makefile,v
retrieving revision 1.18
diff -u -p -u -p -r1.18 Makefile
--- games/godot/Makefile        3 May 2021 19:10:24 -0000       1.18
+++ games/godot/Makefile        5 Jun 2021 03:32:32 -0000
@@ -76,11 +76,6 @@ LDFLAGS +=     -latomic
 WANTLIB +=     atomic
 .endif
 
-# Fix relocation overflows
-.if ${MACHINE_ARCH:Mpowerpc}
-LDFLAGS +=     -Wl,--relax
-.endif
-
 post-extract:
        cp -R ${FILESDIR}/sndio ${WRKDIST}/drivers
 
Index: games/scummvm/Makefile
===================================================================
RCS file: /home/cvs/ports/games/scummvm/Makefile,v
retrieving revision 1.88
diff -u -p -u -p -r1.88 Makefile
--- games/scummvm/Makefile      4 Jan 2021 17:43:02 -0000       1.88
+++ games/scummvm/Makefile      5 Jun 2021 03:32:48 -0000
@@ -40,11 +40,6 @@ LIB_DEPENDS= audio/fluidsynth \
 CXXFLAGS+=     -mxgot
 .endif
 
-# Fix relocation overflows
-.if ${MACHINE_ARCH} == "powerpc"
-LDFLAGS+=      -Wl,--relax
-.endif
-
 CONFIGURE_STYLE=simple
 CONFIGURE_ARGS+=--disable-alsa \
                --disable-cloud \
Index: lang/gcc/8/Makefile
===================================================================
RCS file: /home/cvs/ports/lang/gcc/8/Makefile,v
retrieving revision 1.41
diff -u -p -u -p -r1.41 Makefile
--- lang/gcc/8/Makefile 9 Feb 2021 02:12:43 -0000       1.41
+++ lang/gcc/8/Makefile 5 Jun 2021 03:31:15 -0000
@@ -9,7 +9,7 @@ ONLY_FOR_ARCHS-ada = amd64 hppa i386 mip
 # XXX workaround for "ld: error: cp-demangle.c:(.debug_info+0x30115): has
 # non-ABS relocation R_386_GOTOFF against symbol '.LC60'".
 # If fixing, re-check telephony/asterisk math/py-scipy which had same issue
-.if ${MACHINE_ARCH:Mi386}
+.if ${MACHINE_ARCH:Mi386} || ${MACHINE_ARCH:Mpowerpc}
 USE_LLD = No
 .endif
 
Index: net/wireshark/Makefile
===================================================================
RCS file: /home/cvs/ports/net/wireshark/Makefile,v
retrieving revision 1.122
diff -u -p -u -p -r1.122 Makefile
--- net/wireshark/Makefile      3 Jun 2021 10:51:05 -0000       1.122
+++ net/wireshark/Makefile      5 Jun 2021 03:33:36 -0000
@@ -121,10 +121,6 @@ MODULES += x11/qt5
 CONFIGURE_ARGS +=      -DBUILD_wireshark=false
 .endif
 
-.if ${MACHINE_ARCH:Mpowerpc}
-CONFIGURE_ENV += LDFLAGS="-Wl,--relax"
-.endif
-
 .if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
 CXXFLAGS +=    -mxgot
 .endif
Index: www/webkitgtk4/Makefile
===================================================================
RCS file: /home/cvs/ports/www/webkitgtk4/Makefile,v
retrieving revision 1.141
diff -u -p -u -p -r1.141 Makefile
--- www/webkitgtk4/Makefile     12 May 2021 06:35:27 -0000      1.141
+++ www/webkitgtk4/Makefile     5 Jun 2021 03:34:27 -0000
@@ -123,7 +123,6 @@ LDFLAGS +=          -Wl,--no-keep-memory
 .if ${MACHINE_ARCH} == "powerpc"
 # XXX fix colors being off, it would be nice to fix the code
 CONFIGURE_ARGS +=      -DUSE_OPENGL_OR_ES=OFF
-LDFLAGS +=             -Wl,--relax
 .endif
 
 post-extract:
Index: x11/qt5/Makefile.inc
===================================================================
RCS file: /home/cvs/ports/x11/qt5/Makefile.inc,v
retrieving revision 1.17
diff -u -p -u -p -r1.17 Makefile.inc
--- x11/qt5/Makefile.inc        19 Jan 2021 09:06:34 -0000      1.17
+++ x11/qt5/Makefile.inc        5 Jun 2021 03:35:01 -0000
@@ -84,10 +84,6 @@ CONFIGURE_ENV +=     MAKE=make \
                        MAKEFLAGS="-j ${MAKE_JOBS}" \
                        EXTRA_CPPFLAGS="-DLOCALBASE=\\\"${LOCALBASE}\\\" 
-DX11BASE=\\\"${X11BASE}\\\""
 
-.if ${MACHINE_ARCH} == "powerpc"
-CONFIGURE_ENV += LDFLAGS="-Wl,--relax"
-.endif
-
 # QtWebkit (at least, maybe others) plays dirty games with inter-target
 # dependencies, so we'd better use the target qmake always creates
 # first, named "first".

Reply via email to