Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • QEMU QEMU
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 795
    • Issues 795
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • QEMUQEMU
  • QEMUQEMU
  • Issues
  • #1185
Closed
Open
Issue created Aug 31, 2022 by Allen Webb@allenwebb

./configure has unprefixed calls to pkg-config and clang breaking cross-compilation

Description of problem

The configure script (as generated) includes some calls to the toolchain without including cross compiler prefixes. This can very easily break cross compilation. Here are the locations:

pkg-config

https://github.com/qemu/qemu/blob/ebc55f523c2f406e30ec8fad77bd3b9aad5d4579/configure#L2506

echo "GLIB_VERSION=$(pkg-config --modversion glib-2.0)" >> $config_host_mak

This can be replaced with:

echo "GLIB_VERSION=$(${pkg-config} --modversion glib-2.0)" >> $config_host_mak

clang

https://github.com/qemu/qemu/blob/ebc55f523c2f406e30ec8fad77bd3b9aad5d4579/configure#L662

# Default objcc to clang if available, otherwise use CC
if has clang; then
  objcc=clang
else
  objcc="$cc"
fi

This should probably take ${cross_prefix} into account, but it isn't so bad since the --objcc configure flag is available.

Edited Aug 31, 2022 by Allen Webb
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking