Commit graph

125 commits

Author SHA1 Message Date
Corentin Noël
a0fbf455fa meson: Do not check for meson version >=0.54
Meson version 0.59 is already required.
2025-05-20 11:05:27 +02:00
Matt Turner
38ec7dbd4d build: bump version to 2.4.124 2024-12-04 13:30:30 -05:00
Simon Ser
bea14386bc build: simplify Linux system check
No need for contains() here.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-09-08 09:15:08 +00:00
Matt Turner
25dec5b91f build: bump version to 2.4.123 2024-08-26 13:10:22 -07:00
Mark Collins
f3f56f41bb Disable ioctl signed overload for Bionic libc
Bionic libc ships with `ioctl` that has two signatures, one with an
unsigned `request` parameter and one with a signed request parameter.

This leads to compilation failing due to `__typeof__(ioctl)` being used
by DRM which fails to resolve which overload to use, this has been fixed
by defining `BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD` on Android.

Signed-off-by: Mark Collins <mark@igalia.com>
2024-08-22 18:45:38 +00:00
Daniel Stone
b0815faac0 libs: Tie DSO minor versions to libdrm version
There is an excellent writeup explaining this requirement here:
    https://gitlab.freedesktop.org/wayland/wayland/-/issues/175

In short, for mixed environments such as the Steam Runtime and other
container-like environments, choosing which libdrm to link into the
client's address space is a hard problem. If the runtime has a newer
libdrm than the host, then it should be preferred, because the client
may be using newly-added symbols. But if the host has a newer libdrm,
then that should be used, because drivers may be depending on those.

Bumping the DSO minor version is transparent to all users because apps
only link against the major version, e.g. DT_NEEDED libdrm.so.2; the
fact that libdrm.so.2 is a link to libdrm.so.2.122.0 is a detail known
only to the loader, but it does let a smart runtime make better
decisions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-08-01 13:28:41 +01:00
Enrico Weigelt, metux IT consult
b065dbc5cc Fix FTBS on undefined clock_gettime() and asprintf()
Some platforms (eg. SunOS) explicitly need extra symbols in order to define
those functions. There're many files needing the __EXTENSIONS__ symbol,
so doing this on a global scale.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-06-27 02:07:00 +02:00
Simon Ser
ad78bb591d build: bump version to 2.4.122
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-06-26 10:13:31 +02:00
Nicolas Caramelli
7f20912b1b Remove libm in libdrm dependencies
Signed-off-by: Nicolas Caramelli <caramelli.devel@gmail.com>
2024-06-02 22:09:56 +00:00
Marek Olšák
70c4f836cc Bump version to 2.4.121 2024-06-01 13:31:41 -04:00
Joaquim Monteiro
764ed8b916
meson: Fix broken str.format usage
str.format used to allow any type as an argument, which often resulted
in using an internal string representation. This is considered broken
behavior, and is deprecated since Meson 1.3.0.

Signed-off-by: Joaquim Monteiro <joaquim.monteiro@protonmail.com>
2024-03-29 10:24:22 +00:00
Simon Ser
75254bf239 build: bump version to 2.4.120
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-01-13 10:37:07 +01:00
Marek Olšák
fc5f2239f3 meson: bump libdrm version to 2.4.119
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
2023-12-21 06:49:36 -05:00
Simon Ser
02a41cf302 build: bump version to 2.4.118
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-11-20 14:03:51 +01:00
Geert Uytterhoeven
5dba8d73df intel: determine target endianness using meson
The endianness of the target is currently determined based on
preprocessor symbols.  Unfortunately some symbols checked are wrong
(sparc64-linux-gnu-gcc does not define __BIG_ENDIAN__ or SPARC), and
several checks for big-endian architectures are missing.

Fix this by introducing a new preprocessor symbol HAVE_BIG_ENDIAN, which
is set based on meson's knowledge of the target endianness.

Android.common.mk does not need an update, as Android is always
little-endian (https://developer.android.com/ndk/guides/abis.html).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - Replace explicit #ifdef checks by a define set by meson,

v3:
  - No changes,

v2:
  - Add arm, aarch64, microblaze, s390, and sh.
2023-10-31 13:24:32 +00:00
David Jagu
8a933c778a meson: fix typo in libdrm_intel
Replace system() with cpu_family() for libdrm_intel
This restore libdrm_intel to be built by default

Closes: #93

Signed-off-by: David Jagu <marav8@free.fr>
2023-10-24 18:59:39 +02:00
Simon Ser
5254fd1146 build: bump version to 2.4.117
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-10-20 07:24:54 +02:00
Dylan Baker
bd205d133e meson: replace deprecated program.path -> program.full_path
To avoid Meson warnings

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2023-10-20 05:21:01 +00:00
Dylan Baker
16e6a96505 meson: Use feature.require() and feature.allowed()
To reduce the size and complexity of checks. require() allows combining
auto and enabled checks(), so that something like
```meson
x = get_option('feature')
y = false
if x.enabled()
  if not condition
    error(...)
  endif
  y = condition
endif
```
can be rewritten as:
```meson
y = get_option('feature').require(condition, error_message : ...).allowed()
```
require checks the condition, then if the feature is required it emits
an error with the given message otherwise it returns a disabled feature.
allowed then returns whether the feature is not disabled, and returns
that (ie, .allowed() == not .disabled()). This is especially helpful for
longer more complex conditions

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2023-10-20 05:21:01 +00:00
Dylan Baker
a6a2ccb448 meson: fix intel requirements
Intel requires libpciaccess and an x86/x86_64 host, so if those
aren't found and it's enabled we need to error

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2023-10-20 05:21:01 +00:00
Simon Ser
7bdb135f0c build: bump version to 2.4.116
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-08-23 11:57:39 +02:00
Jan Beich
332809f3ee meson: drop pthread-stubs dependency on BSDs
pthread-stubs >= 0.4 simply passes -pthread which is similar to what
dependency('threads') returns. And make it a private dependency
for subprojects even on Linux.

Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
2023-02-10 14:58:52 +00:00
Simon Ser
ee558cea20 build: bump version to 2.4.115
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-02-09 12:55:44 +01:00
Simon Ser
b9ca37b313 build: bump version to 2.4.114
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-11-03 09:33:36 +01:00
Simon Ser
0bd3e4e94f build: automatically disable Intel if pciaccess is not found
Wire up the pciaccess dep to the intel option. This automatically
skips the dep if intel is explicitly disabled, fails if intel is
explicitly enabled and it's not found, and disables intel if it's
set to auto and the dep is not found.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2022-10-03 09:03:30 +02:00
Eli Schwartz
474894ed17
meson: fast-fail on unsupported OSes
It's not worth even attempting to configure anything on OSes where there
is no DRM to have a userspace library for.

This failure message can be useful in e.g. the case where libdrm is an
optional wrap fallback in another project.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2022-09-11 01:49:42 -04:00
Simon Ser
fb5c0c301a build: bump to version 2.4.113
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-31 16:38:38 +02:00
Sui Jingfeng
33f0009de5 meson: auto-enable etnaviv on arm, arc, mips and loongarch architectures
There is a Vivante GC1000 gpu in LS2K1000 and LS7A1000.

LS7A1000 is a bridge chip made by Loongson corporation
which act as north and/or south bridge of loongson's
desktop and server level processor. It is equivalent
to RS780E or something like that. In fact, the company
use RS780E as bridge of LS3A3000 at its early stage,
but as RS780E is out of stock long long time ago, the
company have to made one by themself. More details can
be read from its user manual[1].

This bridge chip typically use with LS3A3000, LS3A4000
and LS3A5000.

LS3A3000 is 4 core 1.45gHz mips64r2 compatible cpu.
LS3A4000 is 4 core 1.8gHz mips64r5 compatible cpu.
LS3A5000 is 4 core 2.5gHz loongarch cpu, the company
acclaim that loongarch a new archtecture with its
instruction set is released[2].

LS2K1000 is a double core 1.0Ghz mips64r2 compatible SoC[3].

we need to enable it to test and developing driver on above
listed archtecture.

[1] https://loongson.github.io/LoongArch-Documentation/Loongson-7A1000-usermanual-EN.html
[2] https://loongson.github.io/LoongArch-Documentation/Loongson-3A5000-usermanual-EN.html
[3] https://wiki.debian.org/InstallingDebianOn/Lemote/Loongson2K1000

Signed-off-by: Sui Jingfeng <15330273260@189.cn>

[Eric: rebase over meson changes, add ARM & ARC architectures, and drop
"experimental" from the description]
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2022-08-30 16:03:36 +01:00
Eric Engestrom
a64a176cfd meson: simplify some more build options by using features
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-08-23 18:52:16 +01:00
Eric Engestrom
26eb15165b meson: convert auto combos into proper features
Allows users to easily enable everything (eg. packagers), or select just
the drivers they want with something like:
    -D auto-features=disabled -D amdgpu=enabled

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-08-23 18:52:16 +01:00
Eric Engestrom
502f64cb30 meson: fix value of auto for a bunch of drivers
You can't have an error if your driver is requested by you're missing
a dep, but then happily build that driver without the dep in `auto`.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2022-08-22 21:06:22 +01:00
Simon Zeni
46d1e99a5d build: make tests optional
Building the project as a meson subproject, meson inherits the warning level
from the parent project. Making the tests optional bypasses that issue and
reduces build time.

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-08-18 09:58:41 +00:00
Stephan Lachnit
40fcca248b
build: set c_std to c11
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2022-07-25 17:37:32 +02:00
Simon Ser
60cf6bcef1 build: bump version to 2.4.112
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-07-06 10:43:38 +02:00
Dave Airlie
f801b07a60 build: bump version to 2.4.111
Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-06-03 14:04:41 +10:00
Daniel Stone
2b997bb4bb libkms: Remove libkms completely
libkms was a very early attempt at a KMS management library, that only
got as far as handling requests to create buffers. It has since been
superseded by GBM in doing this, which everyone uses, unlike libkms
which no-one uses.

Remove it from the tree to avoid any confusion.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2022-04-15 22:40:29 +00:00
Samuel Pitoiset
56f81e6776 build: bump version to 2.4.110
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2022-02-16 11:00:13 +01:00
Dylan Baker
7aede93ef9 meson: use summary() instead of message
It's cleaner, it's nicer looking, and it's a nice builtin.

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:20:47 -08:00
Dylan Baker
cc16120543 meson: use the modern interface for pkg.generate
This produces no differences in the generated output. I've had to
manually add `requires : 'libdrm'` to libdrm_intel, otherwise libdrm
ends up in `Requires.private` instead of `Requires`.

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:20:40 -08:00
Dylan Baker
38c568775e meson: use cc.has_function_attribute instead of open coding
It's less code, and also allows meson to short circuit for compilers is
knows don't support this.

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:08:23 -08:00
Dylan Baker
f9539d4128 meson: use cc.check_header instead of open coding
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:08:23 -08:00
Dylan Baker
52b96a6fbf meson: use more standard formatting for better readability
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:08:23 -08:00
Dylan Baker
eaf234c148 meson: switch to cc.get_supported_arguments
This is generally faster, as meson is able to parallelize the checks for
us.

This also removes the workaround for checking gcc/clang -Wno-*
arguments, which meson now handles internally so we don't need to handle
it ourselves.

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:07:55 -08:00
Dylan Baker
6b0b493555 meson: switch the meson builtin for symbol visiblity
This allows meson to check if the compiler supports gnu style symbol
visibility, and apply the appropriate flags as necessary, rather than us
adding them by hand

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20 10:07:18 -08:00
Eric Engestrom
63d06ad3c3 use standard __typeof__() instead of GNU extension typeof()
And switch to c_std=c99. This simplifies using libdrm as a meson
subproject for mesa.

v2: (dylan)
  - switch to c99 as the standard
  - Fix amdgpu security tests as well

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Emma Anholt <emma@anholt.net>
2022-01-19 16:08:31 -08:00
Dylan Baker
d9188a7750 meson: add override_dependency when possible
This allows consumers of libdrm as a subproject to use the simpler
`dependency('libdrm', fallback : 'libdrm')` syntax, as the libdrm build
files already tell meson that they override a dependency called
"libdrm".

Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2021-12-14 00:20:40 +00:00
Dylan Baker
9324e4f054 meson: use dictionary kwargs
So we don't have to duplicate the libdrm library call just to not set
the version keyword for android

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
2021-12-14 00:20:40 +00:00
Simon Ser
febfe0addd build: bump version to 2.4.109 2021-11-25 21:33:02 +01:00
Simon Ser
d76c387125 build: bump version to 2.4.108
Signed-off-by: Simon Ser <contact@emersion.fr>
2021-11-08 17:35:03 +01:00
Eric Anholt
e6fb9ccf2a meson: Don't build libkms for Android.
Nobody wants that that I know of.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2021-07-30 10:58:11 -07:00