aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libtool/patches/000-relocatable.patch
blob: a5fa04069663c9dc39a37c1f0fb29944620e948f (plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
--- a/libltdl/config/general.m4sh
+++ b/libltdl/config/general.m4sh
@@ -45,15 +45,22 @@ progpath="$0"
 M4SH_VERBATIM([[
 : ${CP="cp -f"}
 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="@EGREP@"}
-: ${FGREP="@FGREP@"}
-: ${GREP="@GREP@"}
 : ${LN_S="@LN_S@"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="@SED@"}
+if test -n "$STAGING_DIR_HOST"; then
+	: ${EGREP="$STAGING_DIR_HOST/bin/grep -E"}
+	: ${FGREP="$STAGING_DIR_HOST/bin/grep -F"}
+	: ${GREP="$STAGING_DIR_HOST/bin/grep"}
+	: ${SED="$STAGING_DIR_HOST/bin/sed"}
+else
+	: ${EGREP="@EGREP@"}
+	: ${FGREP="@FGREP@"}
+	: ${GREP="@GREP@"}
+	: ${SED="@SED@"}
+fi
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
--- a/libtoolize.in
+++ b/libtoolize.in
@@ -334,15 +334,22 @@ as_unset=as_fn_unset
 
 : ${CP="cp -f"}
 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="@EGREP@"}
-: ${FGREP="@FGREP@"}
-: ${GREP="@GREP@"}
 : ${LN_S="@LN_S@"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="@SED@"}
+if test -n "$STAGING_DIR_HOST"; then
+	: ${EGREP="$STAGING_DIR_HOST/bin/grep -E"}
+	: ${FGREP="$STAGING_DIR_HOST/bin/grep -F"}
+	: ${GREP="$STAGING_DIR_HOST/bin/grep"}
+	: ${SED="$STAGING_DIR_HOST/bin/sed"}
+else
+	: ${EGREP="@EGREP@"}
+	: ${FGREP="@FGREP@"}
+	: ${GREP="@GREP@"}
+	: ${SED="@SED@"}
+fi
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
@@ -2487,10 +2494,17 @@ func_check_macros ()
 
   # Locations for important files:
   prefix=@prefix@
-  datadir=@datadir@
-  pkgdatadir=@pkgdatadir@
-  pkgltdldir=@pkgdatadir@
-  aclocaldir=@aclocaldir@
+  if test -n "$STAGING_DIR_HOST"; then
+    datadir="$STAGING_DIR_HOST/share"
+    pkgdatadir="$STAGING_DIR_HOST/share/libtool"
+    pkgltdldir="$STAGING_DIR_HOST/share/libtool"
+    aclocaldir="$STAGING_DIR_HOST/share/aclocal"
+  else
+    datadir=@datadir@
+    pkgdatadir=@pkgdatadir@
+    pkgltdldir=@pkgdatadir@
+    aclocaldir=@aclocaldir@
+  fi
   auxdir=
   macrodir=
   configure_ac=configure.in
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -1453,10 +1453,17 @@ func_check_macros ()
 
   # Locations for important files:
   prefix=@prefix@
-  datadir=@datadir@
-  pkgdatadir=@pkgdatadir@
-  pkgltdldir=@pkgdatadir@
-  aclocaldir=@aclocaldir@
+  if test -n "$STAGING_DIR_HOST"; then
+    datadir="$STAGING_DIR_HOST/share"
+    pkgdatadir="$STAGING_DIR_HOST/share/libtool"
+    pkgltdldir="$STAGING_DIR_HOST/share/libtool"
+    aclocaldir="$STAGING_DIR_HOST/share/aclocal"
+  else
+    datadir=@datadir@
+    pkgdatadir=@pkgdatadir@
+    pkgltdldir=@pkgdatadir@
+    aclocaldir=@aclocaldir@
+  fi
   auxdir=
   macrodir=
   configure_ac=configure.in
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -909,7 +909,7 @@ m4_defun([_LT_TAG_COMPILER],
 [AC_REQUIRE([AC_PROG_CC])dnl
 
 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/include"], [LTCC compiler flags])dnl
 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
 
@@ -7660,9 +7660,9 @@ m4_defun([_LT_DECL_EGREP],
 [AC_REQUIRE([AC_PROG_EGREP])dnl
 AC_REQUIRE([AC_PROG_FGREP])dnl
 test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
+_LT_DECL([], [GREP], ["\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/bin/grep"], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], ["\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/bin/grep -E"], [An ERE matcher])
+_LT_DECL([], [FGREP], ["\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/bin/grep -F"], [A literal string matcher])
 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
 AC_SUBST([GREP])
 ])
@@ -7695,9 +7695,8 @@ AC_SUBST([DLLTOOL])
 # as few characters as possible.  Prefer GNU sed if found.
 m4_defun([_LT_DECL_SED],
 [AC_PROG_SED
-test -z "$SED" && SED=sed
 Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [SED], ["\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/bin/sed"], [A sed program that does not truncate output])
 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
 ])# _LT_DECL_SED