public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/113888] New: libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64
@ 2024-02-12 10:15 ro at gcc dot gnu.org
  2024-02-12 10:16 ` [Bug modula2/113888] " ro at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ro at gcc dot gnu.org @ 2024-02-12 10:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113888

            Bug ID: 113888
           Summary: libm2pim/target.c doesn't assemble on 32-bit
                    Linux/sparc64
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: sparc64-unknown-linux-gnu

When doing a multilib build of trunk on Linux/sparc64, the 32-bit
libm2pim/target.c
fails to assemble:

libtool: compile: 
/var/gcc/regression/master/6.6.15-gcc-gas-gld/build/./gcc/xgcc
-B/var/gcc/regression/master/6.6.15-gcc-gas-gld/build/./gcc/
-B/vol/gcc/sparc64-unknown-linux-gnu/bin/
-B/vol/gcc/sparc64-unknown-linux-gnu/lib/ -isystem
/vol/gcc/sparc64-unknown-linux-gnu/include -isystem
/vol/gcc/sparc64-unknown-linux-gnu/sys-include -fchecking=1 -m32
-DHAVE_CONFIG_H -I. -I/vol/gcc/src/hg/master/local/libgm2/libm2pim -I.. -I.
-I.. -I/vol/gcc/src/hg/master/local/gcc/m2/gm2-libs
-I/vol/gcc/src/hg/master/local/gcc/m2/gm2-libs-iso -DBUILD_GM2_LIBS
-I/vol/gcc/src/hg/master/local/libgm2/libm2pim/../
-I/vol/gcc/src/hg/master/local/libgm2/libm2pim/../libm2iso -g -O2 -m32 -MT
libm2pim_la-target.lo -MD -MP -MF .deps/libm2pim_la-target.Tpo -c
/vol/gcc/src/hg/master/local/libgm2/libm2pim/target.c  -fPIC -DPIC -o
.libs/libm2pim_la-target.o
/tmp/ccoaQS64.s: Assembler messages:
/tmp/ccoaQS64.s:110: Error: symbol `exp10' is already defined
make[9]: *** [Makefile:676: libm2pim_la-target.lo] Error 1

while 64-bit compilation works.

The issue turns out to be multifold:

* The preprocessed input has

extern long double exp10l (long double __x) __asm__ ("" "exp10") __attribute__
((__nothrow__ , __leaf__));

* This leads to both the exp10 and exp10l fallback definitions end up with
  same name (exp10), causing the redefinition error from gas.

* Ultimately, the error is different, though: none of HAVE_EXP10 and
HAVE_EXP10L
  are ever checked for, otherwise the fallsbacks wouldn't be used at all.
  The same applies to a couple of other autoconf macros used inside the
  libgm2 tree.

I'm going to provide a patch to fix all that.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug modula2/113888] libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64
  2024-02-12 10:15 [Bug modula2/113888] New: libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64 ro at gcc dot gnu.org
@ 2024-02-12 10:16 ` ro at gcc dot gnu.org
  2024-02-12 12:32 ` ro at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ro at gcc dot gnu.org @ 2024-02-12 10:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113888

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Target Milestone|---                         |14.0
   Last reconfirmed|                            |2024-02-12
             Status|UNCONFIRMED                 |NEW

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug modula2/113888] libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64
  2024-02-12 10:15 [Bug modula2/113888] New: libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64 ro at gcc dot gnu.org
  2024-02-12 10:16 ` [Bug modula2/113888] " ro at gcc dot gnu.org
@ 2024-02-12 12:32 ` ro at gcc dot gnu.org
  2024-02-12 13:02 ` cvs-commit at gcc dot gnu.org
  2024-02-12 13:05 ` ro at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ro at gcc dot gnu.org @ 2024-02-12 12:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113888

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2024-Februar
                   |                            |y/645393.html

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Patch posted.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug modula2/113888] libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64
  2024-02-12 10:15 [Bug modula2/113888] New: libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64 ro at gcc dot gnu.org
  2024-02-12 10:16 ` [Bug modula2/113888] " ro at gcc dot gnu.org
  2024-02-12 12:32 ` ro at gcc dot gnu.org
@ 2024-02-12 13:02 ` cvs-commit at gcc dot gnu.org
  2024-02-12 13:05 ` ro at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-12 13:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113888

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Rainer Orth <ro@gcc.gnu.org>:

https://gcc.gnu.org/g:0437cbdccb91da6a8c25b2c29e9f19a9585309fc

commit r14-8928-g0437cbdccb91da6a8c25b2c29e9f19a9585309fc
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date:   Mon Feb 12 14:01:41 2024 +0100

    libgm2: Define missing configure macros [PR113888]

    As detailed in PR modula2/113888, the 32-bit libm2pim/target.c doesn't
    assemble in a Linux/sparc64 multilib build.  However, the root cause is
    that the HAVE_EXP10* macros are never defined.  While I was at it, I
    checked for other cases where the code uses HAVE_* macros that are
    missing from config.h.in.

    This patch adds the missing checks, changes the configure checks where
    the names don't match what's used in the code, or corrects the code to
    use the right names.

    So far tested on sparc64-unknown-linux-gnu by building libgm2 (32 and
    64-bit) and running the gm2 tests.

    2024-02-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

            libgm2:
            PR modula2/113888
            * configure.ac (GM2_CHECK_LIB): Rename gettimeofday guard to
            HAVE_GETTIMEOFDAY.
            (GM_CHECK_LIB): Check for settimeofday.
            (GM2_CHECK_LIB): Check for exp10, exp10f, exp10l in libm.
            (AC_CHECK_DECLS): Check for getenv.
            * configure, config.h.in: Regenerate.
            * libm2pim/dtoa.cc: Rename <strings.h>, <string.h> guards to
            HAVE_STRINGS_H, HAVE_STRING_H.
            * libm2pim/ldtoa.cc: Likewise.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug modula2/113888] libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64
  2024-02-12 10:15 [Bug modula2/113888] New: libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64 ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-02-12 13:02 ` cvs-commit at gcc dot gnu.org
@ 2024-02-12 13:05 ` ro at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ro at gcc dot gnu.org @ 2024-02-12 13:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113888

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Assignee|gaius at gcc dot gnu.org           |ro at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> ---
Mine, fixed for GCC 14.0.1.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-12 13:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-12 10:15 [Bug modula2/113888] New: libm2pim/target.c doesn't assemble on 32-bit Linux/sparc64 ro at gcc dot gnu.org
2024-02-12 10:16 ` [Bug modula2/113888] " ro at gcc dot gnu.org
2024-02-12 12:32 ` ro at gcc dot gnu.org
2024-02-12 13:02 ` cvs-commit at gcc dot gnu.org
2024-02-12 13:05 ` ro at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).