
The change in major version (and the increment from Darwin19 to 20) caused libtool tests to fail which resulted in incorrect build settings for shared libraries. We take this opportunity to sort out the shared undefined symbols state rather than propagating the current unsound behaviour into a new rev. This change means that we default to the case that missing symbols are considered an error, and if one wants to allow this intentionally, the confiuration for that case should be set appropriately. Three existing cases need undefined dynamic lookup: libitm, where there is already a configuration mechanism to add the flags. libcc1, where we add simple configuration to add the flags for Darwin. libsanitizer, where we can add to the existing extra flags. libcc1/ChangeLog: PR target/97865 * Makefile.am: Add dynamic_lookup to LD flags for Darwin. * configure.ac: Test for Darwin host and set a flag. * Makefile.in: Regenerate. * configure: Regenerate. libitm/ChangeLog: PR target/97865 * configure.tgt: Add dynamic_lookup to XLDFLAGS for Darwin. * configure: Regenerate. libsanitizer/ChangeLog: PR target/97865 * configure.tgt: Add dynamic_lookup to EXTRA_CXXFLAGS for Darwin. * configure: Regenerate. ChangeLog: PR target/97865 * libtool.m4: Update handling of Darwin platform link flags for Darwin20. gcc/ChangeLog: PR target/97865 * configure: Regenerate. libatomic/ChangeLog: PR target/97865 * configure: Regenerate. libbacktrace/ChangeLog: PR target/97865 * configure: Regenerate. libffi/ChangeLog: PR target/97865 * configure: Regenerate. libgfortran/ChangeLog: PR target/97865 * configure: Regenerate. libgomp/ChangeLog: PR target/97865 * configure: Regenerate. libhsail-rt/ChangeLog: PR target/97865 * configure: Regenerate. libobjc/ChangeLog: PR target/97865 * configure: Regenerate. libphobos/ChangeLog: PR target/97865 * configure: Regenerate. libquadmath/ChangeLog: PR target/97865 * configure: Regenerate. libssp/ChangeLog: PR target/97865 * configure: Regenerate. libstdc++-v3/ChangeLog: PR target/97865 * configure: Regenerate. libvtv/ChangeLog: PR target/97865 * configure: Regenerate. zlib/ChangeLog: PR target/97865 * configure: Regenerate.
161 lines
4 KiB
Bash
161 lines
4 KiB
Bash
# -*- shell-script -*-
|
|
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
# This is the target specific configuration file. This is invoked by the
|
|
# autoconf generated configure script. Putting it in a separate shell file
|
|
# lets us skip running autoconf when modifying target specific information.
|
|
|
|
# This file switches on the shell variable ${target}, and sets the
|
|
# following shell variables:
|
|
# config_path An ordered list of directories to search for
|
|
# sources and headers. This is relative to the
|
|
# config subdirectory of the source tree.
|
|
# XCFLAGS Add extra compile flags to use.
|
|
# XLDFLAGS Add extra link flags to use.
|
|
|
|
# Optimize TLS usage by avoiding the overhead of dynamic allocation.
|
|
if test "$gcc_cv_have_tls" = yes ; then
|
|
case "${target}" in
|
|
|
|
*-*-musl*)
|
|
;;
|
|
|
|
# For x86, we use slots in the TCB head for most of our TLS.
|
|
# The setup of those slots in beginTransaction can afford to
|
|
# use the global-dynamic model.
|
|
i[456]86-*-linux* | x86_64-*-linux*)
|
|
;;
|
|
|
|
*-*-linux*)
|
|
XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
|
|
;;
|
|
|
|
esac
|
|
fi
|
|
|
|
# Map the target cpu to an ARCH sub-directory. At the same time,
|
|
# work out any special compilation flags as necessary.
|
|
case "${target_cpu}" in
|
|
aarch64*) ARCH=aarch64 ;;
|
|
alpha*) ARCH=alpha ;;
|
|
rs6000 | powerpc*)
|
|
XCFLAGS="${XCFLAGS} -mhtm"
|
|
ARCH=powerpc
|
|
;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
i[3456]86)
|
|
case " ${CC} ${CFLAGS} " in
|
|
*" -m64 "*|*" -mx32 "*)
|
|
;;
|
|
*)
|
|
if test -z "$with_arch"; then
|
|
XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
|
|
XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
|
|
fi
|
|
esac
|
|
XCFLAGS="${XCFLAGS} -mrtm"
|
|
ARCH=x86
|
|
;;
|
|
|
|
sh*) ARCH=sh ;;
|
|
|
|
sparc)
|
|
case " ${CC} ${CFLAGS} " in
|
|
*" -m64 "*)
|
|
;;
|
|
*)
|
|
if test -z "$with_cpu"; then
|
|
XCFLAGS="${XCFLAGS} -mcpu=v9"
|
|
fi
|
|
esac
|
|
ARCH=sparc
|
|
;;
|
|
|
|
sparc64|sparcv9)
|
|
case " ${CC} ${CFLAGS} " in
|
|
*" -m32 "*)
|
|
XCFLAGS="${XCFLAGS} -mcpu=v9"
|
|
;;
|
|
*" -m64 "*)
|
|
;;
|
|
*)
|
|
if test "x$with_cpu" = xv8; then
|
|
XCFLAGS="${XCFLAGS} -mcpu=v9"
|
|
fi
|
|
;;
|
|
esac
|
|
ARCH=sparc
|
|
;;
|
|
|
|
x86_64)
|
|
case " ${CC} ${CFLAGS} " in
|
|
*" -m32 "*)
|
|
XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
|
|
XCFLAGS="${XCFLAGS} -fomit-frame-pointer"
|
|
;;
|
|
esac
|
|
XCFLAGS="${XCFLAGS} -mrtm"
|
|
ARCH=x86
|
|
;;
|
|
s390|s390x)
|
|
XCFLAGS="${XCFLAGS} -mzarch -mhtm"
|
|
ARCH=s390
|
|
;;
|
|
|
|
*)
|
|
ARCH="${target_cpu}"
|
|
;;
|
|
esac
|
|
|
|
# For the benefit of top-level configure, determine if the cpu is supported.
|
|
test -d ${srcdir}/config/$ARCH || UNSUPPORTED=1
|
|
|
|
# Since we require POSIX threads, assume a POSIX system by default.
|
|
config_path="$ARCH posix generic"
|
|
|
|
# Other system configury
|
|
case "${target}" in
|
|
*-*-linux* | *-*-uclinux*)
|
|
if test "$enable_linux_futex" = yes; then
|
|
config_path="linux/$ARCH linux $config_path"
|
|
fi
|
|
;;
|
|
|
|
powerpc*-*-aix* | rs6000-*-aix*)
|
|
# The system ought to be supported, but sjlj.S has not been ported.
|
|
UNSUPPORTED=1
|
|
;;
|
|
|
|
*-*-gnu* | *-*-k*bsd*-gnu \
|
|
| *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
|
|
| *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
|
|
| *-*-aix* | *-*-dragonfly*)
|
|
# POSIX system. The OS is supported.
|
|
;;
|
|
|
|
*-*-darwin*)
|
|
# The OS is supported, but we need dynamic lookup to support undefined
|
|
# weak symbols at link-time.
|
|
XLDFLAGS="${XLDFLAGS} -Wl,-undefined,dynamic_lookup"
|
|
;;
|
|
|
|
*) # Non-POSIX, or embedded system
|
|
UNSUPPORTED=1
|
|
;;
|
|
esac
|