Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(bsd-user MTTCG branch) Linux build fixes for system mode #239

Open
wants to merge 1 commit into
base: qemu-cheri-bsd-user-mttcg
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1580,8 +1580,12 @@ subdir('replay')
subdir('hw')
subdir('accel')
subdir('plugins')
subdir('bsd-user')
subdir('linux-user')
if 'CONFIG_BSD_USER' in config_target
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem odd given there isn’t a guard here for linux-user upstream?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kwitaszczyk 's qemu-cheri-bsd-user-mttcg branch adds extra source files in the bsd-user build which, by not existing, trip up meson even when you aren't building bsd-user. Putting a guard here avoids meson seeing them.

This PR enables his branch to build in system mode; making the system mode usable is a WiP

Copy link
Member

@jrtc27 jrtc27 Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. That doesn't explain why linux-user needs them
  2. bsd-user likely shouldn't be written in such a way as to require this, given neither bsd-user nor linux-user do upstream

subdir('bsd-user')
endif
if 'CONFIG_LINUX_USER' in config_target
subdir('linux-user')
endif

bsd_user_ss.add(files('gdbstub.c', 'thunk.c'))
specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss)
Expand Down Expand Up @@ -1783,7 +1787,7 @@ foreach target : target_dirs
if 'CONFIG_LINUX_USER' in config_target
base_dir = 'linux-user'
target_inc += include_directories('linux-user/host/' / config_host['ARCH'])
else
elif 'CONFIG_BSD_USER' in config_target
base_dir = 'bsd-user'
target_inc += include_directories(
base_dir / 'host' / config_host['ARCH'],
Expand Down
2 changes: 1 addition & 1 deletion target/cheri-common/cheri_tagmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
* SUCH DAMAGE.
*/
#include "cheri_tagmem.h"
#include "cheri_usermem.h"
#include "exec/exec-all.h"
#include "exec/log.h"
#include "exec/ramblock.h"
#ifdef CONFIG_USER_ONLY
#include "cheri_usermem.h"
#include "qemu.h"
#else
#include "hw/boards.h"
Expand Down