[newlib-cygwin/main] newlib: Regenerate autotools files

Corinna Vinschen corinna@sourceware.org
Mon Feb 10 14:41:09 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=68c13dc92f651eefa77d19aaecdfe5b98f35f847

commit 68c13dc92f651eefa77d19aaecdfe5b98f35f847
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Mon Feb 10 15:40:12 2025 +0100
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Mon Feb 10 15:40:12 2025 +0100

    newlib: Regenerate autotools files
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 newlib/Makefile.in | 11 ++++-----
 newlib/configure   | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 newlib/newlib.hin  |  4 ++++
 3 files changed, 74 insertions(+), 6 deletions(-)

diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index 2a04ecb02de2..a1319a863b68 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -971,17 +971,17 @@ check_PROGRAMS =
 @NEWLIB_HW_FP_FALSE@am__append_138 = libm/math/math.tex
 @HAVE_LONG_DOUBLE_TRUE@am__append_139 = $(libm_common_lsrc)
 @HAVE_FPMATH_H_TRUE@@HAVE_LONG_DOUBLE_TRUE@am__append_140 = $(libm_ld_lsrc)
-@HAVE_FPMATH_H_TRUE@am__append_141 =
+@HAVE_FPMATH_H_TRUE@am__append_141 = 
 @HAVE_FPMATH_H_TRUE@am__append_142 = 
 @HAVE_LIBM_MACHINE_AARCH64_TRUE@am__append_143 = $(libm_machine_aarch64_src)
 @HAVE_LIBM_MACHINE_AARCH64_TRUE@@HAVE_LONG_DOUBLE_TRUE@am__append_144 = $(libm_ld128_lsrc)
-@HAVE_LIBM_MACHINE_AARCH64_TRUE@am__append_145 =
+@HAVE_LIBM_MACHINE_AARCH64_TRUE@am__append_145 = 
 @HAVE_LIBM_MACHINE_AARCH64_TRUE@am__append_146 = 
 @HAVE_LIBM_MACHINE_AMDGCN_TRUE@am__append_147 = $(libm_machine_amdgcn_src)
 @HAVE_LIBM_MACHINE_ARM_TRUE@am__append_148 = $(libm_machine_arm_src)
 @HAVE_LIBM_MACHINE_I386_TRUE@am__append_149 = $(libm_machine_i386_src)
 @HAVE_LIBM_MACHINE_I386_TRUE@@HAVE_LONG_DOUBLE_TRUE@am__append_150 = $(libm_ld80_lsrc)
-@HAVE_LIBM_MACHINE_I386_TRUE@am__append_151 =
+@HAVE_LIBM_MACHINE_I386_TRUE@am__append_151 = 
 @HAVE_LIBM_MACHINE_I386_TRUE@am__append_152 = 
 @HAVE_LIBM_MACHINE_MIPS_TRUE@am__append_153 = $(libm_machine_mips_src)
 @HAS_NDS32_FPU_SP_TRUE@@HAVE_LIBM_MACHINE_NDS32_TRUE@am__append_154 = libm/machine/nds32/wf_sqrt.S
@@ -993,11 +993,11 @@ check_PROGRAMS =
 @HAVE_LIBM_MACHINE_SPU_TRUE@am__append_160 = $(libm_machine_spu_src)
 @HAVE_LIBM_MACHINE_RISCV_TRUE@am__append_161 = $(libm_machine_riscv_src)
 @HAVE_LIBM_MACHINE_RISCV_TRUE@@HAVE_LONG_DOUBLE_TRUE@am__append_162 = $(libm_ld128_lsrc)
-@HAVE_LIBM_MACHINE_RISCV_TRUE@am__append_163 =
+@HAVE_LIBM_MACHINE_RISCV_TRUE@am__append_163 = 
 @HAVE_LIBM_MACHINE_RISCV_TRUE@am__append_164 = 
 @HAVE_LIBM_MACHINE_X86_64_TRUE@am__append_165 = $(libm_machine_x86_64_src)
 @HAVE_LIBM_MACHINE_X86_64_TRUE@@HAVE_LONG_DOUBLE_TRUE@am__append_166 = $(libm_ld80_lsrc)
-@HAVE_LIBM_MACHINE_X86_64_TRUE@am__append_167 =
+@HAVE_LIBM_MACHINE_X86_64_TRUE@am__append_167 = 
 @HAVE_LIBM_MACHINE_X86_64_TRUE@am__append_168 = 
 @HAVE_LIBM_MACHINE_XTENSA_TRUE@@XTENSA_XCHAL_HAVE_FP_SQRT_TRUE@am__append_169 = \
 @HAVE_LIBM_MACHINE_XTENSA_TRUE@@XTENSA_XCHAL_HAVE_FP_SQRT_TRUE@	libm/machine/xtensa/ef_sqrt.c
@@ -4001,6 +4001,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 shared_machine_dir = @shared_machine_dir@
 sharedstatedir = @sharedstatedir@
diff --git a/newlib/configure b/newlib/configure
index bd5f641b48b4..33a2ed1c56a5 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -950,6 +950,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1000,6 +1001,7 @@ enable_newlib_retargetable_locking
 enable_newlib_long_time_t
 enable_newlib_use_gdtoa
 enable_newlib_use_malloc_in_execl
+enable_newlib_hw_misaligned_access
 enable_multilib
 enable_target_optspace
 enable_malloc_debugging
@@ -1062,6 +1064,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1314,6 +1317,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1451,7 +1463,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1604,6 +1616,7 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1670,6 +1683,7 @@ Optional Features:
   --enable-newlib-long-time_t   define time_t to long
   --enable-newlib-use-gdtoa   Use gdtoa rather than legacy ldtoa
   --enable-newlib-use-malloc-in-execl   use malloc instead of alloca in execl, execle and execlp
+  --enable-newlib-hw-misaligned-access   Use hardware word-by-word access instead of byte-by-byte for misaligned memory
   --enable-multilib       build many library versions (default)
   --enable-target-optspace  optimize for space
   --enable-malloc-debugging indicate malloc debugging requested
@@ -2607,6 +2621,19 @@ else
   newlib_use_malloc_in_execl=no
 fi
 
+# Check whether --enable-newlib-hw-misaligned-access was given.
+if test "${enable_newlib_hw_misaligned_access+set}" = set; then :
+  enableval=$enable_newlib_hw_misaligned_access; if test "${newlib_hw_misaligned_access+set}" != set; then
+  case "${enableval}" in
+  yes) newlib_hw_misaligned_access=yes;;
+  no)  newlib_hw_misaligned_access=no ;;
+  *)   as_fn_error $? "bad value ${enableval} for newlib-hw-misaligned-access option" "$LINENO" 5 ;;
+  esac
+ fi
+else
+  newlib_hw_misaligned_access=
+fi
+
 # Default to --enable-multilib
 # Check whether --enable-multilib was given.
 if test "${enable_multilib+set}" = set; then :
@@ -6693,6 +6720,42 @@ $as_echo "#define _EXECL_USE_MALLOC 1" >>confdefs.h
 
 fi
 
+if test "x${newlib_hw_misaligned_access}" = "x"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC has enabled misaligned hardware access" >&5
+$as_echo_n "checking if $CC has enabled misaligned hardware access... " >&6; }
+if ${newlib_cv_hw_misaligned_access+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    cat > conftest.c <<EOF
+#if __riscv_misaligned_fast || __riscv_misaligned_slow
+void misalign_access_supported(void) {}
+#else
+#error "misaligned access is not supported"
+#endif
+EOF
+  newlib_cv_hw_misaligned_access=no
+  if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+  then
+    newlib_cv_hw_misaligned_access=yes
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $newlib_cv_hw_misaligned_access" >&5
+$as_echo "$newlib_cv_hw_misaligned_access" >&6; }
+  newlib_hw_misaligned_access=$newlib_cv_hw_misaligned_access
+fi
+
+if test "${newlib_hw_misaligned_access}" = "yes"; then
+
+$as_echo "#define _HAVE_HW_MISALIGNED_ACCESS 1" >>confdefs.h
+
+fi
+
 
 if test "x${iconv_encodings}" != "x" \
    || test "x${iconv_to_encodings}" != "x" \
diff --git a/newlib/newlib.hin b/newlib/newlib.hin
index 22e323e48f37..52cd500dbfe7 100644
--- a/newlib/newlib.hin
+++ b/newlib/newlib.hin
@@ -47,6 +47,10 @@
 /* Define if compiler supports -fno-tree-loop-distribute-patterns. */
 #undef _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
 
+/* Define if hardware has little to no penalty for misaligned memory access.
+   */
+#undef _HAVE_HW_MISALIGNED_ACCESS
+
 /* Define if the linker supports .preinit_array/.init_array/.fini_array
    sections. */
 #undef _HAVE_INITFINI_ARRAY


More information about the Newlib-cvs mailing list