mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 03:27:41 +00:00
libvpx: fix cross-compilation
This is done by removing some warnings that are not supported by the cross-compiler. We also need to disable the --enable-external-build flag, which breaks the build completely. This PR: https://github.com/NixOS/nixpkgs/pull/100210 added the flag, but it doesn't explain why it was added. It also doesn't show any attempt at trying to cross-compile for either darwin or aarch64. So let's remove it again, since it 'just' seems to break the build anyway. - drop commented out configure flags - be (more) explicit in patchShebangs - libvpx_1_8: be explicit about patchShebangs, remove commented flags
This commit is contained in:
parent
c219b5eea4
commit
7907718faf
@ -69,7 +69,14 @@ stdenv.mkDerivation rec {
|
||||
# ./CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch
|
||||
];
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
postPatch = ''
|
||||
patchShebangs --build \
|
||||
build/make/*.sh \
|
||||
build/make/*.pl \
|
||||
build/make/*.pm \
|
||||
test/*.sh \
|
||||
configure
|
||||
'';
|
||||
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
setOutputFlags = false;
|
||||
@ -135,11 +142,6 @@ stdenv.mkDerivation rec {
|
||||
experimentalFpMbStatsSupport ||
|
||||
experimentalEmulateHardwareSupport) "experimental")
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
#"--extra-cflags="
|
||||
#"--extra-cxxflags="
|
||||
#"--prefix="
|
||||
#"--libc="
|
||||
#"--libdir="
|
||||
"--enable-external-build"
|
||||
# libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
|
||||
# See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
|
||||
|
@ -65,7 +65,21 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-EZP33U10fchyqy7Jr26vHgUUfWR6xtG3fcMWUII0m9w=";
|
||||
};
|
||||
|
||||
postPatch = "patchShebangs .";
|
||||
postPatch = ''
|
||||
patchShebangs --build \
|
||||
build/make/*.sh \
|
||||
build/make/*.pl \
|
||||
build/make/*.pm \
|
||||
test/*.sh \
|
||||
configure
|
||||
|
||||
# When cross-compiling (for aarch64-multiplatform), the compiler errors out on these flags.
|
||||
# Since they're 'just' warnings, it's fine to just remove them.
|
||||
substituteInPlace configure \
|
||||
--replace "check_add_cflags -Wparentheses-equality" "" \
|
||||
--replace "check_add_cflags -Wunreachable-code-loop-increment" "" \
|
||||
--replace "check_cflags -Wshorten-64-to-32 && add_cflags_only -Wshorten-64-to-32" ""
|
||||
'';
|
||||
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
setOutputFlags = false;
|
||||
@ -131,12 +145,6 @@ stdenv.mkDerivation rec {
|
||||
experimentalFpMbStatsSupport ||
|
||||
experimentalEmulateHardwareSupport) "experimental")
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
#"--extra-cflags="
|
||||
#"--extra-cxxflags="
|
||||
#"--prefix="
|
||||
#"--libc="
|
||||
#"--libdir="
|
||||
"--enable-external-build"
|
||||
# libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
|
||||
# See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
|
||||
# Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
|
||||
|
Loading…
Reference in New Issue
Block a user