You are not logged in.
Hi. I want to cross-compile a program for a Windows host and with debug info. I added --buildtype=debug PKGBUILD like I do for native compilations, but it didn't work:
src/libnice/build-i686-w64-mingw32/meson-logs/meson-log.txt
Sanity check compiler command line: i686-w64-mingw32-gcc sanitycheckc.c -o sanitycheckc_cross.exe -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -O2 ...
Only patching the *.meson file below allowed me to change -O2 to -O0. What am I doing wrong?
PKGBUILD
...
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
build() {
cd "${srcdir}/libnice"
for _arch in $_architectures; do
mkdir -p "build-${_arch}" && pushd build-${_arch}
${_arch}-meson \
--buildtype=debug \
-D strip=false \
-D optimization=0 \
...
/usr/share/mingw/toolchain-i686-w64-mingw32.meson ( AUR )
...
[built-in options]
c_args = ['-D_FORTIFY_SOURCE=2', '-D_GLIBCXX_ASSERTIONS', '-O2', '-pipe', '-fno-plt', '-fexceptions', '--param=ssp-buffer-size=4', '-Wformat', '-Werror=format-security', '-fcf-protection']
...
Last edited by leniviy (2021-11-14 09:03:07)
Arch 64, xfce4
Offline
$ more /usr/bin/arch-meson
#!/bin/bash -ex
# Highly opinionated wrapper for Arch Linux packaging
exec meson setup \
--prefix /usr \
--libexecdir lib \
--sbindir bin \
--buildtype plain \
--auto-features enabled \
--wrap-mode nodownload \
-D b_lto=true \
-D b_pie=true \
"$@"
$
don't use arch-meson , set desired options yourself.
[1] has some details, for a practical (though slightly different) example see the build() function in [2] .
[1] https://wiki.archlinux.org/title/Meson_ … y_directly
[2] https://aur.archlinux.org/cgit/aur.git/ … inimal-git
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline