Update config.{guess,sub} with latest versions and handle fallout of that
From http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD .
This time, do not apply the add-on change from
25a09c8776
to config.sub, but keep it
pristine. Instead, let's start using the name "aarch64" instead of
"arm64" for macOS and iOS in the autofoo context, as that is what
those tools call it. Clang and Apple call it arm64, though.
Change-Id: I1e05866c5fb08e0800cdfeaf7f6a71bfb43d1777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100272
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
This commit is contained in:
parent
12d24634df
commit
1cee06c080
10 changed files with 452 additions and 336 deletions
|
@ -21,11 +21,6 @@ $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
|
|||
EXTRAOBJECTLISTS += $(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
|
||||
endif
|
||||
|
||||
else ifeq ($(CPUNAME),ARM64)
|
||||
bridges_SELECTED_BRIDGE := gcc3_ios
|
||||
bridge_noopt_objects := cpp2uno except uno2cpp
|
||||
bridge_asm_objects := ios64_helper
|
||||
|
||||
else ifeq ($(CPUNAME),AARCH64)
|
||||
|
||||
ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
|
||||
|
@ -37,6 +32,14 @@ $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno, \
|
|||
bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/callvirtualfunction, \
|
||||
$(if $(HAVE_GCC_STACK_CLASH_PROTECTION),-fno-stack-clash-protection) \
|
||||
))
|
||||
else ifneq ($(filter iOS MACOSX,$(OS)),)
|
||||
# For now, use the same bridge for macOS on arm64 as for iOS. But we
|
||||
# will eventually obviously want one that does generate code
|
||||
# dynamically on macOS.
|
||||
bridges_SELECTED_BRIDGE := gcc3_ios
|
||||
bridge_noopt_objects := cpp2uno except uno2cpp
|
||||
bridge_asm_objects := ios64_helper
|
||||
|
||||
endif
|
||||
|
||||
else ifeq ($(CPUNAME),AXP)
|
||||
|
|
103
config.guess
vendored
103
config.guess
vendored
|
@ -1,8 +1,8 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2019 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2019-04-28'
|
||||
timestamp='2020-08-06'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -50,7 +50,7 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2019 Free Software Foundation, Inc.
|
||||
Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -99,6 +99,8 @@ tmp=
|
|||
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
|
||||
|
||||
set_cc_for_build() {
|
||||
# prevent multiple calls if $tmp is already set
|
||||
test "$tmp" && return 0
|
||||
: "${TMPDIR=/tmp}"
|
||||
# shellcheck disable=SC2039
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
|
@ -262,6 +264,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|||
*:SolidBSD:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
*:OS108:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
macppc:MirBSD:*:*)
|
||||
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
|
@ -271,12 +276,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
|||
*:Sortix:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-sortix
|
||||
exit ;;
|
||||
*:Twizzler:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-twizzler
|
||||
exit ;;
|
||||
*:Redox:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-redox
|
||||
exit ;;
|
||||
mips:OSF1:*.*)
|
||||
echo mips-dec-osf1
|
||||
exit ;;
|
||||
echo mips-dec-osf1
|
||||
exit ;;
|
||||
alpha:OSF1:*:*)
|
||||
case $UNAME_RELEASE in
|
||||
*4.0)
|
||||
|
@ -918,7 +926,7 @@ EOF
|
|||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
EV56) UNAME_MACHINE=alphaev56 ;;
|
||||
PCA56) UNAME_MACHINE=alphapca56 ;;
|
||||
|
@ -1087,7 +1095,17 @@ EOF
|
|||
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
|
||||
set_cc_for_build
|
||||
LIBCABI=$LIBC
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_X32 >/dev/null
|
||||
then
|
||||
LIBCABI="$LIBC"x32
|
||||
fi
|
||||
fi
|
||||
echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
|
@ -1324,39 +1342,43 @@ EOF
|
|||
*:Rhapsody:*:*)
|
||||
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
arm64:Darwin:*:*)
|
||||
echo aarch64-apple-darwin"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
set_cc_for_build
|
||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
case $UNAME_PROCESSOR in
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
if command -v xcode-select > /dev/null 2> /dev/null && \
|
||||
! xcode-select --print-path > /dev/null 2> /dev/null ; then
|
||||
# Avoid executing cc if there is no toolchain installed as
|
||||
# cc will be a stub that puts up a graphical alert
|
||||
# prompting the user to install developer tools.
|
||||
CC_FOR_BUILD=no_compiler_found
|
||||
else
|
||||
set_cc_for_build
|
||||
fi
|
||||
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
||||
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_PPC >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
||||
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_PPC >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
||||
# that puts up a graphical alert prompting to install
|
||||
# developer tools. Any system running Mac OS X 10.7 or
|
||||
# later (Darwin 11 and later) is required to have a 64-bit
|
||||
# processor. This is not true of the ARM version of Darwin
|
||||
# that Apple uses in portable devices.
|
||||
UNAME_PROCESSOR=x86_64
|
||||
# uname -m returns i386 or x86_64
|
||||
UNAME_PROCESSOR=$UNAME_MACHINE
|
||||
fi
|
||||
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
|
@ -1481,7 +1503,7 @@ main ()
|
|||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know... */
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
|
@ -1620,6 +1642,12 @@ copies of config.guess and config.sub with the latest versions from:
|
|||
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
||||
and
|
||||
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
EOF
|
||||
|
||||
year=`echo $timestamp | sed 's,-.*,,'`
|
||||
# shellcheck disable=SC2003
|
||||
if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then
|
||||
cat >&2 <<EOF
|
||||
|
||||
If $0 has already been updated, send the following data and any
|
||||
information you think might be pertinent to config-patches@gnu.org to
|
||||
|
@ -1647,6 +1675,7 @@ UNAME_RELEASE = "$UNAME_RELEASE"
|
|||
UNAME_SYSTEM = "$UNAME_SYSTEM"
|
||||
UNAME_VERSION = "$UNAME_VERSION"
|
||||
EOF
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
||||
|
|
603
config.sub
vendored
603
config.sub
vendored
File diff suppressed because it is too large
Load diff
45
configure.ac
45
configure.ac
|
@ -599,6 +599,8 @@ SDKDIRNAME=sdk
|
|||
|
||||
HOST_PLATFORM="$host"
|
||||
|
||||
host_cpu_for_clang="$host_cpu"
|
||||
|
||||
case "$host_os" in
|
||||
|
||||
solaris*)
|
||||
|
@ -701,11 +703,19 @@ darwin*|macos*) # macOS
|
|||
|
||||
# -undefined error is the default
|
||||
LINKFLAGSNOUNDEFS=""
|
||||
if test "$host_cpu" = arm64; then
|
||||
# HOST_PLATFORM is used for external projects and their configury occasionally doesn't like
|
||||
# the "macos" part so be sure to use arm64-apple-darwin for now.
|
||||
HOST_PLATFORM=arm64-apple-darwin
|
||||
fi
|
||||
case "$host_cpu" in
|
||||
aarch64|arm64)
|
||||
case "$host_os" in
|
||||
macos*)
|
||||
# HOST_PLATFORM is used for external projects and their configury occasionally doesn't like
|
||||
# the "macos" part so be sure to use aarch64-apple-darwin for now.
|
||||
HOST_PLATFORM=aarch64-apple-darwin
|
||||
;;
|
||||
esac
|
||||
|
||||
# Apple's Clang uses "arm64"
|
||||
host_cpu_for_clang=arm64
|
||||
esac
|
||||
;;
|
||||
|
||||
ios*) # iOS
|
||||
|
@ -743,9 +753,12 @@ ios*) # iOS
|
|||
# -undefined error is the default
|
||||
LINKFLAGSNOUNDEFS=""
|
||||
|
||||
# HOST_PLATFORM is used for external projects and their configury typically doesn't like the "ios" part,
|
||||
# so use arm64-apple-darwin as before for now.
|
||||
HOST_PLATFORM=arm64-apple-darwin
|
||||
# HOST_PLATFORM is used for external projects and their configury typically doesn't like the "ios"
|
||||
# part, so use aarch64-apple-darwin for now.
|
||||
HOST_PLATFORM=aarch64-apple-darwin
|
||||
|
||||
# Apple's Clang uses "arm64"
|
||||
host_cpu_for_clang=arm64
|
||||
;;
|
||||
|
||||
freebsd*)
|
||||
|
@ -3155,13 +3168,13 @@ if test $_os = iOS; then
|
|||
AC_MSG_CHECKING([what C compiler to use])
|
||||
CC="`xcrun -find clang`"
|
||||
CC_BASE=`first_arg_basename "$CC"`
|
||||
CC+=" -arch $host_cpu -isysroot $sysroot $lto $versionmin"
|
||||
CC+=" -arch $host_cpu_for_clang -isysroot $sysroot $lto $versionmin"
|
||||
AC_MSG_RESULT([$CC])
|
||||
|
||||
AC_MSG_CHECKING([what C++ compiler to use])
|
||||
CXX="`xcrun -find clang++`"
|
||||
CXX_BASE=`first_arg_basename "$CXX"`
|
||||
CXX+=" -arch $host_cpu $stdlib -isysroot $sysroot $lto $versionmin"
|
||||
CXX+=" -arch $host_cpu_for_clang $stdlib -isysroot $sysroot $lto $versionmin"
|
||||
AC_MSG_RESULT([$CXX])
|
||||
|
||||
INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
|
||||
|
@ -4347,12 +4360,12 @@ darwin*|macos*)
|
|||
P_SEP=:
|
||||
|
||||
case "$host_cpu" in
|
||||
arm64)
|
||||
aarch64|arm64)
|
||||
if test "$enable_ios_simulator" = "yes"; then
|
||||
OS=iOS
|
||||
else
|
||||
CPUNAME=ARM64
|
||||
RTL_ARCH=AARCH
|
||||
CPUNAME=AARCH64
|
||||
RTL_ARCH=AARCH64
|
||||
PLATFORMID=macosx_arm64
|
||||
fi
|
||||
;;
|
||||
|
@ -4378,7 +4391,7 @@ ios*)
|
|||
P_SEP=:
|
||||
|
||||
case "$host_cpu" in
|
||||
arm64)
|
||||
aarch64|arm64)
|
||||
if test "$enable_ios_simulator" = "yes"; then
|
||||
AC_MSG_ERROR([iOS simulator is only available in macOS not iOS])
|
||||
fi
|
||||
|
@ -4387,8 +4400,8 @@ ios*)
|
|||
AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
|
||||
;;
|
||||
esac
|
||||
CPUNAME=ARM64
|
||||
RTL_ARCH=ARM_EABI
|
||||
CPUNAME=AARCH64
|
||||
RTL_ARCH=AARCH64
|
||||
PLATFORMID=ios_arm64
|
||||
;;
|
||||
|
||||
|
|
3
external/nss/ExternalProject_nss.mk
vendored
3
external/nss/ExternalProject_nss.mk
vendored
|
@ -42,7 +42,7 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
|
|||
$(call gb_ExternalProject_run,build,\
|
||||
$(if $(filter ANDROID FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X86_64,$(CPUNAME)),USE_64=1)) \
|
||||
$(if $(filter ANDROID,$(OS)),$(if $(filter AARCH64,$(CPUNAME)),USE_64=1)) \
|
||||
$(if $(filter ARM64,$(CPUNAME)),USE_64=1) \
|
||||
$(if $(filter AARCH64 ARM64,$(CPUNAME)),USE_64=1 CPU_ARCH=aarch64) \
|
||||
$(if $(filter MACOSX,$(OS)),\
|
||||
MACOS_SDK_DIR=$(MACOSX_SDK_PATH) \
|
||||
NSS_USE_SYSTEM_SQLITE=1) \
|
||||
|
@ -50,7 +50,6 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
|
|||
$(if $(filter SOLARIS,$(OS)),NS_USE_GCC=1) \
|
||||
$(if $(CROSS_COMPILING),\
|
||||
CROSS_COMPILE=1 \
|
||||
$(if $(filter ARM64,$(CPUNAME)),CPU_ARCH=aarch64) \
|
||||
NSPR_CONFIGURE_OPTS="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)") \
|
||||
NSDISTMODE=copy \
|
||||
$(MAKE) AR="$(AR)" \
|
||||
|
|
2
external/openssl/ExternalProject_openssl.mk
vendored
2
external/openssl/ExternalProject_openssl.mk
vendored
|
@ -48,7 +48,7 @@ OPENSSL_PLATFORM := \
|
|||
,\
|
||||
$(if $(filter MACOSX,$(OS)),\
|
||||
$(if $(filter X86_64,$(CPUNAME)),darwin64-x86_64-cc)\
|
||||
$(if $(filter ARM64,$(CPUNAME)),darwin64-arm64-cc)\
|
||||
$(if $(filter AARCH64,$(CPUNAME)),darwin64-arm64-cc)\
|
||||
)\
|
||||
)\
|
||||
)\
|
||||
|
|
1
external/openssl/UnpackedTarball_openssl.mk
vendored
1
external/openssl/UnpackedTarball_openssl.mk
vendored
|
@ -13,6 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl
|
|||
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,openssl,\
|
||||
external/openssl/openssl-no-multilib.patch.0 \
|
||||
external/openssl/openssl-macos-arm64.patch.1 \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
|
18
external/openssl/openssl-macos-arm64.patch.1
vendored
Normal file
18
external/openssl/openssl-macos-arm64.patch.1
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
-*- Mode: diff -*-
|
||||
--- a/Configurations/10-main.conf
|
||||
+++ b/Configurations/10-main.conf
|
||||
@@ -1557,6 +1667,14 @@
|
||||
bn_ops => "SIXTY_FOUR_BIT_LONG",
|
||||
perlasm_scheme => "macosx",
|
||||
},
|
||||
+ "darwin64-arm64-cc" => {
|
||||
+ inherit_from => [ "darwin-common" ],
|
||||
+ CFLAGS => add("-Wall"),
|
||||
+ cflags => add("-arch arm64"),
|
||||
+ lib_cppflags => add("-DL_ENDIAN"),
|
||||
+ bn_ops => "SIXTY_FOUR_BIT_LONG",
|
||||
+ perlasm_scheme => "macosx",
|
||||
+ },
|
||||
|
||||
##### GNU Hurd
|
||||
"hurd-x86" => {
|
Loading…
Reference in a new issue