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

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).