-
Notifications
You must be signed in to change notification settings - Fork 9
/
0001-HACKS-TO-GET-RPM-TO-CROSS-COMPILE.patch
78 lines (68 loc) · 2.54 KB
/
0001-HACKS-TO-GET-RPM-TO-CROSS-COMPILE.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
diff -ur rpm-b22f9609d82625ec451d48515d6d318c5bf72d83.old/configure.ac rpm-b22f9609d82625ec451d48515d6d318c5bf72d83/configure.ac
--- rpm-b22f9609d82625ec451d48515d6d318c5bf72d83.old/configure.ac 2017-12-15 14:24:50.000000000 +0000
+++ rpm-b22f9609d82625ec451d48515d6d318c5bf72d83/configure.ac 2017-12-27 16:09:22.915974474 +0000
@@ -253,6 +253,8 @@
#=================
# Check for libelf library. Prefer external, otherwise none.
+old_LIBS="$LIBS"
+LIBS="-lz"
WITH_LIBELF_LIB=
AC_CHECK_HEADER([libelf.h])
AC_CHECK_HEADERS([gelf.h], [
@@ -264,6 +266,7 @@
])
AC_SUBST(WITH_LIBELF_LIB)
AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes])
+LIBS="$old_LIBS"
AC_CHECK_HEADERS([dwarf.h], [
WITH_LIBDWARF=yes
@@ -428,6 +431,8 @@
WITH_MAGIC_INCLUDE=
WITH_MAGIC_LIB=
+old_LIBS="$LIBS"
+LIBS="-lz"
AC_CHECK_HEADER([magic.h], [
AC_CHECK_LIB(magic, magic_open, [
WITH_MAGIC_INCLUDE=
@@ -438,6 +443,7 @@
],[
AC_MSG_ERROR([missing required header magic.h])
])
+LIBS="$old_LIBS"
AC_SUBST(WITH_MAGIC_INCLUDE)
AC_SUBST(WITH_MAGIC_LIB)
@@ -481,6 +487,7 @@
AC_MSG_ERROR([missing required header archive.h])
])
])
+LIBS="$old_LIBS"
AC_SUBST(WITH_ARCHIVE_INCLUDE)
AC_SUBST(WITH_ARCHIVE_LIB)
@@ -490,6 +497,8 @@
# Check for elfutils libdw library with dwelf_elf_gnu_build_id.
WITH_LIBDW_LIB=
HAVE_LIBDW_STRTAB=
+old_LIBS="$LIBS"
+LIBS="-lz -llzma -lelf"
AS_IF([test "$WITH_LIBELF" = yes],[
AC_CHECK_HEADERS([elfutils/libdwelf.h],[
# dwelf_elf_gnu_build_id was introduced in elfutils 0.159
diff -ur rpm-b22f9609d82625ec451d48515d6d318c5bf72d83.old/Makefile.am rpm-b22f9609d82625ec451d48515d6d318c5bf72d83/Makefile.am
--- rpm-b22f9609d82625ec451d48515d6d318c5bf72d83.old/Makefile.am 2017-12-15 14:24:50.000000000 +0000
+++ rpm-b22f9609d82625ec451d48515d6d318c5bf72d83/Makefile.am 2017-12-27 16:12:46.551760368 +0000
@@ -175,7 +175,7 @@
rpmlibexec_PROGRAMS += sepdebugcrcfix
sepdebugcrcfix_SOURCES = tools/sepdebugcrcfix.c
-sepdebugcrcfix_LDADD = @WITH_LIBELF_LIB@
+sepdebugcrcfix_LDADD = @WITH_LIBELF_LIB@ -lz
endif #LIBELF
rpmlibexec_PROGRAMS += rpmdeps
diff -ur rpm-b22f9609d82625ec451d48515d6d318c5bf72d83.old/tools/sepdebugcrcfix.c rpm-b22f9609d82625ec451d48515d6d318c5bf72d83/tools/sepdebugcrcfix.c
--- rpm-b22f9609d82625ec451d48515d6d318c5bf72d83.old/tools/sepdebugcrcfix.c 2017-12-15 14:24:50.000000000 +0000
+++ rpm-b22f9609d82625ec451d48515d6d318c5bf72d83/tools/sepdebugcrcfix.c 2017-12-27 16:08:43.155020246 +0000
@@ -15,6 +15,8 @@
/* Version 2013-06-24. */
+#include "system.h"
+
#define _GNU_SOURCE
#include "system.h"