diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-10-21 22:14:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-21 22:14:19 +0200 |
| commit | 35a21d89321767e84e3d409a24fb6941be014286 (patch) | |
| tree | d7d4e777729ae676a70d6beca280a560688d9986 | |
| parent | 45ee1e3c3c31835bcb77bd51e57c3681cea19bb9 (diff) | |
| parent | 81ec174e2a3e744b762ed9445ce04b1683197378 (diff) | |
| download | box64-35a21d89321767e84e3d409a24fb6941be014286.tar.gz box64-35a21d89321767e84e3d409a24fb6941be014286.zip | |
Merge pull request #147 from bbbruni/main
Add a debug mode compilation with disabled compiler optimizations
| -rwxr-xr-x | CMakeLists.txt | 3 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-arm64-DEBUG | 44 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-rk3399-DEBUG | 44 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-rpi4-DEBUG | 44 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-tegra-DEBUG | 44 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-x86_64-DEBUG | 43 |
6 files changed, 222 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 75ee4719..e46d00ac 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.4) cmake_policy(SET CMP0065 NEW) +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") + option(RPI4ARM64 "Set to ON if targeting an RaspberryPI4 device with multiarch arm64 and armhf" ${RPI4ARM64}) option(RK3326 "Set to ON if targeting an Rockchip RK3326 based device" ${RK3326}) option(RK3399 "Set to ON if targeting an Rockchip RK3399 based device" ${RK3399}) diff --git a/pkgbuilds/PKGBUILD-arm64-DEBUG b/pkgbuilds/PKGBUILD-arm64-DEBUG new file mode 100644 index 00000000..1b05784f --- /dev/null +++ b/pkgbuilds/PKGBUILD-arm64-DEBUG @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP <parjailu@gmail.com> +# Author: Sebastien Chevalier <ptitseb@box86.org> +pkgname=box64-arm64-git +pkgver=1116.9243ea4 +pkgrel=1 +pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices." +arch=('aarch64') +url="https://github.com/ptitSeb/box64" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}" "${pkgname%-arm64-git}-git" "${pkgname%-arm64-git}") +conflicts=("${pkgname%-git}" "${pkgname%-arm64-git}-git" "${pkgname%-arm64-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-arm64-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-arm64-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=Debug + fi +} + +build() { + cd "$srcdir/${pkgname%-arm64-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-arm64-git}/build" + make DESTDIR="${pkgdir}/" install + # /usr/local/bin isn't in PATH by the default, + # we should move it to /usr/bin + cd ${pkgdir} + mv usr/local/bin/ usr/bin/ + # cleanup when dir is empty + rmdir usr/local || exit 0 +} diff --git a/pkgbuilds/PKGBUILD-rk3399-DEBUG b/pkgbuilds/PKGBUILD-rk3399-DEBUG new file mode 100644 index 00000000..2d36a378 --- /dev/null +++ b/pkgbuilds/PKGBUILD-rk3399-DEBUG @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP <parjailu@gmail.com> +# Author: Sebastien Chevalier <ptitseb@box86.org> +pkgname=box86-rk3399-git +pkgver=1116.9243ea4 +pkgrel=1 +pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices." +arch=('aarch64') +url="https://github.com/ptitSeb/box64" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}" "${pkgname%-rk3399-git}-git" "${pkgname%-rk3399-git}") +conflicts=("${pkgname%-git}" "${pkgname%-rk3399-git}-git" "${pkgname%-rk3399-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-rk3399-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-rk3399-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DRK3399=1 -DCMAKE_BUILD_TYPE=Debug + fi +} + +build() { + cd "$srcdir/${pkgname%-rk3399-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-rk3399-git}/build" + make DESTDIR="${pkgdir}/" install + # /usr/local/bin isn't in PATH by the default, + # we should move it to /usr/bin + cd ${pkgdir} + mv usr/local/bin/ usr/bin/ + # cleanup when dir is empty + rmdir usr/local || exit 0 +} diff --git a/pkgbuilds/PKGBUILD-rpi4-DEBUG b/pkgbuilds/PKGBUILD-rpi4-DEBUG new file mode 100644 index 00000000..81ae6e4a --- /dev/null +++ b/pkgbuilds/PKGBUILD-rpi4-DEBUG @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP <parjailu@gmail.com> +# Author: Sebastien Chevalier <ptitseb@box86.org> +pkgname=box64-rpi-git +pkgver=1116.9243ea4 +pkgrel=1 +pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices." +arch=('aarch64') +url="https://github.com/ptitSeb/box64" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}" "${pkgname%-rpi-git}-git" "${pkgname%-rpi-git}") +conflicts=("${pkgname%-git}" "${pkgname%-rpi-git}-git" "${pkgname%-rpi-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-rpi-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-rpi-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DRPI4ARM64=1 -DCMAKE_BUILD_TYPE=Debug + fi +} + +build() { + cd "$srcdir/${pkgname%-rpi-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-rpi-git}/build" + make DESTDIR="${pkgdir}/" install + # /usr/local/bin isn't in PATH by the default, + # we should move it to /usr/bin + cd ${pkgdir} + mv usr/local/bin/ usr/bin/ + # cleanup when dir is empty + rmdir usr/local || exit 0 +} diff --git a/pkgbuilds/PKGBUILD-tegra-DEBUG b/pkgbuilds/PKGBUILD-tegra-DEBUG new file mode 100644 index 00000000..688490f9 --- /dev/null +++ b/pkgbuilds/PKGBUILD-tegra-DEBUG @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP <parjailu@gmail.com> +# Author: Sebastien Chevalier <ptitseb@box86.org> +pkgname=box64-tegra-git +pkgver=1116.9243ea4 +pkgrel=1 +pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices." +arch=('aarch64') +url="https://github.com/ptitSeb/box64" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}" "${pkgname%-tegra-git}-git" "${pkgname%-tegra-git}") +conflicts=("${pkgname%-git}" "${pkgname%-tegra-git}-git" "${pkgname%-tegra-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-tegra-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-tegra-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DTEGRAX1=1 -DCMAKE_BUILD_TYPE=Debug + fi +} + +build() { + cd "$srcdir/${pkgname%-tegra-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-tegra-git}/build" + make DESTDIR="${pkgdir}/" install + # /usr/local/bin isn't in PATH by the default, + # we should move it to /usr/bin + cd ${pkgdir} + mv usr/local/bin/ usr/bin/ + # cleanup when dir is empty + rmdir usr/local || exit 0 +} diff --git a/pkgbuilds/PKGBUILD-x86_64-DEBUG b/pkgbuilds/PKGBUILD-x86_64-DEBUG new file mode 100644 index 00000000..4cd8651a --- /dev/null +++ b/pkgbuilds/PKGBUILD-x86_64-DEBUG @@ -0,0 +1,43 @@ +# Maintainer: Jai-JAP <parjailu@gmail.com> +# Author: Sebastien Chevalier <ptitseb@box86.org> +pkgname=box64-x64-git +pkgver=1116.9243ea4 +pkgrel=1 +pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices." +arch=('aarch64') +url="https://github.com/ptitSeb/box64" +license=('MIT') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}" "${pkgname%-x64-git}-git" "${pkgname%-x64-git}") +conflicts=("${pkgname%-git}" "${pkgname%-x64-git}-git" "${pkgname%-x64-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-x64-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-x64-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DLD80BITS=1 -DNOALIGN=1 -DCMAKE_BUILD_TYPE=Debug + fi +} + +build() { + cd "$srcdir/${pkgname%-x64-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-x64-git}/build" + make DESTDIR="${pkgdir}/" install + # /usr/local/bin isn't in PATH by the default, + # we should move it to /usr/bin + cd ${pkgdir} + mv usr/local/bin/ usr/bin/ + # cleanup when dir is empty + rmdir usr/local || exit 0 +} |