diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-02-05 11:50:07 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-02-19 17:51:24 +0000 |
commit | 9f1528a1bdb541510c56d48bbd77b50b617cb952 (patch) | |
tree | 107814f61822833d69b295ed83cad840dd4c6079 /config | |
parent | fcaaac0a0d3d46e3c59f87c1445852ac77b6c118 (diff) | |
download | gdb-9f1528a1bdb541510c56d48bbd77b50b617cb952.zip gdb-9f1528a1bdb541510c56d48bbd77b50b617cb952.tar.gz gdb-9f1528a1bdb541510c56d48bbd77b50b617cb952.tar.bz2 |
Merge changes from GCC for the config/ directory
GCC's config/ChangeLog since the last time this merge was done
(in the binutils-gdb commit 0b4d000cc4e8e77c823) is included at the
end of this commit message.
It is worth noting that the binutils-gdb commit 301a9420d947da1458
added the file config/debuginfod.m4 which is not present in GCC's
config/ directory. This file is preserved, unmodified, after this
commit.
In order to regenerate all of the configure files, I configured with
--enable-maintainer-mode, and built the 'all' target. I then did the
same thing on a source tree without this patch, and only committed
those files that changed when this patch was added.
GCC's config/ChangeLog entries:
2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
PR libstdc++/79193
PR libstdc++/88999
* no-executables.m4: Use a non-empty program to test for linker
support.
2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Update shell syntax.
2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
* lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Add new
--with-libXXX-type=... option. Use this to guide the selection of
either a shared library or a static library.
2020-01-24 Maciej W. Rozycki <macro@wdc.com>
* toolexeclibdir.m4: New file.
2019-09-10 Christophe Lyon <christophe.lyon@st.com>
* futex.m4: Handle *-uclinux*.
* tls.m4 (GCC_CHECK_TLS): Likewise.
2019-09-06 Florian Weimer <fweimer@redhat.com>
* futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
function.
2019-07-08 Richard Sandiford <richard.sandiford@arm.com>
* bootstrap-Og.mk: New file.
2019-06-25 Kwok Cheung Yeung <kcy@codesourcery.com>
Andrew Stubbs <ams@codesourcery.com>
* gthr.m4 (GCC_AC_THREAD_HEADER): Add case for gcn.
2019-05-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* ax_count_cpus.m4: New file.
2019-05-02 Richard Biener <rguenther@suse.de>
PR bootstrap/85574
* bootstrap-lto.mk (extra-compare): Set to gcc/lto1$(exeext).
2019-04-16 Martin Liska <mliska@suse.cz>
* bootstrap-lto-lean.mk: Filter out -flto in STAGEtrain_CFLAGS.
2019-04-09 Martin Liska <mliska@suse.cz>
* bootstrap-lto-lean.mk: New file.
2019-03-02 Johannes Pfau <johannespfau@gmail.com>
* mh-mingw: Also set __USE_MINGW_ACCESS flag for C++ code.
2018-10-31 Joseph Myers <joseph@codesourcery.com>
PR bootstrap/82856
* math.m4, tls.m4: Use AC_LANG_SOURCE.
Merge from binutils-gdb:
2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
* override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69.
config/ChangeLog:
* ax_count_cpus.m4: New file, backported from GCC.
* bootstrap-Og.mk: New file, backported from GCC.
* bootstrap-lto-lean.mk: New file, backported from GCC.
* bootstrap-lto.mk: Changes backported from GCC.
* futex.m4: Changes backported from GCC.
* gthr.m4: Changes backported from GCC.
* lib-link.m4: Changes backported from GCC.
* mh-mingw: Changes backported from GCC.
* no-executables.m4: Changes backported from GCC.
* tls.m4: Changes backported from GCC.
* toolexeclibdir.m4: New file, backported from GCC.
binutils/ChangeLog:
* configure: Regenerate.
gdb/ChangeLog:
* configure: Regenerate.
gdbserver/ChangeLog:
* configure: Regenerate.
gdbsupport/ChangeLog:
* configure: Regenerate.
intl/ChangeLog:
* configure: Regenerate.
libiberty/ChangeLog:
* configure: Regenerate.
zlib/ChangeLog.bin-gdb:
* configure: Regenerate.
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 14 | ||||
-rw-r--r-- | config/ax_count_cpus.m4 | 101 | ||||
-rw-r--r-- | config/bootstrap-Og.mk | 1 | ||||
-rw-r--r-- | config/bootstrap-lto-lean.mk | 17 | ||||
-rw-r--r-- | config/bootstrap-lto.mk | 1 | ||||
-rw-r--r-- | config/futex.m4 | 4 | ||||
-rw-r--r-- | config/gthr.m4 | 1 | ||||
-rw-r--r-- | config/lib-link.m4 | 22 | ||||
-rw-r--r-- | config/mh-mingw | 5 | ||||
-rw-r--r-- | config/no-executables.m4 | 4 | ||||
-rw-r--r-- | config/tls.m4 | 2 | ||||
-rw-r--r-- | config/toolexeclibdir.m4 | 31 |
12 files changed, 194 insertions, 9 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 19fc6cd..959695d 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,17 @@ +2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com> + + * ax_count_cpus.m4: New file, backported from GCC. + * bootstrap-Og.mk: New file, backported from GCC. + * bootstrap-lto-lean.mk: New file, backported from GCC. + * bootstrap-lto.mk: Changes backported from GCC. + * futex.m4: Changes backported from GCC. + * gthr.m4: Changes backported from GCC. + * lib-link.m4: Changes backported from GCC. + * mh-mingw: Changes backported from GCC. + * no-executables.m4: Changes backported from GCC. + * tls.m4: Changes backported from GCC. + * toolexeclibdir.m4: New file, backported from GCC. + 2020-01-18 Nick Clifton <nickc@redhat.com> Binutils 2.34 branch created. diff --git a/config/ax_count_cpus.m4 b/config/ax_count_cpus.m4 new file mode 100644 index 0000000..5db8925 --- /dev/null +++ b/config/ax_count_cpus.m4 @@ -0,0 +1,101 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED]) +# +# DESCRIPTION +# +# Attempt to count the number of logical processor cores (including +# virtual and HT cores) currently available to use on the machine and +# place detected value in CPU_COUNT variable. +# +# On successful detection, ACTION-IF-DETECTED is executed if present. If +# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The +# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1. +# +# LICENSE +# +# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru> +# Copyright (c) 2012 Brian Aker <brian@tangent.org> +# Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net> +# Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 22 + + AC_DEFUN([AX_COUNT_CPUS],[dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_PROG_EGREP])dnl + AC_MSG_CHECKING([the number of available CPUs]) + CPU_COUNT="0" + + # Try generic methods + + # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and + # 'NPROCESSORS_ONLN' are platform-specific + command -v getconf >/dev/null 2>&1 && \ + CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0" + AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl + # 'nproc' is part of GNU Coreutils and is widely available + CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0" + ])dnl + + AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl + # Try platform-specific preferred methods + AS_CASE([[$host_os]],dnl + [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl + [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl + [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl + [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl + [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl + [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl + [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl + [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl + )dnl + ])dnl + + AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl + # Try less preferred generic method + # 'hw.ncpu' exist on many platforms, but not on GNU/Linux + CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0" + ])dnl + + AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl + # Try platform-specific fallback methods + # They can be less accurate and slower then preferred methods + AS_CASE([[$host_os]],dnl + [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl + [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl + [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl + [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \ + CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl + [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \ + CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl + [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl + [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl + [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl + [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl + )dnl + ])dnl + + AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl + AC_MSG_RESULT([[$CPU_COUNT]]) + m4_ifvaln([$1],[$1],)dnl + ],[dnl + m4_ifval([$2],[dnl + AS_UNSET([[CPU_COUNT]]) + AC_MSG_RESULT([[unable to detect]]) + $2 + ], [dnl + CPU_COUNT="1" + AC_MSG_RESULT([[unable to detect (assuming 1)]]) + ])dnl + ])dnl + ])dnl diff --git a/config/bootstrap-Og.mk b/config/bootstrap-Og.mk new file mode 100644 index 0000000..9057afb --- /dev/null +++ b/config/bootstrap-Og.mk @@ -0,0 +1 @@ +BOOT_CFLAGS := -Og $(filter-out -O%, $(BOOT_CFLAGS)) diff --git a/config/bootstrap-lto-lean.mk b/config/bootstrap-lto-lean.mk new file mode 100644 index 0000000..79cea50 --- /dev/null +++ b/config/bootstrap-lto-lean.mk @@ -0,0 +1,17 @@ +# This option enables LTO for stage4 and LTO for generators in stage3 with profiledbootstrap. +# Otherwise, LTO is used in only stage3. + +STAGE3_CFLAGS += -flto=jobserver +override STAGEtrain_CFLAGS := $(filter-out -flto=jobserver,$(STAGEtrain_CFLAGS)) +STAGEtrain_GENERATOR_CFLAGS += -flto=jobserver +STAGEfeedback_CFLAGS += -flto=jobserver + +# assumes the host supports the linker plugin +LTO_AR = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ar$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ +LTO_RANLIB = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ranlib$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ + +LTO_EXPORTS = AR="$(LTO_AR)"; export AR; \ + RANLIB="$(LTO_RANLIB)"; export RANLIB; +LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)" + +do-compare = /bin/true diff --git a/config/bootstrap-lto.mk b/config/bootstrap-lto.mk index 768b633..4de07e5 100644 --- a/config/bootstrap-lto.mk +++ b/config/bootstrap-lto.mk @@ -15,3 +15,4 @@ LTO_EXPORTS = AR="$(LTO_AR)"; export AR; \ LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)" do-compare = $(SHELL) $(srcdir)/contrib/compare-lto $$f1 $$f2 +extra-compare = gcc/lto1$(exeext) diff --git a/config/futex.m4 b/config/futex.m4 index e95144d..c212438 100644 --- a/config/futex.m4 +++ b/config/futex.m4 @@ -9,7 +9,7 @@ AC_DEFUN([GCC_LINUX_FUTEX],[dnl GCC_ENABLE(linux-futex,default, ,[use the Linux futex system call], permit yes|no|default) case "$target" in - *-linux*) + *-linux* | *-uclinux*) case "$enable_linux_futex" in default) # If headers don't have gettid/futex syscalls definition, then @@ -22,6 +22,7 @@ case "$target" in AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include <sys/syscall.h> + #include <unistd.h> int lk;], [syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])], [save_LIBS="$LIBS" @@ -48,6 +49,7 @@ If so, please configure with --disable-linux-futex]) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include <sys/syscall.h> + #include <unistd.h> int lk;], [syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],[], [AC_MSG_ERROR([SYS_gettid and SYS_futex required for --enable-linux-futex])]) diff --git a/config/gthr.m4 b/config/gthr.m4 index 7b29f1f..4b93730 100644 --- a/config/gthr.m4 +++ b/config/gthr.m4 @@ -13,6 +13,7 @@ AC_DEFUN([GCC_AC_THREAD_HEADER], case $1 in aix) thread_header=config/rs6000/gthr-aix.h ;; dce) thread_header=config/pa/gthr-dce.h ;; + gcn) thread_header=config/gcn/gthr-gcn.h ;; lynx) thread_header=config/gthr-lynx.h ;; mipssde) thread_header=config/mips/gthr-mipssde.h ;; posix) thread_header=gthr-posix.h ;; diff --git a/config/lib-link.m4 b/config/lib-link.m4 index eeb200d..20e281f 100644 --- a/config/lib-link.m4 +++ b/config/lib-link.m4 @@ -150,6 +150,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], fi fi ]) + AC_LIB_ARG_WITH([lib$1-type], +[ --with-lib$1-type=TYPE type of library to search for (auto/static/shared) ], + [ with_lib$1_type=$withval ], [ with_lib$1_type=auto ]) + lib_type=`eval echo \$with_lib$1_type` + dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= @@ -195,13 +200,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], found_so= found_a= if test $use_additional = yes; then - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi - else + elif test x$lib_type != xshared; then if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" @@ -217,13 +222,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi - else + elif test x$lib_type != xshared; then if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" @@ -487,8 +492,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + else + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l:lib$name.$libext" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l:lib$name.$libext" + fi fi fi fi diff --git a/config/mh-mingw b/config/mh-mingw index bc1d274..a795096 100644 --- a/config/mh-mingw +++ b/config/mh-mingw @@ -2,6 +2,11 @@ # Vista (see PR33281 for details). BOOT_CFLAGS += -D__USE_MINGW_ACCESS -Wno-pedantic-ms-format CFLAGS += -D__USE_MINGW_ACCESS +STAGE1_CXXFLAGS += -D__USE_MINGW_ACCESS +STAGE2_CXXFLAGS += -D__USE_MINGW_ACCESS +STAGE3_CXXFLAGS += -D__USE_MINGW_ACCESS +STAGE4_CXXFLAGS += -D__USE_MINGW_ACCESS + # Increase stack limit to a figure based on the Linux default, with 4MB added # as GCC turns out to need that much more to pass all the limits-* tests. LDFLAGS += -Wl,--stack,12582912 diff --git a/config/no-executables.m4 b/config/no-executables.m4 index 9061624..6842f84 100644 --- a/config/no-executables.m4 +++ b/config/no-executables.m4 @@ -25,7 +25,9 @@ AC_BEFORE([$0], [_AC_COMPILER_EXEEXT]) AC_BEFORE([$0], [AC_LINK_IFELSE]) m4_define([_AC_COMPILER_EXEEXT], -[AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) +[AC_LANG_CONFTEST([AC_LANG_PROGRAM( + [#include <stdio.h>], + [printf ("hello world\n");])]) # FIXME: Cleanup? AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes]) if test x$gcc_no_link = xyes; then diff --git a/config/tls.m4 b/config/tls.m4 index 1a5fc59..7532305 100644 --- a/config/tls.m4 +++ b/config/tls.m4 @@ -76,7 +76,7 @@ AC_DEFUN([GCC_CHECK_TLS], [ dnl Shared library options may depend on the host; this check dnl is only known to be needed for GNU/Linux. case $host in - *-*-linux*) + *-*-linux* | -*-uclinuxfdpic*) LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ;; esac diff --git a/config/toolexeclibdir.m4 b/config/toolexeclibdir.m4 new file mode 100644 index 0000000..5dd8978 --- /dev/null +++ b/config/toolexeclibdir.m4 @@ -0,0 +1,31 @@ +dnl toolexeclibdir override support. +dnl Copyright (C) 2020 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING3. If not see +dnl <http://www.gnu.org/licenses/>. + +AC_DEFUN([GCC_WITH_TOOLEXECLIBDIR], +[AC_ARG_WITH(toolexeclibdir, + [AS_HELP_STRING([--with-toolexeclibdir=DIR], + [install libraries built with a cross compiler within DIR])], + [dnl +case ${with_toolexeclibdir} in + /) + ;; + */) + with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` + ;; +esac], + [with_toolexeclibdir=no]) +]) |