gnu: http-server: Fix build on i686-linux.
[jackhill/guix/guix.git] / gnu / packages / patches / gcc-7-cross-toolexeclibdir.patch
CommitLineData
53de3e74
MO
1From 46339bdf619b93dfa05d5f004d062671d3dc26d2 Mon Sep 17 00:00:00 2001
2From: Mathieu Othacehe <m.othacehe@gmail.com>
3Date: Tue, 24 Mar 2020 13:50:56 +0100
4Subject: [PATCH] toolexec
5
6---
7 gcc/doc/install.texi | 4 ++++
8 libatomic/configure | 33 ++++++++++++++++++++++---
9 libffi/configure | 33 ++++++++++++++++++++++---
10 libgcc/configure | 38 +++++++++++++++++++++++++++--
11 libgomp/configure | 33 ++++++++++++++++++++++---
12 libhsail-rt/configure | 33 ++++++++++++++++++++++---
13 libitm/configure | 33 ++++++++++++++++++++++---
14 liboffloadmic/configure | 33 ++++++++++++++++++++++---
15 liboffloadmic/plugin/configure | 33 ++++++++++++++++++++++---
16 libquadmath/configure | 33 ++++++++++++++++++++++---
17 libsanitizer/configure | 33 ++++++++++++++++++++++---
18 libssp/configure | 33 ++++++++++++++++++++++---
19 libstdc++-v3/configure | 44 ++++++++++++++++++++++++++--------
20 13 files changed, 374 insertions(+), 42 deletions(-)
21
22diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
23index 77ba08d3f21..28cb6d88da8 100644
24--- a/gcc/doc/install.texi
25+++ b/gcc/doc/install.texi
26@@ -2083,6 +2083,10 @@ shorthand for
27 The following options only apply to building cross compilers.
28
29 @table @code
30+@item --with-toolexeclibdir=@var{dir}
31+Specify the installation directory for libraries built with a cross compiler.
32+The default is @option{$@{gcc_tooldir@}/lib}.
33+
34 @item --with-sysroot
35 @itemx --with-sysroot=@var{dir}
36 Tells GCC to consider @var{dir} as the root of a tree that contains
37diff --git a/libatomic/configure b/libatomic/configure
38index 2ae9b8d40f3..0fa531ec4a3 100755
39--- a/libatomic/configure
40+++ b/libatomic/configure
41@@ -755,6 +755,7 @@ enable_option_checking
42 enable_version_specific_runtime_libs
43 enable_generated_files_in_srcdir
44 enable_multilib
45+with_toolexeclibdir
46 enable_dependency_tracking
47 enable_shared
48 enable_static
49@@ -1414,6 +1415,9 @@ Optional Features:
50 Optional Packages:
51 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
52 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
53+ --with-toolexeclibdir=DIR
54+ install libraries built with a cross compiler within
55+ DIR
56 --with-pic try to use only PIC/non-PIC objects [default=use
57 both]
58 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
59@@ -3185,6 +3189,22 @@ fi
60 ac_config_commands="$ac_config_commands default-1"
61
62
63+
64+# Check whether --with-toolexeclibdir was given.
65+if test "${with_toolexeclibdir+set}" = set; then :
66+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
67+ /)
68+ ;;
69+ */)
70+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
71+ ;;
72+esac
73+else
74+ with_toolexeclibdir=no
75+fi
76+
77+
78+
79 # Calculate toolexeclibdir
80 # Also toolexecdir, though it's only used in toolexeclibdir
81 case ${enable_version_specific_runtime_libs} in
82@@ -3200,7 +3220,14 @@ case ${enable_version_specific_runtime_libs} in
83 test x"$with_cross_host" != x"no"; then
84 # Install a library built with a cross compiler in tooldir, not libdir.
85 toolexecdir='$(exec_prefix)/$(target_alias)'
86- toolexeclibdir='$(toolexecdir)/lib'
87+ case ${with_toolexeclibdir} in
88+ no)
89+ toolexeclibdir='$(toolexecdir)/lib'
90+ ;;
91+ *)
92+ toolexeclibdir=${with_toolexeclibdir}
93+ ;;
94+ esac
95 else
96 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
97 toolexeclibdir='$(libdir)'
98@@ -11115,7 +11142,7 @@ else
99 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
100 lt_status=$lt_dlunknown
101 cat > conftest.$ac_ext <<_LT_EOF
102-#line 11118 "configure"
103+#line 11145 "configure"
104 #include "confdefs.h"
105
106 #if HAVE_DLFCN_H
107@@ -11221,7 +11248,7 @@ else
108 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
109 lt_status=$lt_dlunknown
110 cat > conftest.$ac_ext <<_LT_EOF
111-#line 11224 "configure"
112+#line 11251 "configure"
113 #include "confdefs.h"
114
115 #if HAVE_DLFCN_H
116diff --git a/libffi/configure b/libffi/configure
117index 790a291011f..6e37039e84c 100755
118--- a/libffi/configure
119+++ b/libffi/configure
120@@ -777,6 +777,7 @@ enable_debug
121 enable_structs
122 enable_raw_api
123 enable_purify_safety
124+with_toolexeclibdir
125 enable_symvers
126 with_gcc_major_version_only
127 '
128@@ -1436,6 +1437,9 @@ Optional Packages:
129 --with-pic try to use only PIC/non-PIC objects [default=use
130 both]
131 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
132+ --with-toolexeclibdir=DIR
133+ install libraries built with a cross compiler within
134+ DIR
135 --with-gcc-major-version-only
136 use only GCC major number in filesystem paths
137
138@@ -11390,7 +11394,7 @@ else
139 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
140 lt_status=$lt_dlunknown
141 cat > conftest.$ac_ext <<_LT_EOF
142-#line 11393 "configure"
143+#line 11397 "configure"
144 #include "confdefs.h"
145
146 #if HAVE_DLFCN_H
147@@ -11496,7 +11500,7 @@ else
148 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
149 lt_status=$lt_dlunknown
150 cat > conftest.$ac_ext <<_LT_EOF
151-#line 11499 "configure"
152+#line 11507 "configure"
153 #include "confdefs.h"
154
155 #if HAVE_DLFCN_H
156@@ -16002,10 +16006,33 @@ $as_echo "#define USING_PURIFY 1" >>confdefs.h
157 fi
158
159
160+
161+# Check whether --with-toolexeclibdir was given.
162+if test "${with_toolexeclibdir+set}" = set; then :
163+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
164+ /)
165+ ;;
166+ */)
167+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
168+ ;;
169+esac
170+else
171+ with_toolexeclibdir=no
172+fi
173+
174+
175+
176 if test -n "$with_cross_host" &&
177 test x"$with_cross_host" != x"no"; then
178 toolexecdir='$(exec_prefix)/$(target_alias)'
179- toolexeclibdir='$(toolexecdir)/lib'
180+ case ${with_toolexeclibdir} in
181+ no)
182+ toolexeclibdir='$(toolexecdir)/lib'
183+ ;;
184+ *)
185+ toolexeclibdir=${with_toolexeclibdir}
186+ ;;
187+ esac
188 else
189 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
190 toolexeclibdir='$(libdir)'
191diff --git a/libgcc/configure b/libgcc/configure
192index 441601a1f76..976827dc57e 100644
193--- a/libgcc/configure
194+++ b/libgcc/configure
195@@ -669,6 +669,7 @@ enable_shared
196 enable_vtable_verify
197 with_aix_soname
198 enable_version_specific_runtime_libs
199+with_toolexeclibdir
200 with_slibdir
201 enable_maintainer_mode
202 with_build_libsubdir
203@@ -1329,6 +1330,9 @@ Optional Packages:
204 --with-aix-soname=aix|svr4|both
205 shared library versioning (aka "SONAME") variant to
206 provide on AIX
207+ --with-toolexeclibdir=DIR
208+ install libraries built with a cross compiler within
209+ DIR
210 --with-slibdir=DIR shared libraries in DIR LIBDIR
211 --with-build-libsubdir=DIR Directory where to find libraries for build system
212 --with-system-libunwind use installed libunwind
213@@ -2403,6 +2407,22 @@ fi
214 $as_echo "$version_specific_libs" >&6; }
215
216
217+# Check whether --with-toolexeclibdir was given.
218+if test "${with_toolexeclibdir+set}" = set; then :
219+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
220+ /)
221+ ;;
222+ */)
223+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
224+ ;;
225+esac
226+else
227+ with_toolexeclibdir=no
228+fi
229+
230+
231+
232+
233 # Check whether --with-slibdir was given.
234 if test "${with_slibdir+set}" = set; then :
235 withval=$with_slibdir; slibdir="$with_slibdir"
236@@ -2410,7 +2430,14 @@ else
237 if test "${version_specific_libs}" = yes; then
238 slibdir='$(libsubdir)'
239 elif test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then
240- slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
241+ case ${with_toolexeclibdir} in
242+ no)
243+ slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
244+ ;;
245+ *)
246+ slibdir=${with_toolexeclibdir}
247+ ;;
248+ esac
249 else
250 slibdir='$(libdir)'
251 fi
252@@ -2640,7 +2667,14 @@ case ${version_specific_libs} in
253 test x"$with_cross_host" != x"no"; then
254 # Install a library built with a cross compiler in tooldir, not libdir.
255 toolexecdir='$(exec_prefix)/$(target_noncanonical)'
256- toolexeclibdir='$(toolexecdir)/lib'
257+ case ${with_toolexeclibdir} in
258+ no)
259+ toolexeclibdir='$(toolexecdir)/lib'
260+ ;;
261+ *)
262+ toolexeclibdir=${with_toolexeclibdir}
263+ ;;
264+ esac
265 else
266 toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
267 toolexeclibdir='$(libdir)'
268diff --git a/libgomp/configure b/libgomp/configure
269index 06166c66120..6b3beae0f63 100755
270--- a/libgomp/configure
271+++ b/libgomp/configure
272@@ -782,6 +782,7 @@ enable_option_checking
273 enable_version_specific_runtime_libs
274 enable_generated_files_in_srcdir
275 enable_multilib
276+with_toolexeclibdir
277 enable_dependency_tracking
278 enable_shared
279 enable_static
280@@ -1455,6 +1456,9 @@ Optional Features:
281 Optional Packages:
282 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
283 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
284+ --with-toolexeclibdir=DIR
285+ install libraries built with a cross compiler within
286+ DIR
287 --with-pic try to use only PIC/non-PIC objects [default=use
288 both]
289 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
290@@ -3338,6 +3342,22 @@ fi
291 ac_config_commands="$ac_config_commands default-1"
292
293
294+
295+# Check whether --with-toolexeclibdir was given.
296+if test "${with_toolexeclibdir+set}" = set; then :
297+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
298+ /)
299+ ;;
300+ */)
301+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
302+ ;;
303+esac
304+else
305+ with_toolexeclibdir=no
306+fi
307+
308+
309+
310 # Calculate toolexeclibdir
311 # Also toolexecdir, though it's only used in toolexeclibdir
312 case ${enable_version_specific_runtime_libs} in
313@@ -3353,7 +3373,14 @@ case ${enable_version_specific_runtime_libs} in
314 test x"$with_cross_host" != x"no"; then
315 # Install a library built with a cross compiler in tooldir, not libdir.
316 toolexecdir='$(exec_prefix)/$(target_alias)'
317- toolexeclibdir='$(toolexecdir)/lib'
318+ case ${with_toolexeclibdir} in
319+ no)
320+ toolexeclibdir='$(toolexecdir)/lib'
321+ ;;
322+ *)
323+ toolexeclibdir=${with_toolexeclibdir}
324+ ;;
325+ esac
326 else
327 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
328 toolexeclibdir='$(libdir)'
329@@ -11155,7 +11182,7 @@ else
330 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
331 lt_status=$lt_dlunknown
332 cat > conftest.$ac_ext <<_LT_EOF
333-#line 11158 "configure"
334+#line 11185 "configure"
335 #include "confdefs.h"
336
337 #if HAVE_DLFCN_H
338@@ -11261,7 +11288,7 @@ else
339 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
340 lt_status=$lt_dlunknown
341 cat > conftest.$ac_ext <<_LT_EOF
342-#line 11264 "configure"
343+#line 11295 "configure"
344 #include "confdefs.h"
345
346 #if HAVE_DLFCN_H
347diff --git a/libhsail-rt/configure b/libhsail-rt/configure
348index a4fcc10c1f9..1b4f2a953d0 100755
349--- a/libhsail-rt/configure
350+++ b/libhsail-rt/configure
351@@ -737,6 +737,7 @@ enable_option_checking
352 enable_maintainer_mode
353 enable_dependency_tracking
354 enable_version_specific_runtime_libs
355+with_toolexeclibdir
356 enable_shared
357 enable_static
358 with_pic
359@@ -1395,6 +1396,9 @@ Optional Features:
360 Optional Packages:
361 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
362 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
363+ --with-toolexeclibdir=DIR
364+ install libraries built with a cross compiler within
365+ DIR
366 --with-pic try to use only PIC/non-PIC objects [default=use
367 both]
368 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
369@@ -4418,6 +4422,22 @@ fi
370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_version_specific_runtime_libs" >&5
371 $as_echo "$enable_version_specific_runtime_libs" >&6; }
372
373+
374+# Check whether --with-toolexeclibdir was given.
375+if test "${with_toolexeclibdir+set}" = set; then :
376+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
377+ /)
378+ ;;
379+ */)
380+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
381+ ;;
382+esac
383+else
384+ with_toolexeclibdir=no
385+fi
386+
387+
388+
389 # Calculate toolexeclibdir
390 # Also toolexecdir, though it's only used in toolexeclibdir
391 case ${enable_version_specific_runtime_libs} in
392@@ -4433,7 +4453,14 @@ case ${enable_version_specific_runtime_libs} in
393 test x"$with_cross_host" != x"no"; then
394 # Install a library built with a cross compiler in tooldir, not libdir.
395 toolexecdir='$(exec_prefix)/$(target_alias)'
396- toolexeclibdir='$(toolexecdir)/lib'
397+ case ${with_toolexeclibdir} in
398+ no)
399+ toolexeclibdir='$(toolexecdir)/lib'
400+ ;;
401+ *)
402+ toolexeclibdir=${with_toolexeclibdir}
403+ ;;
404+ esac
405 else
406 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
407 toolexeclibdir='$(libdir)'
408@@ -10973,7 +11000,7 @@ else
409 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
410 lt_status=$lt_dlunknown
411 cat > conftest.$ac_ext <<_LT_EOF
412-#line 10976 "configure"
413+#line 11003 "configure"
414 #include "confdefs.h"
415
416 #if HAVE_DLFCN_H
417@@ -11079,7 +11106,7 @@ else
418 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
419 lt_status=$lt_dlunknown
420 cat > conftest.$ac_ext <<_LT_EOF
421-#line 11082 "configure"
422+#line 11113 "configure"
423 #include "confdefs.h"
424
425 #if HAVE_DLFCN_H
426diff --git a/libitm/configure b/libitm/configure
427index 96c494d4a3f..ed47fab3c83 100644
428--- a/libitm/configure
429+++ b/libitm/configure
430@@ -766,6 +766,7 @@ enable_option_checking
431 enable_version_specific_runtime_libs
432 enable_generated_files_in_srcdir
433 enable_multilib
434+with_toolexeclibdir
435 enable_dependency_tracking
436 enable_shared
437 enable_static
438@@ -1430,6 +1431,9 @@ Optional Features:
439 Optional Packages:
440 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
441 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
442+ --with-toolexeclibdir=DIR
443+ install libraries built with a cross compiler within
444+ DIR
445 --with-pic try to use only PIC/non-PIC objects [default=use
446 both]
447 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
448@@ -3371,6 +3375,22 @@ fi
449 ac_config_commands="$ac_config_commands default-1"
450
451
452+
453+# Check whether --with-toolexeclibdir was given.
454+if test "${with_toolexeclibdir+set}" = set; then :
455+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
456+ /)
457+ ;;
458+ */)
459+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
460+ ;;
461+esac
462+else
463+ with_toolexeclibdir=no
464+fi
465+
466+
467+
468 # Calculate toolexeclibdir
469 # Also toolexecdir, though it's only used in toolexeclibdir
470 case ${enable_version_specific_runtime_libs} in
471@@ -3386,7 +3406,14 @@ case ${enable_version_specific_runtime_libs} in
472 test x"$with_cross_host" != x"no"; then
473 # Install a library built with a cross compiler in tooldir, not libdir.
474 toolexecdir='$(exec_prefix)/$(target_alias)'
475- toolexeclibdir='$(toolexecdir)/lib'
476+ case ${with_toolexeclibdir} in
477+ no)
478+ toolexeclibdir='$(toolexecdir)/lib'
479+ ;;
480+ *)
481+ toolexeclibdir=${with_toolexeclibdir}
482+ ;;
483+ esac
484 else
485 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
486 toolexeclibdir='$(libdir)'
487@@ -11794,7 +11821,7 @@ else
488 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
489 lt_status=$lt_dlunknown
490 cat > conftest.$ac_ext <<_LT_EOF
491-#line 11797 "configure"
492+#line 11824 "configure"
493 #include "confdefs.h"
494
495 #if HAVE_DLFCN_H
496@@ -11900,7 +11927,7 @@ else
497 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
498 lt_status=$lt_dlunknown
499 cat > conftest.$ac_ext <<_LT_EOF
500-#line 11903 "configure"
501+#line 11934 "configure"
502 #include "confdefs.h"
503
504 #if HAVE_DLFCN_H
505diff --git a/liboffloadmic/configure b/liboffloadmic/configure
506index f873716991b..6dfe9e37642 100644
507--- a/liboffloadmic/configure
508+++ b/liboffloadmic/configure
509@@ -739,6 +739,7 @@ enable_maintainer_mode
510 enable_dependency_tracking
511 enable_multilib
512 enable_version_specific_runtime_libs
513+with_toolexeclibdir
514 enable_shared
515 enable_static
516 with_pic
517@@ -1397,6 +1398,9 @@ Optional Features:
518 Optional Packages:
519 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
520 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
521+ --with-toolexeclibdir=DIR
522+ install libraries built with a cross compiler within
523+ DIR
524 --with-pic try to use only PIC/non-PIC objects [default=use
525 both]
526 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
527@@ -5003,6 +5007,22 @@ else
528 fi
529
530
531+
532+# Check whether --with-toolexeclibdir was given.
533+if test "${with_toolexeclibdir+set}" = set; then :
534+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
535+ /)
536+ ;;
537+ */)
538+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
539+ ;;
540+esac
541+else
542+ with_toolexeclibdir=no
543+fi
544+
545+
546+
547 # Calculate toolexeclibdir.
548 # Also toolexecdir, though it's only used in toolexeclibdir.
549 case ${enable_version_specific_runtime_libs} in
550@@ -5018,7 +5038,14 @@ case ${enable_version_specific_runtime_libs} in
551 test x"$with_cross_host" != x"no"; then
552 # Install a library built with a cross compiler in tooldir, not libdir.
553 toolexecdir='$(exec_prefix)/$(target_alias)'
554- toolexeclibdir='$(toolexecdir)/lib'
555+ case ${with_toolexeclibdir} in
556+ no)
557+ toolexeclibdir='$(toolexecdir)/lib'
558+ ;;
559+ *)
560+ toolexeclibdir=${with_toolexeclibdir}
561+ ;;
562+ esac
563 else
564 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
565 toolexeclibdir='$(libdir)'
566@@ -11108,7 +11135,7 @@ else
567 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
568 lt_status=$lt_dlunknown
569 cat > conftest.$ac_ext <<_LT_EOF
570-#line 11111 "configure"
571+#line 11138 "configure"
572 #include "confdefs.h"
573
574 #if HAVE_DLFCN_H
575@@ -11214,7 +11241,7 @@ else
576 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
577 lt_status=$lt_dlunknown
578 cat > conftest.$ac_ext <<_LT_EOF
579-#line 11217 "configure"
580+#line 11248 "configure"
581 #include "confdefs.h"
582
583 #if HAVE_DLFCN_H
584diff --git a/liboffloadmic/plugin/configure b/liboffloadmic/plugin/configure
585index c031eb3e7fa..570758344b4 100644
586--- a/liboffloadmic/plugin/configure
587+++ b/liboffloadmic/plugin/configure
588@@ -735,6 +735,7 @@ enable_maintainer_mode
589 enable_dependency_tracking
590 enable_multilib
591 enable_version_specific_runtime_libs
592+with_toolexeclibdir
593 enable_shared
594 enable_static
595 with_pic
596@@ -1394,6 +1395,9 @@ Optional Features:
597 Optional Packages:
598 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
599 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
600+ --with-toolexeclibdir=DIR
601+ install libraries built with a cross compiler within
602+ DIR
603 --with-pic try to use only PIC/non-PIC objects [default=use
604 both]
605 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
606@@ -4311,6 +4315,22 @@ fi
607 $as_echo "$enable_version_specific_runtime_libs" >&6; }
608
609
610+
611+# Check whether --with-toolexeclibdir was given.
612+if test "${with_toolexeclibdir+set}" = set; then :
613+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
614+ /)
615+ ;;
616+ */)
617+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
618+ ;;
619+esac
620+else
621+ with_toolexeclibdir=no
622+fi
623+
624+
625+
626 # Calculate toolexeclibdir.
627 # Also toolexecdir, though it's only used in toolexeclibdir.
628 case ${enable_version_specific_runtime_libs} in
629@@ -4326,7 +4346,14 @@ case ${enable_version_specific_runtime_libs} in
630 test x"$with_cross_host" != x"no"; then
631 # Install a library built with a cross compiler in tooldir, not libdir.
632 toolexecdir='$(exec_prefix)/$(target_alias)'
633- toolexeclibdir='$(toolexecdir)/lib'
634+ case ${with_toolexeclibdir} in
635+ no)
636+ toolexeclibdir='$(toolexecdir)/lib'
637+ ;;
638+ *)
639+ toolexeclibdir=${with_toolexeclibdir}
640+ ;;
641+ esac
642 else
643 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
644 toolexeclibdir='$(libdir)'
645@@ -10815,7 +10842,7 @@ else
646 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
647 lt_status=$lt_dlunknown
648 cat > conftest.$ac_ext <<_LT_EOF
649-#line 10818 "configure"
650+#line 10845 "configure"
651 #include "confdefs.h"
652
653 #if HAVE_DLFCN_H
654@@ -10921,7 +10948,7 @@ else
655 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
656 lt_status=$lt_dlunknown
657 cat > conftest.$ac_ext <<_LT_EOF
658-#line 10924 "configure"
659+#line 10955 "configure"
660 #include "confdefs.h"
661
662 #if HAVE_DLFCN_H
663diff --git a/libquadmath/configure b/libquadmath/configure
664index 76a2c20b7e1..e887071aeb2 100755
665--- a/libquadmath/configure
666+++ b/libquadmath/configure
667@@ -749,6 +749,7 @@ enable_fast_install
668 with_gnu_ld
669 enable_libtool_lock
670 enable_maintainer_mode
671+with_toolexeclibdir
672 enable_symvers
673 enable_generated_files_in_srcdir
674 with_gcc_major_version_only
675@@ -1408,6 +1409,9 @@ Optional Packages:
676 --with-pic try to use only PIC/non-PIC objects [default=use
677 both]
678 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
679+ --with-toolexeclibdir=DIR
680+ install libraries built with a cross compiler within
681+ DIR
682 --with-gcc-major-version-only
683 use only GCC major number in filesystem paths
684
685@@ -10572,7 +10576,7 @@ else
686 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
687 lt_status=$lt_dlunknown
688 cat > conftest.$ac_ext <<_LT_EOF
689-#line 10575 "configure"
690+#line 10579 "configure"
691 #include "confdefs.h"
692
693 #if HAVE_DLFCN_H
694@@ -10678,7 +10682,7 @@ else
695 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
696 lt_status=$lt_dlunknown
697 cat > conftest.$ac_ext <<_LT_EOF
698-#line 10681 "configure"
699+#line 10689 "configure"
700 #include "confdefs.h"
701
702 #if HAVE_DLFCN_H
703@@ -11917,6 +11921,22 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
704 ac_compiler_gnu=$ac_cv_c_compiler_gnu
705
706
707+
708+# Check whether --with-toolexeclibdir was given.
709+if test "${with_toolexeclibdir+set}" = set; then :
710+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
711+ /)
712+ ;;
713+ */)
714+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
715+ ;;
716+esac
717+else
718+ with_toolexeclibdir=no
719+fi
720+
721+
722+
723 # Calculate toolexeclibdir
724 # Also toolexecdir, though it's only used in toolexeclibdir
725 case ${version_specific_libs} in
726@@ -11932,7 +11952,14 @@ case ${version_specific_libs} in
727 test x"$with_cross_host" != x"no"; then
728 # Install a library built with a cross compiler in tooldir, not libdir.
729 toolexecdir='$(exec_prefix)/$(target_alias)'
730- toolexeclibdir='$(toolexecdir)/lib'
731+ case ${with_toolexeclibdir} in
732+ no)
733+ toolexeclibdir='$(toolexecdir)/lib'
734+ ;;
735+ *)
736+ toolexeclibdir=${with_toolexeclibdir}
737+ ;;
738+ esac
739 else
740 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
741 toolexeclibdir='$(libdir)'
742diff --git a/libsanitizer/configure b/libsanitizer/configure
743index a3a08d635f4..5f4cdcad38d 100755
744--- a/libsanitizer/configure
745+++ b/libsanitizer/configure
746@@ -767,6 +767,7 @@ enable_multilib
747 enable_version_specific_runtime_libs
748 enable_dependency_tracking
749 enable_maintainer_mode
750+with_toolexeclibdir
751 enable_shared
752 enable_static
753 with_pic
754@@ -1425,6 +1426,9 @@ Optional Features:
755 Optional Packages:
756 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
757 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
758+ --with-toolexeclibdir=DIR
759+ install libraries built with a cross compiler within
760+ DIR
761 --with-pic try to use only PIC/non-PIC objects [default=use
762 both]
763 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
764@@ -4773,6 +4777,22 @@ fi
765
766
767
768+
769+# Check whether --with-toolexeclibdir was given.
770+if test "${with_toolexeclibdir+set}" = set; then :
771+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
772+ /)
773+ ;;
774+ */)
775+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
776+ ;;
777+esac
778+else
779+ with_toolexeclibdir=no
780+fi
781+
782+
783+
784 # Calculate toolexeclibdir
785 # Also toolexecdir, though it's only used in toolexeclibdir
786 case ${version_specific_libs} in
787@@ -4788,7 +4808,14 @@ case ${version_specific_libs} in
788 test x"$with_cross_host" != x"no"; then
789 # Install a library built with a cross compiler in tooldir, not libdir.
790 toolexecdir='$(exec_prefix)/$(target_alias)'
791- toolexeclibdir='$(toolexecdir)/lib'
792+ case ${with_toolexeclibdir} in
793+ no)
794+ toolexeclibdir='$(toolexecdir)/lib'
795+ ;;
796+ *)
797+ toolexeclibdir=${with_toolexeclibdir}
798+ ;;
799+ esac
800 else
801 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
802 toolexeclibdir='$(libdir)'
803@@ -12032,7 +12059,7 @@ else
804 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
805 lt_status=$lt_dlunknown
806 cat > conftest.$ac_ext <<_LT_EOF
807-#line 12035 "configure"
808+#line 12062 "configure"
809 #include "confdefs.h"
810
811 #if HAVE_DLFCN_H
812@@ -12138,7 +12165,7 @@ else
813 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
814 lt_status=$lt_dlunknown
815 cat > conftest.$ac_ext <<_LT_EOF
816-#line 12141 "configure"
817+#line 12168 "configure"
818 #include "confdefs.h"
819
820 #if HAVE_DLFCN_H
821diff --git a/libssp/configure b/libssp/configure
822index ee1751d20db..3273cd40ab1 100755
823--- a/libssp/configure
824+++ b/libssp/configure
825@@ -743,6 +743,7 @@ with_pic
826 enable_fast_install
827 with_gnu_ld
828 enable_libtool_lock
829+with_toolexeclibdir
830 with_gcc_major_version_only
831 '
832 ac_precious_vars='build_alias
833@@ -1389,6 +1390,9 @@ Optional Packages:
834 --with-pic try to use only PIC/non-PIC objects [default=use
835 both]
836 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
837+ --with-toolexeclibdir=DIR
838+ install libraries built with a cross compiler within
839+ DIR
840 --with-gcc-major-version-only
841 use only GCC major number in filesystem paths
842
843@@ -10671,7 +10675,7 @@ else
844 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
845 lt_status=$lt_dlunknown
846 cat > conftest.$ac_ext <<_LT_EOF
847-#line 10674 "configure"
848+#line 10678 "configure"
849 #include "confdefs.h"
850
851 #if HAVE_DLFCN_H
852@@ -10777,7 +10781,7 @@ else
853 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
854 lt_status=$lt_dlunknown
855 cat > conftest.$ac_ext <<_LT_EOF
856-#line 10780 "configure"
857+#line 10784 "configure"
858 #include "confdefs.h"
859
860 #if HAVE_DLFCN_H
861@@ -11039,6 +11043,22 @@ esac
862
863
864
865+
866+# Check whether --with-toolexeclibdir was given.
867+if test "${with_toolexeclibdir+set}" = set; then :
868+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
869+ /)
870+ ;;
871+ */)
872+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
873+ ;;
874+esac
875+else
876+ with_toolexeclibdir=no
877+fi
878+
879+
880+
881 # Calculate toolexeclibdir
882 # Also toolexecdir, though it's only used in toolexeclibdir
883 case ${version_specific_libs} in
884@@ -11054,7 +11074,14 @@ case ${version_specific_libs} in
885 test x"$with_cross_host" != x"no"; then
886 # Install a library built with a cross compiler in tooldir, not libdir.
887 toolexecdir='$(exec_prefix)/$(target_alias)'
888- toolexeclibdir='$(toolexecdir)/lib'
889+ case ${with_toolexeclibdir} in
890+ no)
891+ toolexeclibdir='$(toolexecdir)/lib'
892+ ;;
893+ *)
894+ toolexeclibdir=${with_toolexeclibdir}
895+ ;;
896+ esac
897 else
898 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
899 toolexeclibdir='$(libdir)'
900diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
901index de8390703e2..88de3f728d4 100755
902--- a/libstdc++-v3/configure
903+++ b/libstdc++-v3/configure
904@@ -903,6 +903,7 @@ enable_libstdcxx_threads
905 enable_libstdcxx_filesystem_ts
906 with_gxx_include_dir
907 enable_version_specific_runtime_libs
908+with_toolexeclibdir
909 with_gcc_major_version_only
910 '
911 ac_precious_vars='build_alias
912@@ -1623,6 +1624,9 @@ Optional Packages:
913 set the std::string ABI to use by default
914 --with-gxx-include-dir=DIR
915 installation directory for include files
916+ --with-toolexeclibdir=DIR
917+ install libraries built with a cross compiler within
918+ DIR
919 --with-gcc-major-version-only
920 use only GCC major number in filesystem paths
921
922@@ -11606,7 +11610,7 @@ else
923 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
924 lt_status=$lt_dlunknown
925 cat > conftest.$ac_ext <<_LT_EOF
926-#line 11609 "configure"
927+#line 11613 "configure"
928 #include "confdefs.h"
929
930 #if HAVE_DLFCN_H
931@@ -11712,7 +11716,7 @@ else
932 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
933 lt_status=$lt_dlunknown
934 cat > conftest.$ac_ext <<_LT_EOF
935-#line 11715 "configure"
936+#line 11723 "configure"
937 #include "confdefs.h"
938
939 #if HAVE_DLFCN_H
940@@ -15398,7 +15402,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
941 # Fake what AC_TRY_COMPILE does.
942
943 cat > conftest.$ac_ext << EOF
944-#line 15401 "configure"
945+#line 15409 "configure"
946 int main()
947 {
948 typedef bool atomic_type;
949@@ -15433,7 +15437,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
950 rm -f conftest*
951
952 cat > conftest.$ac_ext << EOF
953-#line 15436 "configure"
954+#line 15440 "configure"
955 int main()
956 {
957 typedef short atomic_type;
958@@ -15468,7 +15472,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
959 rm -f conftest*
960
961 cat > conftest.$ac_ext << EOF
962-#line 15471 "configure"
963+#line 15475 "configure"
964 int main()
965 {
966 // NB: _Atomic_word not necessarily int.
967@@ -15504,7 +15508,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
968 rm -f conftest*
969
970 cat > conftest.$ac_ext << EOF
971-#line 15507 "configure"
972+#line 15511 "configure"
973 int main()
974 {
975 typedef long long atomic_type;
976@@ -15585,7 +15589,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
977 # unnecessary for this test.
978
979 cat > conftest.$ac_ext << EOF
980-#line 15588 "configure"
981+#line 15592 "configure"
982 int main()
983 {
984 _Decimal32 d1;
985@@ -15627,7 +15631,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
986 # unnecessary for this test.
987
988 cat > conftest.$ac_ext << EOF
989-#line 15630 "configure"
990+#line 15634 "configure"
991 template<typename T1, typename T2>
992 struct same
993 { typedef T2 type; };
994@@ -15661,7 +15665,7 @@ $as_echo "$enable_int128" >&6; }
995 rm -f conftest*
996
997 cat > conftest.$ac_ext << EOF
998-#line 15664 "configure"
999+#line 15668 "configure"
1000 template<typename T1, typename T2>
1001 struct same
1002 { typedef T2 type; };
1003@@ -81674,6 +81678,19 @@ fi
1004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $version_specific_libs" >&5
1005 $as_echo "$version_specific_libs" >&6; }
1006
1007+# Check whether --with-toolexeclibdir was given.
1008+if test "${with_toolexeclibdir+set}" = set; then :
1009+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
1010+ /)
1011+ ;;
1012+ */)
1013+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
1014+ ;;
1015+esac
1016+else
1017+ with_toolexeclibdir=no
1018+fi
1019+
1020 # Default case for install directory for include files.
1021 if test $version_specific_libs = no && test $gxx_include_dir = no; then
1022 gxx_include_dir='include/c++/${gcc_version}'
1023@@ -81704,7 +81721,14 @@ $as_echo "$version_specific_libs" >&6; }
1024 if test -n "$with_cross_host" &&
1025 test x"$with_cross_host" != x"no"; then
1026 glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
1027- glibcxx_toolexeclibdir='${toolexecdir}/lib'
1028+ case ${with_toolexeclibdir} in
1029+ no)
1030+ glibcxx_toolexeclibdir='${toolexecdir}/lib'
1031+ ;;
1032+ *)
1033+ glibcxx_toolexeclibdir=${with_toolexeclibdir}
1034+ ;;
1035+ esac
1036 else
1037 glibcxx_toolexecdir='${libdir}/gcc/${host_alias}'
1038 glibcxx_toolexeclibdir='${libdir}'
1039--
10402.24.0
1041