Commit Graph

11 Commits

Author SHA1 Message Date
maxice8
608f10ea59
build-style/meson: add nm to binaries and export LD, AR, CPPFLAGS and
LDFLAGS.
2018-09-12 21:24:31 -03:00
maxice8
d0562177a5
build-style/meson: define PKG_CONFIG for host usage.
PKG_CONFIG environment variable should point to the pkg-config executable
to be used to fetch dependencies that use 'native: true' (indicate to build
against host libraries not cross-compiled ones)

To meet those requirements we set an absolute path to the host
pkg-config since the relative path to pkg-config is taken by the
wrapper.

This currently requires a patch that is a milestone of meson-0.48 that
was generated by the issue:

https://github.com/mesonbuild/meson/issues/1736
2018-09-10 01:17:05 -03:00
maxice8
775ad8deba
build_style/meson: also unset _MESON_CPU_FAMILY. 2018-09-08 05:54:44 -03:00
maxice8
6580c8d657
build_style/meson.sh: export CFLAGS and CXXFLAGS from host
meson when compiling something with 'native: true' (for building
executables that are meant to be run on the host system) uses CFLAGS
and CXXFLAGS environment variables, we "pollute" them with
TARGET system cflags/cxxflags, such as -march= for the cross-compiled
arch.

so to fix it we export CFLAGS and CXXFLAGS to be CFLAGS_host and
CXXFLAGS_host respectively, they are set by XBPS and correspond to
the XBPS_CFLAGS/XBPS_CXXFLAGS. This same set of changes is also done
with CC and CXX see L#61

this was found when cross-compiling lighttpd which created the
'lemon' executable to generate inputs

thanks to @Cogitri from Exherbo for helping me debug this

[ci skip]
2018-08-16 01:49:38 -03:00
maxice8
97b348502c meson.sh: Fix cross-compilation
following https://mesonbuild.com/Cross-compilation.html

- host_machine is our XBPS_TARGET_MACHINE
- build_machine is our XBPS_MACHINE, and meson can find out the details
on it's own
- also don't include -musl in the CPU because meson doesn't recognize it
and projects like Mesa (LibGL) don't enable optimizations for it
- cpu_family and cpu are different, they need to be set properly:
 - armv* is arm
 - mips* is mips
 - i686 is x86
 - x86_64 is x86_64
 - aarch64 is aarch64
2018-07-29 14:30:20 -03:00
maxice8
84a9ac51db build-style/meson.sh: add generic do_check function.
Closes #9594.

Signed-off-by: Enno Boland <gottox@voidlinux.eu>
2017-11-28 09:37:49 +01:00
hipperson0
fb26ec4a5b New package: cross-mips-linux-muslhf-0.24 2017-11-24 10:11:23 +01:00
Michael Gehring
0adf7415b7 common/build-style/meson.sh: fix comment 2017-11-24 06:44:44 +00:00
John
568df64d8e meson: fix cpp cross compilation 2017-09-30 14:20:47 +02:00
Peter Bui
d1439f814b meson: add preliminary support for cross compilation 2017-09-24 10:02:07 -04:00
Enno Boland
14cf5b95d2 common/build-style: add meson build style
also use build_style=meson in all templates that use meson.
2017-05-23 14:18:01 +02:00