git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #63999 from dingxiangfei2009/appamor-cross-compile
066491cJoachim F
pkgs/os-specific/linux/apparmor/cross.patchnew file+19
@@ -0,0 +1,19 @@
1+--- a/parser/libapparmor_re/Makefile 2018-10-14 07:38:06.000000000 +0800
2++++ b/parser/libapparmor_re/Makefile 2019-06-28 16:16:33.741916660 +0800
3+@@ -10,6 +10,7 @@
4+
5+ TARGET=libapparmor_re.a
6+
7++AR ?= ar
8+ CFLAGS ?= -g -Wall -O2 ${EXTRA_CFLAGS} -std=gnu++0x
9+ CXXFLAGS := ${CFLAGS} ${INCLUDE_APPARMOR}
10+
11+@@ -22,7 +23,7 @@
12+ UNITTESTS = tst_parse
13+
14+ libapparmor_re.a: parse.o expr-tree.o hfa.o chfa.o aare_rules.o
15+- ar ${ARFLAGS} $@ $^
16++ ${AR} ${ARFLAGS} $@ $^
17+
18+ expr-tree.o: expr-tree.cc expr-tree.h
19+
pkgs/os-specific/linux/apparmor/default.nix+4−2
@@ -49,7 +49,9 @@ let
49 sha256 = "1m4dx901biqgnr4w4wz8a2z9r9dxyw7wv6m6mqglqwf2lxinqmp4";
49 sha256 = "1m4dx901biqgnr4w4wz8a2z9r9dxyw7wv6m6mqglqwf2lxinqmp4";
50 })
50 })
51 # (alpine patches {1,4,5,6,8} are needed for apparmor 2.11, but not 2.12)
51 # (alpine patches {1,4,5,6,8} are needed for apparmor 2.11, but not 2.12)
52+ ] ++ [
53+ ./cross.patch
52− ];
54+ ];
53
55
54 # Set to `true` after the next FIXME gets fixed or this gets some
56 # Set to `true` after the next FIXME gets fixed or this gets some
55 # common derivation infra. Too much copy-paste to fix one by one.
57 # common derivation infra. Too much copy-paste to fix one by one.
@@ -185,7 +187,7 @@ let
185 '';
187 '';
186 inherit patches;
188 inherit patches;
187 postPatch = "cd ./parser";
189 postPatch = "cd ./parser";
188− makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include'';
190+ makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include AR=${stdenv.cc.bintools.targetPrefix}ar'';
189 installFlags = ''DESTDIR=$(out) DISTRO=unknown'';
191 installFlags = ''DESTDIR=$(out) DISTRO=unknown'';
190
192
191 inherit doCheck;
193 inherit doCheck;