cannelloni: needs dynamic library
[buildroot-gz.git] / package / gcc / arc-2015.12 / 851-PR-other-56780.patch
blobfeb433920dbe9d3380850d8d925c254ec4364d1b
1 From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001
2 From: ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Sat, 1 Jun 2013 00:20:49 +0000
4 Subject: [PATCH] PR other/56780
6 * libiberty/configure.ac: Move test for --enable-install-libiberty
7 outside of the 'with_target_subdir' test so that it actually gets
8 run. Add output messages to show the test result.
9 * libiberty/configure: Regenerate.
10 * libiberty/Makefile.in (install_to_libdir): Place the
11 installation of the libiberty library in the same guard as that
12 used for the headers to prevent it being installed unless
13 requested via --enable-install-libiberty.
15 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4
17 libiberty: fix --enable-install-libiberty flag [PR 56780]
19 Commit 199570 fixed the --disable-install-libiberty behavior, but it also
20 added a bug where the enable path never works because the initial clear
21 of target_header_dir wasn't deleted. So we end up initializing properly
22 at the top only to reset it at the end all the time.
24 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4
26 [Romain
27 squash the two upstream commits
28 Remove the ChangeLog]
29 Signed-off-by: Romain Naour <romain.naour@openwide.fr>
30 ---
31 libiberty/Makefile.in | 24 ++++++++++-----------
32 libiberty/configure | 57 +++++++++++++++++++++++++++-----------------------
33 libiberty/configure.ac | 47 ++++++++++++++++++++++-------------------
34 3 files changed, 68 insertions(+), 60 deletions(-)
36 diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
37 index f6a3ebd..75ff82d 100644
38 --- a/libiberty/Makefile.in
39 +++ b/libiberty/Makefile.in
40 @@ -355,19 +355,19 @@ install-strip: install
41 # since it will be passed the multilib flags.
42 MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
43 install_to_libdir: all
44 - ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
45 - $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
46 - ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
47 - mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
48 if test -n "${target_header_dir}"; then \
49 - case "${target_header_dir}" in \
50 - /*) thd=${target_header_dir};; \
51 - *) thd=${includedir}/${target_header_dir};; \
52 - esac; \
53 - ${mkinstalldirs} $(DESTDIR)$${thd}; \
54 - for h in ${INSTALLED_HEADERS}; do \
55 - ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
56 - done; \
57 + ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
58 + $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
59 + ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
60 + mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
61 + case "${target_header_dir}" in \
62 + /*) thd=${target_header_dir};; \
63 + *) thd=${includedir}/${target_header_dir};; \
64 + esac; \
65 + ${mkinstalldirs} $(DESTDIR)$${thd}; \
66 + for h in ${INSTALLED_HEADERS}; do \
67 + ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
68 + done; \
70 @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
72 diff --git a/libiberty/configure b/libiberty/configure
73 index 5367027..4feb95a 100755
74 --- a/libiberty/configure
75 +++ b/libiberty/configure
76 @@ -675,8 +675,8 @@ with_cross_host
77 with_newlib
78 enable_maintainer_mode
79 enable_multilib
80 -enable_largefile
81 enable_install_libiberty
82 +enable_largefile
84 ac_precious_vars='build_alias
85 host_alias
86 @@ -1303,8 +1303,8 @@ Optional Features:
87 enable make rules and dependencies not useful
88 (and sometimes confusing) to the casual installer
89 --enable-multilib build many library versions (default)
90 + --enable-install-libiberty Install headers and library for end users
91 --disable-largefile omit support for large files
92 - --enable-install-libiberty Install headers for end users
94 Optional Packages:
95 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
96 @@ -2784,6 +2784,35 @@ if test $cross_compiling = no && test $multilib = yes \
97 cross_compiling=maybe
100 +# We may wish to install the target headers somewhere.
101 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5
102 +$as_echo_n "checking whether to install libiberty headers and static library... " >&6; }
104 +# Check whether --enable-install-libiberty was given.
105 +if test "${enable_install_libiberty+set}" = set; then :
106 + enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
107 +else
108 + enable_install_libiberty=no
111 +# Option parsed, now set things appropriately.
112 +case x"$enable_install_libiberty" in
113 + xyes|x)
114 + target_header_dir=libiberty
115 + ;;
116 + xno)
117 + target_header_dir=
118 + ;;
119 + *)
120 + # This could be sanity-checked in various ways...
121 + target_header_dir="${enable_install_libiberty}"
122 + ;;
123 +esac
124 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5
125 +$as_echo "$enable_install_libiberty" >&6; }
126 +{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5
127 +$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;}
130 ac_ext=c
131 ac_cpp='$CPP $CPPFLAGS'
132 @@ -5476,7 +5505,6 @@ fi
134 setobjs=
135 CHECK=
136 -target_header_dir=
137 if test -n "${with_target_subdir}"; then
139 # We are being configured as a target library. AC_REPLACE_FUNCS
140 @@ -5759,29 +5787,6 @@ _ACEOF
142 esac
144 - # We may wish to install the target headers somewhere.
145 - # Check whether --enable-install-libiberty was given.
146 -if test "${enable_install_libiberty+set}" = set; then :
147 - enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
148 -else
149 - enable_install_libiberty=no
152 - # Option parsed, now set things appropriately.
153 - case x"$enable_install_libiberty" in
154 - xyes|x)
155 - target_header_dir=libiberty
156 - ;;
157 - xno)
158 - target_header_dir=
159 - ;;
160 - *)
161 - # This could be sanity-checked in various ways...
162 - target_header_dir="${enable_install_libiberty}"
163 - ;;
164 - esac
167 else
169 # Not a target library, so we set things up to run the test suite.
170 diff --git a/libiberty/configure.ac b/libiberty/configure.ac
171 index c763894..f17e6b6 100644
172 --- a/libiberty/configure.ac
173 +++ b/libiberty/configure.ac
174 @@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \
175 cross_compiling=maybe
178 +# We may wish to install the target headers somewhere.
179 +AC_MSG_CHECKING([whether to install libiberty headers and static library])
180 +dnl install-libiberty is disabled by default
182 +AC_ARG_ENABLE(install-libiberty,
183 +[ --enable-install-libiberty Install headers and library for end users],
184 +enable_install_libiberty=$enableval,
185 +enable_install_libiberty=no)dnl
187 +# Option parsed, now set things appropriately.
188 +case x"$enable_install_libiberty" in
189 + xyes|x)
190 + target_header_dir=libiberty
191 + ;;
192 + xno)
193 + target_header_dir=
194 + ;;
195 + *)
196 + # This could be sanity-checked in various ways...
197 + target_header_dir="${enable_install_libiberty}"
198 + ;;
199 +esac
200 +AC_MSG_RESULT($enable_install_libiberty)
201 +AC_MSG_NOTICE([target_header_dir = $target_header_dir])
203 GCC_NO_EXECUTABLES
204 AC_PROG_CC
205 AC_SYS_LARGEFILE
206 @@ -380,7 +405,6 @@ fi
208 setobjs=
209 CHECK=
210 -target_header_dir=
211 if test -n "${with_target_subdir}"; then
213 # We are being configured as a target library. AC_REPLACE_FUNCS
214 @@ -492,27 +516,6 @@ if test -n "${with_target_subdir}"; then
216 esac
218 - # We may wish to install the target headers somewhere.
219 - AC_ARG_ENABLE(install-libiberty,
220 - [ --enable-install-libiberty Install headers for end users],
221 - enable_install_libiberty=$enableval,
222 - enable_install_libiberty=no)dnl
224 - # Option parsed, now set things appropriately.
225 - case x"$enable_install_libiberty" in
226 - xyes|x)
227 - target_header_dir=libiberty
228 - ;;
229 - xno)
230 - target_header_dir=
231 - ;;
232 - *)
233 - # This could be sanity-checked in various ways...
234 - target_header_dir="${enable_install_libiberty}"
235 - ;;
236 - esac
239 else
241 # Not a target library, so we set things up to run the test suite.
243 1.9.3