Commit Graph

44 Commits

Author SHA1 Message Date
tranzystorekk d00bae1f94 common/build-style/meson.sh: disable relocatable pkgconfig 2024-10-15 10:12:33 +02:00
classabbyamp 69fa5df28f common/build-style/meson: move PYTHONUNBUFFERED to environment/build-style 2024-08-18 17:23:45 -04:00
classabbyamp be2c8a440e common/build-style/meson: use meson test/install instead of ninja
per eschwartz's advice
2024-08-18 17:23:45 -04:00
Andrew J. Hesford c6431f06c5 common/build-helper/meson.sh: new build helper, used by meson build style 2023-09-22 10:16:59 -04:00
Michal Vasilek 693229f70c common: build-style/meson: use meson setup
WARNING: Running the setup command as `meson [options]` instead of
         `meson setup [options]` is ambiguous and deprecated.

meson setup works since 0.42 and this deprecation warning was introduced
in 0.64
2022-11-08 18:24:04 +01:00
Michal Vasilek 71b11fdbdb xbps-src: add make_check_pre
$make_check_pre can be used for wrapper commands like xvfb-run or
dbus-run-session which are common ways to make tests work. This way many
templates can avoid defining their own do_check function.
2022-05-04 10:46:53 +02:00
q66 e51fe8bfe0 build-style/meson: ensure stdout is unbuffered for continuous log
This should deal with the annoying thing that meson will only print
its configure output all at once at the end.
2021-10-12 22:35:38 +02:00
John 297fd7327e build-style/meson.sh: move <lang>_args to build-in options section and fix cross compiling of rust code
It seems like meson is dropping rust_args when testing the rust compiler, so we just append them directly to rustc
2021-02-20 13:13:21 +01:00
Érico Rolim 84a5c1ef7c Revert "build-style/meson.sh: drop unneeded AR export"
This reverts commit 2163ca2d03.

Removing `export AR=gcc-ar` was apparently done based on the assumption
that the linked issue (https://github.com/mesonbuild/meson/issues/1646)
had been solved completely on meson's side.

Instead, their solution, seen in
https://github.com/void-linux/void-packages/pull/2815, had been to force
gcc-ar for linking static libraries; by exporting `AR=ar`, we were
accidentally breaking static libraries when LTO is enabled. This was
noticed by leah while we were trying to build qemu-user-static using the
normal libglib-devel package (built with meson, which for us defaults to
enabling LTO).

Unfortunately, while correct, this change wasn't enough to fix the
static glib build, which had to resort to disabling LTO.
2021-02-11 15:22:01 -03:00
q66 87d28506e1 build-style: change all build-styles to use /usr/libNN 2020-12-22 22:18:25 +01:00
Érico Rolim 5af961ece2 common/build-style/meson.sh: set auto-features to auto.
This allows the build system to detect itself whether it should use
certain features, instead of defaulting to (potentially bad) enabled
status.

Features that aren't detected properly, be it because false positives or
negatives, should be explicitly called out in the templates.
2020-10-18 00:00:00 -03:00
John 335286d3e2 build-style/meson: add cups and llvm-config to crossfile 2020-07-13 19:14:53 +02:00
John 82734d940c
common/xbps-src: set PKG_CONFIG{,FOR_BUILD} env vars 2020-05-26 21:18:27 +02:00
q66 81e7a17c79 build-style/meson: recognize ppcle for cross 2020-04-30 01:06:52 +02:00
John f4d315aaa8
build-style/meson: update for new env var behaviour
meson 0.54 now honors _FOR_BUILD env vars, and we don't have to set CC
and friends to the host system vars. Setting PKG_CONFIG_FOR_BUILD is
needed since otherwise it would pickup our cross wrapper
2020-03-31 16:01:20 +02:00
q66 2163ca2d03 build-style/meson.sh: drop unneeded AR export
This was fixed in Meson upstream ages ago. We have also fixed this
in gcc itself.
2020-03-15 22:03:35 +01:00
John f20e10cd44 Revert "build-style meson: fix _MESON_CPU_FAMILY=ppc64le"
This reverts commit 0d23f73635.
2019-11-27 21:41:55 +01:00
Jürgen Buchmüller 0d23f73635
build-style meson: fix _MESON_CPU_FAMILY=ppc64le
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-11-27 11:16:20 +01:00
John f4273541b8 New build-helper: qemu 2019-10-26 00:59:41 +02:00
John 260ce1acd2 build_style/meson.sh: add support for using qemu as exe_wrapper 2019-10-16 23:41:46 +02:00
q66 53b1190139 build-style/meson: use correct endian on musl ppc64 2019-04-27 16:10:35 +02:00
maxice8 20f91ac1c0
meta: set meson_crossfile on both do-patch and do-configure 2019-02-28 09:42:55 -03:00
maxice8 237da231cb build-style/meson: use do_patch to create crossfile 2019-02-27 22:56:19 -03:00
maxice8 1df181b32a build-style/meson.sh: add objcopy to provided binaries 2019-02-25 13:42:40 -03:00
maxice8 069b217655
common/build-style: don't be explicit about pie, fails vala. 2019-02-05 04:40:31 -02:00
maxice8 f421389bd9 build-style/meson.sh: explicitly enable staticpic and pie. 2019-02-05 04:14:56 -02:00
maxice8 732180dc1d build-style/meson.sh: Provide path for gir tools. 2019-01-29 19:39:34 -02:00
maxice8 5512d7e69f
build-style/meson.sh: fix binary name 2019-01-21 02:16:03 -02:00
maxice8 a59075f1d1
build-style/meson.sh: add path to 'rustc' 2019-01-21 01:59:23 -02:00
Thomas Batten c785cfd34e common: Add ppc target 2019-01-19 10:15:01 +01:00
q66 151f876627 common: add ppc64 build profiles and other ppc64 bits
This adds the build profiles for ppc64 targets as well as
modifications in other parts of the infra.

These targets are supported:

- ppc64le (glibc little endian elfv2)
- ppc64le-musl (musl little endian)
- ppc64-musl (musl big endian)

ELFv1 targets are explicitly not supported at this point.

Big endian musl supports ppc 970 or newer, while little endian
targets are set to a generic powerpc64le which effectively means
POWER8 and newer. Tuning is always set for POWER9, which is the
most likely target hardware. We also make sure AltiVec is always
on, because it is supported on all hardware we target.

[ci skip]
2019-01-05 23:38:00 +01:00
maxice8 58d5cc4105 build-style/meson: enable b_ndebug and be explicit about paths used. 2018-10-09 10:36:32 -03:00
maxice8 ea1b905d26
build-style/meson: enable Link-Time-Optimization by default. 2018-10-01 01:59:37 -03:00
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