Merge pull request #156302 from NickCao/judy
judy: fix cross compilation
This commit is contained in:
commit
74bc2aab42
2 changed files with 26 additions and 6 deletions
22
pkgs/development/libraries/judy/cross.patch
Normal file
22
pkgs/development/libraries/judy/cross.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- a/src/Judy1/Makefile.am
|
||||
+++ b/src/Judy1/Makefile.am
|
||||
@@ -18,7 +18,7 @@
|
||||
libinline_la_CFLAGS = $(AM_CFLAGS) -DJUDYGETINLINE
|
||||
|
||||
Judy1Tables.c: Judy1TablesGen.c
|
||||
- $(CC) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o Judy1TablesGen Judy1TablesGen.c; ./Judy1TablesGen
|
||||
+ $(CC_FOR_BUILD) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o Judy1TablesGen Judy1TablesGen.c; ./Judy1TablesGen
|
||||
|
||||
Judy1ByCount.c:../JudyCommon/JudyByCount.c
|
||||
cp -f ../JudyCommon/JudyByCount.c Judy1ByCount.c
|
||||
--- a/src/JudyL/Makefile.am
|
||||
+++ b/src/JudyL/Makefile.am
|
||||
@@ -18,7 +18,7 @@
|
||||
libinline_la_CFLAGS = $(AM_CFLAGS) -DJUDYGETINLINE
|
||||
|
||||
JudyLTables.c: JudyLTablesGen.c
|
||||
- $(CC) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o JudyLTablesGen JudyLTablesGen.c; ./JudyLTablesGen
|
||||
+ $(CC_FOR_BUILD) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o JudyLTablesGen JudyLTablesGen.c; ./JudyLTablesGen
|
||||
|
||||
JudyLByCount.c: ../JudyCommon/JudyByCount.c
|
||||
cp -f ../JudyCommon/JudyByCount.c JudyLByCount.c
|
|
@ -1,4 +1,4 @@
|
|||
{lib, stdenv, fetchurl}:
|
||||
{ lib, stdenv, fetchurl, pkgsBuildBuild, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "judy";
|
||||
|
@ -9,11 +9,9 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1sv3990vsx8hrza1mvq3bhvv9m6ff08y4yz7swn6znszz24l0w6j";
|
||||
};
|
||||
|
||||
# gcc 4.8 optimisations break judy.
|
||||
# https://sourceforge.net/p/judy/mailman/message/31995144/
|
||||
preConfigure = lib.optionalString stdenv.cc.isGNU ''
|
||||
configureFlagsArray+=("CFLAGS=-fno-strict-aliasing -fno-aggressive-loop-optimizations")
|
||||
'';
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
depsBuildBuild = [ pkgsBuildBuild.stdenv.cc ];
|
||||
patches = [ ./cross.patch ];
|
||||
|
||||
# Disable parallel builds as manpages lack some dependencies:
|
||||
# ../tool/jhton ext/JudyHS_funcs_3.htm | grep -v '^[ ]*$' | sed -e 's/\.C//' > man/man3/JudyHS_funcs
|
||||
|
|
Loading…
Reference in a new issue