Skip to contentSkip to conversation

package/mupdf: fix building with some toolchains

PATCH Applied Raphaël Mélotte 3 participants 7 messages Sep 7, 2021 – Oct 6, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 package/mupdf: fix building with some toolchains

With some toolchains (e.g. mips64el), partial linking fails in the
following way:
/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation /tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o)

Taking inspiration from commit 9eca4b9f84fe2535d8caee6eeb062ce33733bdf1, fix it by using GCC instead of LD for partial linking.

'nostdlib' has to be added, or it will try to use GCC libraries for partial linking and fail with 'cannot find -lgcc_s'.

Note that on mips the build will now produce warnings similar to this
one:
/home/rme/Documents/buildroot/output/host/lib/gcc/mips64el-buildroot-linux-gnu/10.3.0/../../../../mips64el-buildroot-linux-gnu/bin/ld: build/release/libmupdf.a(NotoSansTaiTham-Regular.ttf.o): warning: linking abicalls files with non-abicalls files

During a runtime test on mips64el under qemu, mupdf-x11 was nonetheless able to display a sample PDF file correctly.

This fixes the following build failures (and many similar ones):
http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74/

---
 .../0001-use-gcc-instead-of-objcopy.patch     | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/mupdf/0001-use-gcc-instead-of-objcopy.patch
package/mupdf/0001-use-gcc-instead-of-objcopy.patch new file +29 -0
new file mode 100644
index 0000000000..9a8dacbcca
@@ -0,0 +1,29 @@
+From de27daedf8cb1d210b0b1facd87634c6aaaf1a74 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <[email protected]>
+Date: Thu, 2 Sep 2021 20:17:26 +0200
+Subject: [PATCH] use gcc instead of objcopy
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Raphaël Mélotte <[email protected]>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b0fb617e2..0a8795e0e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -64,7 +64,7 @@ endif
+ LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+ TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
+ WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
+-OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
++OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(CC) -Wl,-r -Wl,-b -Wl,binary -Wl,-z -Wl,noexecstack -nostdlib -o $@ $<
+ 
+ # --- Rules ---
+ 
+-- 
+2.32.0
+
Signature · 6 lines
2.32.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 34 lines · Raphaël Mélotte

With some toolchains (e.g. mips64el), partial linking fails in the
following way:
/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation /tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o)

Taking inspiration from commit 9eca4b9f84fe2535d8caee6eeb062ce33733bdf1, fix it by using GCC instead of LD for partial linking.

'nostdlib' has to be added, or it will try to use GCC libraries for partial linking and fail with 'cannot find -lgcc_s'.

Note that on mips the build will now produce warnings similar to this
one:
/home/rme/Documents/buildroot/output/host/lib/gcc/mips64el-buildroot-linux-gnu/10.3.0/../../../../mips64el-buildroot-linux-gnu/bin/ld: build/release/libmupdf.a(NotoSansTaiTham-Regular.ttf.o): warning: linking abicalls files with non-abicalls files

During a runtime test on mips64el under qemu, mupdf-x11 was nonetheless able to display a sample PDF file correctly.

This fixes the following build failures (and many similar ones):
http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74/

---
  .../0001-use-gcc-instead-of-objcopy.patch     | 29 +++++++++++++++++++
  1 file changed, 29 insertions(+)

create mode 100644 package/mupdf/0001-use-gcc-instead-of-objcopy.patch

package/mupdf/0001-use-gcc-instead-of-objcopy.patch new file +0 -0
new file mode 100644
index 0000000000..9a8dacbcca

package/mupdf/0001-use-gcc-instead-of-objcopy.patch line 9

Quoted 9 lines
package/mupdf/0001-use-gcc-instead-of-objcopy.patch new file +9 -0
@@ -0,0 +1,29 @@
+From de27daedf8cb1d210b0b1facd87634c6aaaf1a74 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <[email protected]>
+Date: Thu, 2 Sep 2021 20:17:26 +0200
+Subject: [PATCH] use gcc instead of objcopy
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Raphaël Mélotte <[email protected]>

What's the upstream status of this patch? We want to have a link to the
upstream MR or patchwork or mailing list archive or whatever in the patch. Or, if that's not possible (e.g. upstream is dead), something like:

Upstream-Status: dead (no activity since 2003)

Regards,
Arnout

Quoted 11 lines
package/mupdf/0001-use-gcc-instead-of-objcopy.patch new file +10 -0
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b0fb617e2..0a8795e0e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -64,7 +64,7 @@ endif
+ LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

package/mupdf/0001-use-gcc-instead-of-objcopy.patch line 29

Quoted 10 lines
package/mupdf/0001-use-gcc-instead-of-objcopy.patch new file +10 -0
+ TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
+ WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
+-OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
++OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(CC) -Wl,-r -Wl,-b -Wl,binary -Wl,-z -Wl,noexecstack -nostdlib -o $@ $<
+
+ # --- Rules ---
+
+--
+2.32.0
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw

Hello,

Quoted 5 lines · Arnout Vandecappelle

 What's the upstream status of this patch? We want to have a link to the
upstream MR or patchwork or mailing list archive or whatever in the patch. Or, if that's not possible (e.g. upstream is dead), something like:

Upstream-Status: dead (no activity since 2003)

Whoops...

I only sent it upstream now: https://bugs.ghostscript.com/show_bug.cgi?id=704442

I'll send a V2 shortly, thanks for the review.

Kind regards,

Raphaël
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

PATCH v2 1/1 package/mupdf: fix building with mips toolchains

In reply to Raphaël Mélotte

With some toolchains (e.g. mips64el), partial linking fails in the
following way:
/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation /tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o)

Taking inspiration from commit 9eca4b9f84fe2535d8caee6eeb062ce33733bdf1, fix it by using GCC instead of LD for partial linking.

Note that on mips the build will now produce warnings similar to this
one:
buildroot/output/host/lib/gcc/mips64el-buildroot-linux-gnu/10.3.0/../../../../mips64el-buildroot-linux-gnu/bin/ld: build/release/libmupdf.a(NotoSansTaiTham-Regular.ttf.o): warning: linking abicalls files with non-abicalls files

During a runtime test on mips64el under qemu, mupdf-x11 was nonetheless able to display a sample PDF file correctly.

Fixes:
- http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74/

---
Changes v1 -> v2:
- Add upstream status.
- Reword patch message and name.
- Change commit title.

 ...001-Use-CC-instead-of-LD-for-OBJCOPY.patch | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/mupdf/0001-Use-CC-instead-of-LD-for-OBJCOPY.patch
package/mupdf/0001-Use-CC-instead-of-LD-for-OBJCOPY.patch new file +43 -0
new file mode 100644
index 0000000000..991a2347a7
@@ -0,0 +1,43 @@
+From a4fa809821f8d283c1c42a407c7f36d6ad33285e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <[email protected]>
+Date: Thu, 2 Sep 2021 20:17:26 +0200
+Subject: [PATCH] Use CC instead of LD for OBJCOPY
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When cross-compiling for mips targets using Buildroot, using LD for
+partial linking fails in the following way:
+/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation
+/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o)
+
+To fix it, use CC instead of LD for partial linking.
+
+'nostdlib' has to be added, or it will try to use GCC libraries for
+partial linking and fail with 'cannot find -lgcc_s'.
+
+Fixes:
+- http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74
+
+Signed-off-by: Raphaël Mélotte <[email protected]>
+[Upstream status: https://bugs.ghostscript.com/show_bug.cgi?id=704442]
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index a81a72bd2..e96d5246d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -63,7 +63,7 @@ endif
+ LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+ TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p --exclude=platform/python --exclude=platform/c++
+ WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
+-OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
++OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(CC) -Wl,-r -Wl,-b -Wl,binary -Wl,-z -Wl,noexecstack -nostdlib -o $@ $<
+ GENDEF_CMD = $(QUIET_GENDEF) gendef - $< > $@
+ DLLTOOL_CMD = $(QUIET_DLLTOOL) dlltool -d $< -D $(notdir $(^:%.def=%.dll)) -l $@
+ 
+-- 
+2.33.0
+
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

PATCH v3 1/1 package/mupdf: fix building with mips toolchains

In reply to Raphaël Mélotte

With some toolchains (e.g. mips64el), partial linking fails in the
following way:
/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation /tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o)

Taking inspiration from commit 9eca4b9f84fe2535d8caee6eeb062ce33733bdf1, fix it by using GCC instead of LD for partial linking.

Note that on mips the build will now produce warnings similar to this
one:
buildroot/output/host/lib/gcc/mips64el-buildroot-linux-gnu/10.3.0/../../../../mips64el-buildroot-linux-gnu/bin/ld: build/release/libmupdf.a(NotoSansTaiTham-Regular.ttf.o): warning: linking abicalls files with non-abicalls files

During a runtime test on mips64el under qemu, mupdf-x11 was nonetheless able to display a sample PDF file correctly.

Fixes:
- http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74/

---
Changes v2 -> v3:
- Fix patch so that it applies cleanly again on 1.18.0.
- Renumber patch.

Changes v1 -> v2:
- Add upstream status.
- Reword patch message and name.
- Change commit title.

 ...004-Use-CC-instead-of-LD-for-OBJCOPY.patch | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch
package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch new file +43 -0
new file mode 100644
index 0000000000..8c113e4ee4
@@ -0,0 +1,43 @@
+From da4b98447573daf77829811e95e3772e8a296934 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= <[email protected]>
+Date: Thu, 2 Sep 2021 20:17:26 +0200
+Subject: [PATCH] Use CC instead of LD for OBJCOPY
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When cross-compiling for mips targets using Buildroot, using LD for
+partial linking fails in the following way:
+/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation
+/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o)
+
+To fix it, use CC instead of LD for partial linking.
+
+'nostdlib' has to be added, or it will try to use GCC libraries for
+partial linking and fail with 'cannot find -lgcc_s'.
+
+Fixes:
+- http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74
+
+Signed-off-by: Raphaël Mélotte <[email protected]>
+[Upstream status: https://bugs.ghostscript.com/show_bug.cgi?id=704442]
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b0fb617e2..0a8795e0e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -64,7 +64,7 @@ endif
+ LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+ TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
+ WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
+-OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
++OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(CC) -Wl,-r -Wl,-b -Wl,binary -Wl,-z -Wl,noexecstack -nostdlib -o $@ $<
+ 
+ # --- Rules ---
+ 
+-- 
+2.33.0
+
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH v3] package/mupdf: fix building with mips toolchains

Quoted 13 lines · Raphaël Mélotte

With some toolchains (e.g. mips64el), partial linking fails in the
following way:
/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation /tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o)

Taking inspiration from commit 9eca4b9f84fe2535d8caee6eeb062ce33733bdf1, fix it by using GCC instead of LD for partial linking.

Note that on mips the build will now produce warnings similar to this
one:
buildroot/output/host/lib/gcc/mips64el-buildroot-linux-gnu/10.3.0/../../../../mips64el-buildroot-linux-gnu/bin/ld: build/release/libmupdf.a(NotoSansTaiTham-Regular.ttf.o): warning: linking abicalls files with non-abicalls files

Quoted 7 lines

During a runtime test on mips64el under qemu, mupdf-x11 was nonetheless able to display a sample PDF file correctly.

Fixes:
- http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74/

Applied to master, thanks.

[snip]

package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch line 23

Quoted 3 lines
package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch new file +3 -0
+
+Signed-off-by: Raphaël Mélotte <[email protected]>
+[Upstream status: https://bugs.ghostscript.com/show_bug.cgi?id=704442]

Upstream commented that you could also build with HAVE_OBJCOPY=no, but I like
this solution better.

Quoted 4 lines
+---
+ Makefile | 2 +-

+ 1 file changed, 1 insertion(+), 1 deletion(-)

package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch new file +1 -0
+

package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch line 37

Quoted 10 lines
package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch new file +10 -0
+diff --git a/Makefile b/Makefile
+index b0fb617e2..0a8795e0e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -64,7 +64,7 @@ endif
+ LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+ TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
+ WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
+-OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
++OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(CC) -Wl,-r -Wl,-b -Wl,binary -Wl,-z -Wl,noexecstack -nostdlib -o $@ $<

Note that -Wl allows you to separate options with commas, i.e.:

$(CC) -Wl,-r,-b,binary,-z,noexecstack -nostdlib -o $@ $<

However, I didn't feel like doing a build to test, so I left it as is.

Regards,
Arnout

package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch line 43

Quoted 7 lines
package/mupdf/0004-Use-CC-instead-of-LD-for-OBJCOPY.patch new file +6 -0
+
+ # --- Rules ---
+
+--
+2.33.0
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw

Re: [Buildroot] [PATCH v3] package/mupdf: fix building with mips toolchains

In reply to Raphaël Mélotte
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Raphaël" == Raphaël Mélotte <[email protected]> writes:

With some toolchains (e.g. mips64el), partial linking fails in the
following way:
/tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation /tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o)

Taking inspiration from commit 9eca4b9f84fe2535d8caee6eeb062ce33733bdf1, fix it by using GCC instead of LD for partial linking.

Note that on mips the build will now produce warnings similar to this
one:
buildroot/output/host/lib/gcc/mips64el-buildroot-linux-gnu/10.3.0/../../../../mips64el-buildroot-linux-gnu/bin/ld: build/release/libmupdf.a(NotoSansTaiTham-Regular.ttf.o): warning: linking abicalls files with non-abicalls files

Quoted 7 lines

During a runtime test on mips64el under qemu, mupdf-x11 was nonetheless able to display a sample PDF file correctly.

Fixes:
- http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74/

Committed to 2021.08.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot