Bug 244768 - emulators/qemu-cheri: Fix build with lld 10.0.0
Summary: emulators/qemu-cheri: Fix build with lld 10.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Brooks Davis
URL:
Keywords: buildisok
Depends on:
Blocks: 244251
  Show dependency treegraph
 
Reported: 2020-03-12 20:50 UTC by Dimitry Andric
Modified: 2020-03-27 16:18 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments
Fix emulators/qemu-cheri build with lld 10.0.0 (3.24 KB, patch)
2020-03-12 20:50 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2020-03-12 20:50:48 UTC
Created attachment 212358 [details]
Fix emulators/qemu-cheri build with lld 10.0.0

As reported in bug 244251, with clang and lld 10.0.0 the emulators/qemu-cheri port fails in the configure stage:

===>  Configuring for qemu-cheri-0.d20191209_1

ERROR: We need to link the QEMU user mode binaries at a
       specific text address. Unfortunately your linker
       doesn't support either the -Ttext-segment option or
       printing the default linker script with --verbose.
       If you don't want the user mode binaries, pass the
       --disable-user option to configure.

===>  Script "configure" failed unexpectedly.
Please report the problem to brooks@FreeBSD.org [maintainer] and attach the
"/wrkdirs/share/dim/ports/emulators/qemu-cheri/work/qemu-74235a2879944724c88ad8b400170b8e2b0a6147/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

This is because lld 10.0.0 no longer supports the -Ttext-segment option, and uses --image-base for similar functionality.

I am proposing a patch that makes the configure script check for the --image-base option first, then the -Ttext-segment option.
Comment 1 Automation User 2020-03-27 02:56:57 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/130208888
Comment 2 commit-hook freebsd_committer 2020-03-27 16:12:48 UTC
A commit references this bug:

Author: brooks
Date: Fri Mar 27 16:11:56 UTC 2020
New revision: 529267
URL: https://svnweb.freebsd.org/changeset/ports/529267

Log:
  Update qemu-cheri and llvm-cheri to recent snapshots.

  In qemu-cheri:
   * Fix build with llvm10 [0]
   * Remove the 256-bit capability version
   * Add CHERI RISC-V

  PR:		244768 [0]
  Submitted by:	dim [0]
  Sponsored by:	DARPA

Changes:
  head/devel/llvm-cheri/Makefile
  head/devel/llvm-cheri/Makefile.snapshot
  head/devel/llvm-cheri/distinfo
  head/devel/llvm-cheri/files/gen-Makefile.snapshot.sh
  head/devel/llvm-cheri/pkg-plist
  head/emulators/qemu-cheri/Makefile
  head/emulators/qemu-cheri/Makefile.snapshot
  head/emulators/qemu-cheri/distinfo
  head/emulators/qemu-cheri/files/gen-Makefile.snapshot.sh
  head/emulators/qemu-cheri/files/patch-configure
Comment 3 Brooks Davis freebsd_committer 2020-03-27 16:18:29 UTC
Committed. No MFH planned (users will want more frequent updates).