mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
ARC: Build Infrastructure
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
33ff7b3988
commit
0be8ae3679
@ -118,6 +118,9 @@
|
||||
/* AArch64 PAC-RET code generation is enabled. */
|
||||
#define HAVE_AARCH64_PAC_RET 0
|
||||
|
||||
/* ARC big endian ABI */
|
||||
#undef HAVE_ARC_BE
|
||||
|
||||
/* C-SKY ABI version. */
|
||||
#undef CSKYABI
|
||||
|
||||
|
3
sysdeps/arc/Implies
Normal file
3
sysdeps/arc/Implies
Normal file
@ -0,0 +1,3 @@
|
||||
wordsize-32
|
||||
ieee754/flt-32
|
||||
ieee754/dbl-64
|
21
sysdeps/arc/Makefile
Normal file
21
sysdeps/arc/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
# ARC Makefile
|
||||
# Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
# The GNU C Library 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
|
||||
# Lesser General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with the GNU C Library. If not, see
|
||||
# <https://www.gnu.org/licenses/>.
|
||||
|
||||
# We don't support long doubles as a distinct type. We don't need to set
|
||||
# this variable; it's here mostly for documentational purposes.
|
||||
long-double-fcts = no
|
8
sysdeps/arc/Versions
Normal file
8
sysdeps/arc/Versions
Normal file
@ -0,0 +1,8 @@
|
||||
libc {
|
||||
GLIBC_2.32 {
|
||||
__mcount;
|
||||
}
|
||||
GLIBC_PRIVATE {
|
||||
__syscall_error;
|
||||
}
|
||||
}
|
182
sysdeps/arc/configure
vendored
Normal file
182
sysdeps/arc/configure
vendored
Normal file
@ -0,0 +1,182 @@
|
||||
# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
|
||||
# Local configure fragment for sysdeps/arc.
|
||||
|
||||
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
|
||||
|
||||
libc_cv_have_sdata_section=no
|
||||
|
||||
# For ARC, historically ; was used for comments and not newline
|
||||
# Later # also got added to comment list, but ; couldn't be switched to
|
||||
# canonical newline as there's lots of code out there which will break
|
||||
libc_cv_asm_line_sep='`'
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ASM_LINE_SEP $libc_cv_asm_line_sep
|
||||
_ACEOF
|
||||
|
||||
|
||||
# For big endian ABI, generate a symbol for selecting right dynamic linker
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
|
||||
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
|
||||
if ${ac_cv_path_GREP+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -z "$GREP"; then
|
||||
ac_path_GREP_found=false
|
||||
# Loop through the user's path and test for each of PROGNAME-LIST
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_prog in grep ggrep; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
|
||||
as_fn_executable_p "$ac_path_GREP" || continue
|
||||
# Check for GNU ac_path_GREP and select it if it is found.
|
||||
# Check for GNU $ac_path_GREP
|
||||
case `"$ac_path_GREP" --version 2>&1` in
|
||||
*GNU*)
|
||||
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
|
||||
*)
|
||||
ac_count=0
|
||||
$as_echo_n 0123456789 >"conftest.in"
|
||||
while :
|
||||
do
|
||||
cat "conftest.in" "conftest.in" >"conftest.tmp"
|
||||
mv "conftest.tmp" "conftest.in"
|
||||
cp "conftest.in" "conftest.nl"
|
||||
$as_echo 'GREP' >> "conftest.nl"
|
||||
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
|
||||
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
|
||||
as_fn_arith $ac_count + 1 && ac_count=$as_val
|
||||
if test $ac_count -gt ${ac_path_GREP_max-0}; then
|
||||
# Best one so far, save it but keep looking for a better one
|
||||
ac_cv_path_GREP="$ac_path_GREP"
|
||||
ac_path_GREP_max=$ac_count
|
||||
fi
|
||||
# 10*(2^10) chars as input seems more than enough
|
||||
test $ac_count -gt 10 && break
|
||||
done
|
||||
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
|
||||
esac
|
||||
|
||||
$ac_path_GREP_found && break 3
|
||||
done
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
if test -z "$ac_cv_path_GREP"; then
|
||||
as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
ac_cv_path_GREP=$GREP
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
|
||||
$as_echo "$ac_cv_path_GREP" >&6; }
|
||||
GREP="$ac_cv_path_GREP"
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
|
||||
$as_echo_n "checking for egrep... " >&6; }
|
||||
if ${ac_cv_path_EGREP+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
|
||||
then ac_cv_path_EGREP="$GREP -E"
|
||||
else
|
||||
if test -z "$EGREP"; then
|
||||
ac_path_EGREP_found=false
|
||||
# Loop through the user's path and test for each of PROGNAME-LIST
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_prog in egrep; do
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
|
||||
as_fn_executable_p "$ac_path_EGREP" || continue
|
||||
# Check for GNU ac_path_EGREP and select it if it is found.
|
||||
# Check for GNU $ac_path_EGREP
|
||||
case `"$ac_path_EGREP" --version 2>&1` in
|
||||
*GNU*)
|
||||
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
|
||||
*)
|
||||
ac_count=0
|
||||
$as_echo_n 0123456789 >"conftest.in"
|
||||
while :
|
||||
do
|
||||
cat "conftest.in" "conftest.in" >"conftest.tmp"
|
||||
mv "conftest.tmp" "conftest.in"
|
||||
cp "conftest.in" "conftest.nl"
|
||||
$as_echo 'EGREP' >> "conftest.nl"
|
||||
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
|
||||
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
|
||||
as_fn_arith $ac_count + 1 && ac_count=$as_val
|
||||
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
|
||||
# Best one so far, save it but keep looking for a better one
|
||||
ac_cv_path_EGREP="$ac_path_EGREP"
|
||||
ac_path_EGREP_max=$ac_count
|
||||
fi
|
||||
# 10*(2^10) chars as input seems more than enough
|
||||
test $ac_count -gt 10 && break
|
||||
done
|
||||
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
|
||||
esac
|
||||
|
||||
$ac_path_EGREP_found && break 3
|
||||
done
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
if test -z "$ac_cv_path_EGREP"; then
|
||||
as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
ac_cv_path_EGREP=$EGREP
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
|
||||
$as_echo "$ac_cv_path_EGREP" >&6; }
|
||||
EGREP="$ac_cv_path_EGREP"
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for big endian" >&5
|
||||
$as_echo_n "checking for big endian... " >&6; }
|
||||
if ${libc_cv_arc_be+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#ifdef __BIG_ENDIAN__
|
||||
yes
|
||||
#endif
|
||||
|
||||
_ACEOF
|
||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
$EGREP "yes" >/dev/null 2>&1; then :
|
||||
libc_cv_arc_be=yes
|
||||
else
|
||||
libc_cv_arc_be=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arc_be" >&5
|
||||
$as_echo "$libc_cv_arc_be" >&6; }
|
||||
if test $libc_cv_arc_be = yes; then
|
||||
# For shlib-versions.
|
||||
$as_echo "#define HAVE_ARC_BE 1" >>confdefs.h
|
||||
|
||||
config_vars="$config_vars
|
||||
default-abi = arcbe"
|
||||
else
|
||||
config_vars="$config_vars
|
||||
default-abi = arcle"
|
||||
fi
|
26
sysdeps/arc/configure.ac
Normal file
26
sysdeps/arc/configure.ac
Normal file
@ -0,0 +1,26 @@
|
||||
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
||||
# Local configure fragment for sysdeps/arc.
|
||||
|
||||
AC_DEFINE(PI_STATIC_AND_HIDDEN)
|
||||
libc_cv_have_sdata_section=no
|
||||
|
||||
# For ARC, historically ; was used for comments and not newline
|
||||
# Later # also got added to comment list, but ; couldn't be switched to
|
||||
# canonical newline as there's lots of code out there which will break
|
||||
libc_cv_asm_line_sep='`'
|
||||
AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
|
||||
|
||||
# For big endian ABI, generate a symbol for selecting right dynamic linker
|
||||
AC_CACHE_CHECK([for big endian],
|
||||
[libc_cv_arc_be],
|
||||
[AC_EGREP_CPP(yes,[#ifdef __BIG_ENDIAN__
|
||||
yes
|
||||
#endif
|
||||
], libc_cv_arc_be=yes, libc_cv_arc_be=no)])
|
||||
if test $libc_cv_arc_be = yes; then
|
||||
# For shlib-versions.
|
||||
AC_DEFINE(HAVE_ARC_BE)
|
||||
LIBC_CONFIG_VAR([default-abi], [arcbe])
|
||||
else
|
||||
LIBC_CONFIG_VAR([default-abi], [arcle])
|
||||
fi
|
22
sysdeps/arc/nptl/Makefile
Normal file
22
sysdeps/arc/nptl/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
# NPTL makefile fragment for ARC.
|
||||
# Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of the GNU C Library.
|
||||
#
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# The GNU C Library 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
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with the GNU C Library. If not, see
|
||||
# <https://www.gnu.org/licenses/>.
|
||||
|
||||
ifeq ($(subdir),csu)
|
||||
gen-as-const-headers += tcb-offsets.sym
|
||||
endif
|
14
sysdeps/arc/preconfigure
Normal file
14
sysdeps/arc/preconfigure
Normal file
@ -0,0 +1,14 @@
|
||||
case "$machine" in
|
||||
arc*)
|
||||
base_machine=arc
|
||||
machine=arc
|
||||
|
||||
gccfloat=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep __ARC_FPU_| wc -l`
|
||||
if test "$gccfloat" != "0"; then
|
||||
with_fp_cond=1
|
||||
else
|
||||
with_fp_cond=0
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
3
sysdeps/unix/sysv/linux/arc/Implies
Normal file
3
sysdeps/unix/sysv/linux/arc/Implies
Normal file
@ -0,0 +1,3 @@
|
||||
arc/nptl
|
||||
unix/sysv/linux/generic/wordsize-32
|
||||
unix/sysv/linux/generic
|
29
sysdeps/unix/sysv/linux/arc/Makefile
Normal file
29
sysdeps/unix/sysv/linux/arc/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
ifeq ($(subdir),stdlib)
|
||||
gen-as-const-headers += ucontext_i.sym
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),signal)
|
||||
sysdep_routines += sigrestorer
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),misc)
|
||||
# MIPS/Tile-style cacheflush routine
|
||||
sysdep_headers += sys/cachectl.h
|
||||
sysdep_routines += cacheflush
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),elf)
|
||||
ifeq ($(build-shared),yes)
|
||||
# This is needed for DSO loading from static binaries.
|
||||
sysdep-dl-routines += dl-static
|
||||
endif
|
||||
endif
|
||||
|
||||
abi-variants := arcle arcbe
|
||||
|
||||
ifeq (,$(filter $(default-abi),$(abi-variants)))
|
||||
$(error Unknown ABI $(default-abi), must be one of $(abi-variants))
|
||||
endif
|
||||
|
||||
abi-arcle-condition := !defined __BIG_ENDIAN__
|
||||
abi-arcbe-condition := defined __BIG_ENDIAN__
|
16
sysdeps/unix/sysv/linux/arc/Versions
Normal file
16
sysdeps/unix/sysv/linux/arc/Versions
Normal file
@ -0,0 +1,16 @@
|
||||
ld {
|
||||
GLIBC_PRIVATE {
|
||||
# used for loading by static libraries
|
||||
_dl_var_init;
|
||||
}
|
||||
}
|
||||
libc {
|
||||
GLIBC_2.32 {
|
||||
_flush_cache;
|
||||
cacheflush;
|
||||
}
|
||||
GLIBC_PRIVATE {
|
||||
# A copy of sigaction lives in libpthread, and needs these.
|
||||
__default_rt_sa_restorer;
|
||||
}
|
||||
}
|
4
sysdeps/unix/sysv/linux/arc/configure
vendored
Normal file
4
sysdeps/unix/sysv/linux/arc/configure
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
|
||||
# Local configure fragment for sysdeps/unix/sysv/linux/arc.
|
||||
|
||||
arch_minimum_kernel=5.1.0
|
4
sysdeps/unix/sysv/linux/arc/configure.ac
Normal file
4
sysdeps/unix/sysv/linux/arc/configure.ac
Normal file
@ -0,0 +1,4 @@
|
||||
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
||||
# Local configure fragment for sysdeps/unix/sysv/linux/arc.
|
||||
|
||||
arch_minimum_kernel=5.1.0
|
27
sysdeps/unix/sysv/linux/arc/ldconfig.h
Normal file
27
sysdeps/unix/sysv/linux/arc/ldconfig.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* ldconfig default paths and libraries. Linux/RISC-V version.
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdeps/generic/ldconfig.h>
|
||||
|
||||
#define SYSDEP_KNOWN_INTERPRETER_NAMES \
|
||||
{ "/lib/ld-linux-arc.so.2", FLAG_ELF_LIBC6 }, \
|
||||
{ "/lib/ld-linux-arceb.so.2", FLAG_ELF_LIBC6 },
|
||||
|
||||
#define SYSDEP_KNOWN_LIBRARY_NAMES \
|
||||
{ "libc.so.6", FLAG_ELF_LIBC6 }, \
|
||||
{ "libm.so.6", FLAG_ELF_LIBC6 },
|
7
sysdeps/unix/sysv/linux/arc/shlib-versions
Normal file
7
sysdeps/unix/sysv/linux/arc/shlib-versions
Normal file
@ -0,0 +1,7 @@
|
||||
DEFAULT GLIBC_2.32
|
||||
|
||||
%ifdef HAVE_ARC_BE
|
||||
ld=ld-linux-arceb.so.2
|
||||
%else
|
||||
ld=ld-linux-arc.so.2
|
||||
%endif
|
Loading…
Reference in New Issue
Block a user