forked from EEESlab/tricore-gcc-toolchain-11.3.0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from NoMore201/feature/qemu
Feature/qemu
- Loading branch information
Showing
11 changed files
with
194 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# GNU autoconf/automake artifacts | ||
autom4te.cache | ||
configure~ | ||
BUILD | ||
|
||
# IDE config folders | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env bash | ||
|
||
############################################################### | ||
# | ||
# This script builds QEMU cross compile dependencies and | ||
# installs them into the provided prefix. Currently only | ||
# Glib2 is required. | ||
# | ||
# Usage: ./build-mingw-deps /opt/install-prefix | ||
# | ||
############################################################### | ||
|
||
set -euo pipefail | ||
|
||
GLIB_VERSION=2.83.0 | ||
GLIB_TARBALL="glib-$GLIB_VERSION.tar.xz" | ||
GLIB_SRC_URL="https://download.gnome.org/sources/glib/2.83/glib-$GLIB_VERSION.tar.xz" | ||
|
||
ARCH=x86_64-w64-mingw32 | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "Script require install prefix path as parameters" | ||
exit 1 | ||
fi | ||
|
||
INSTALL_PREFIX=$1 | ||
|
||
if [ ! -f $GLIB_TARBALL ]; then | ||
curl -L --insecure --remote-name-all $GLIB_SRC_URL | ||
fi | ||
tar xJf $GLIB_TARBALL | ||
cd "glib-$GLIB_VERSION" | ||
|
||
cat > $ARCH.txt <<HereDoc | ||
[binaries] | ||
c = '$ARCH-gcc' | ||
cpp = '$ARCH-g++' | ||
ar = '$ARCH-ar' | ||
windres = '$ARCH-windres' | ||
strip = '$ARCH-strip' | ||
[host_machine] | ||
system = 'windows' | ||
cpu_family = 'x86_64' | ||
cpu = 'x86_64' | ||
endian = 'little' | ||
HereDoc | ||
|
||
meson setup --cross-file $ARCH.txt build-mingw --prefix="$INSTALL_PREFIX" --buildtype=release \ | ||
--default-library=static \ | ||
-Dintrospection=disabled \ | ||
-Ddtrace=disabled \ | ||
-Dsystemtap=disabled \ | ||
-Dsysprof=disabled \ | ||
-Dglib_debug=disabled | ||
cd build-mingw | ||
meson compile | ||
meson install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ ! -f /etc/lsb_release ] && [ ! -f /etc/debian_version ] | ||
then | ||
echo "Script is meant to install packages on Debian/Ubuntu based distributions" | ||
echo "Please install dependencies manually on other distributions" | ||
exit 1 | ||
fi | ||
|
||
apt-get update | ||
DEBIAN_FRONTEND=noninteractive apt-get -y install \ | ||
build-essential \ | ||
gcc-mingw-w64 g++-mingw-w64 mingw-w64-tools \ | ||
git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build \ | ||
python3-pip curl | ||
|
||
# Make sure MingGW compiler uses Posix threads | ||
update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix | ||
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix | ||
|
||
pip3 install --break-system-packages meson==1.4.0 |