+--- gdal-2.4.0-ref/gdal/GNUmakefile 2022-01-10 21:48:46.000000000 +0100
++++ gdal-2.4.0-new/gdal/GNUmakefile 2022-03-31 18:23:13.203131414 +0200
+@@ -59,9 +59,18 @@
+ $(LD_SHARED) $(GDAL_SLIB_SONAME) $(GDAL_OBJ) $(GDAL_LIBS) $(LDFLAGS) $(LIBS) \
+ -o $(GDAL_SLIB)
+
++# split potentially long lines
++SORTED := $(sort $(wildcard $(GDAL_OBJ:.o=.lo)))
++NSORTED := $(words $(SORTED))
++# mid left and right indices
++MIDL := $(shell echo $$(( $(NSORTED) / 2 )) )
++MIDR := $(shell echo $$(( $(MIDL) + 1 )) )
++
+ $(LIBGDAL): $(GDAL_OBJ:.o=.lo)
+- $(LD) $(LDFLAGS) $(LIBS) -o $@ $(sort $(wildcard $(GDAL_OBJ:.o=.lo))) \
+- -rpath $(INST_LIB) \
++ $(LD) $(LDFLAGS) $(LIBS) -o $@ \
++ $(wordlist 1,$(MIDL),$(SORTED)) \
++ $(wordlist $(MIDR),$(words $(SORTED)),$(SORTED)) \
++ -rpath $(INST_LIB) \
+ -no-undefined \
+ -version-info $(LIBGDAL_CURRENT):$(LIBGDAL_REVISION):$(LIBGDAL_AGE)
+ ifeq ($(MACOSX_FRAMEWORK),yes)