2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-24 06:33:42 +00:00
nixpkgs/pkgs/development/libraries/libomxil-bellagio/default.nix
Sergei Trofimovich fb106ee08b libomxil-bellagio: fix build failures against -fno-common compiler
On vanilla gcc-10 (and gcc-9 -fno-common) build fails as:

```
../libtool --tag=CC   --mode=link gcc ... -o libomxil-bellagio.la ...
ld: .libs/libomxil_bellagio_la-omx_reference_resource_manager.o:(.bss+0x18):
  multiple definition of `globalIndex';
    .libs/libomxil_bellagio_la-st_static_component_loader.o:(.bss+0x358):
      first defined here
```

Upstream gcc-10 changed the default from -fcommon to fno-common:
    https://gcc.gnu.org/PR85678.

The error also happens if CFLAGS=-fno-common passed explicitly.
2021-09-25 18:45:52 +01:00

33 lines
1014 B
Nix

{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "libomxil-bellagio";
version = "0.9.3";
src = fetchurl {
url = "mirror://sourceforge/omxil/omxil/Bellagio%20${version}/${pname}-${version}.tar.gz";
sha256 = "0k6p6h4npn8p1qlgq6z3jbfld6n1bqswzvxzndki937gr0lhfg2r";
};
configureFlags =
lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_func_malloc_0_nonnull=yes" ];
patches = [
./fedora-fixes.patch
./fno-common.patch
];
doCheck = false; # fails
# Fix for #40213, probably permanent, because upstream doesn't seem to be
# developed anymore. Alternatively, gcc7Stdenv could be used.
NIX_CFLAGS_COMPILE = "-Wno-error=array-bounds -Wno-error=stringop-overflow=8";
meta = with lib; {
homepage = "https://sourceforge.net/projects/omxil/";
description = "An opensource implementation of the Khronos OpenMAX Integration Layer API to access multimedia components";
license = licenses.lgpl21;
platforms = platforms.linux;
};
}