bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettext-tools 0.21.1 failing on NetBSD sparc (32 bit)


From: vom513
Subject: gettext-tools 0.21.1 failing on NetBSD sparc (32 bit)
Date: Tue, 23 May 2023 17:27:34 -0400

Hello,


I am able to build gettext-tools 0.21 on NetBSD sparc just fine.  0.21.1 fails.  Here is my NetBSD bug report:


http://gnats.netbsd.org/57425


So it seems to fail on ftello bits.  However (and I’m not sure this is related ? cause ?) - I notice in my 0.21 tree - gcc runs as expected, but in 0.21.1 - it runs -mcpu=v9.


I see this commit, which is the closest thing I can find regarding Sparc related stuff in 0.21.2:


https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=45c8d0aec9023ddf4c0ab9f12d67fc2f7e66df2c


Seems like the reporter was having a different issue.  But the mention of 32-bit caught my eye.


Also, another difference I see between the versions is this (sorry it’s a bit long…):


2022Q4-qemu$ pwd

/usr/pkgsrc/devel/gettext-tools/work/gettext-0.21/gettext-tools/gnulib-m4

2022Q4-qemu$ ls -la sparc*

ls: sparc*: No such file or directory


CVS-qemu$ pwd

/usr/pkgsrc/devel/gettext-tools/work/gettext-0.21.1/gettext-tools/gnulib-m4

CVS-qemu$ ls -la sparc*

-rw-rw-r--  1 root  wheel  1652 Sep 11  2022 sparcv8+.m4

CVS-qemu$ cat sparcv8+.m4

# sparcv8+.m4 serial 1

dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.

dnl This file is free software; the Free Software Foundation

dnl gives unlimited permission to copy and/or distribute it,

dnl with or without modifications, as long as this notice is preserved.


dnl When compiling for SPARC in 32-bit mode, make sure that instructions for

dnl SPARC v8+ are accepted.  This is necessary for multiprocessing (for

dnl instructions like 'membar' or 'cas').  All SPARC CPUs made since 1993

dnl support this instruction set.  But GCC in its default configuration, in

dnl 32-bit mode (64-bit mode assumes SPARC v9 or newer), still defaults to

dnl SPARC v7 instruction set: "By default (unless configured otherwise), GCC

dnl generates code for the V7 variant of the SPARC architecture."  See

dnl <https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/SPARC-Options.html>

dnl <https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/SPARC-Options.html>


AC_DEFUN([gl_SPARC_V8PLUS],

[

 AC_REQUIRE([AC_CANONICAL_HOST])


 case "$host_cpu" in

   sparc*)

     if test -n "$GCC"; then

       AC_CACHE_CHECK([whether SPARC v8+ instructions are supported],

         [gl_cv_sparc_v8plus],

         [AC_COMPILE_IFELSE(

            [AC_LANG_PROGRAM(

               [[]],

               [[asm volatile ("membar 2");]])],

            [gl_cv_sparc_v8plus=yes],

            [gl_cv_sparc_v8plus=no])

         ])

       if test $gl_cv_sparc_v8plus = no; then

         dnl Strangely enough, '-mv8plus' does not have the desired effect.

         dnl But '-mcpu=v9' does.

         CC="$CC -mcpu=v9"

         CXX="$CXX -mcpu=v9"

       fi

     fi

     ;;

 esac

])

Thanks for any info.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]