public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/98784] [8/9/10/11 Regression] problematic build of uClibc with -fPIC
Date: Sat, 23 Jan 2021 21:56:49 +0000	[thread overview]
Message-ID: <bug-98784-4-hBJZvYXekJ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98784-4@http.gcc.gnu.org/bugzilla/>

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[8/9/10/11 Regression]      |[8/9/10/11 Regression]
                   |sparcv8 regression          |problematic build of uClibc
                   |                            |with -fPIC

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The previous gcc command line was from the busybox build (without -fPIC) but
> this is not busybox that crash... this is the libc.
> 
> See how the libc (uClibc) was built:
> 
> output/host/bin/sparc-buildroot-linux-uclibc-gcc -c libc/stdlib/atoll.c -o
> libc/stdlib/atoll.os -Wall -Wstrict-prototypes -Wstrict-aliasing
> -Wno-nonnull-compare -funsigned-char -fno-builtin -fcommon -fno-asm
> -fmerge-all-constants -std=gnu99 -mcpu=v8 -fno-stack-protector -nostdinc
> -I./include -I./include -include libc-symbols.h -I./libc/sysdeps/linux/sparc
> -I./libc/sysdeps/linux -I./ldso/ldso/sparc -I./ldso/include -I. -Os
> -fstrict-aliasing -D__USE_STDIO_FUTEXES__ -DHAVE_FORCED_UNWIND
> -D_LIBC_REENTRANT -I./libpthread/nptl -I./libpthread/nptl
> -I./libpthread/nptl/sysdeps/unix/sysv/linux/sparc
> -I./libpthread/nptl/sysdeps/sparc -I./libpthread/nptl/sysdeps/sparc
> -I./libpthread/nptl/sysdeps/unix/sysv/linux
> -I./libpthread/nptl/sysdeps/unix/sysv/linux
> -I./libpthread/nptl/sysdeps/pthread -I./libpthread/nptl/sysdeps/pthread/bits
> -I./libpthread/nptl/sysdeps/generic -I./libc/sysdeps/linux/common -isystem
> output/host/lib/gcc/sparc-buildroot-linux-uclibc/10.2.0/include-fixed
> -isystem output/host/lib/gcc/sparc-buildroot-linux-uclibc/10.2.0/include
> -Ioutput/build/linux-headers-5.4.88/usr/include/ -DNDEBUG -DIN_LIB=libc
> -fPIC -MT libc/stdlib/atoll.os -MD -MP -MF libc/stdlib/.atoll.os.dep
> 
> Indeed we have "-fPIC"

OK, this makes sense now and this looks like a bootstrap problem, e.g. the code
setting up _GLOBAL_OFFSET_TABLE_ in the libc might be trying to access it or
something along this line.

Can you find out which module of uClibc sets up _GLOBAL_OFFSET_TABLE_ and
confirm that it is compiled with -fPIC as well?  If so, would it be possible
*not* to compile with -fPIC?

  parent reply	other threads:[~2021-01-23 21:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 22:13 [Bug c/98784] New: [gcc 8.4/9.3/10] sparcv8 regression romain.naour at gmail dot com
2021-01-21 23:01 ` [Bug c/98784] " ebotcazou at gcc dot gnu.org
2021-01-21 23:26 ` romain.naour at gmail dot com
2021-01-21 23:43 ` ebotcazou at gcc dot gnu.org
2021-01-22  7:33 ` [Bug target/98784] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
2021-01-23 11:43 ` romain.naour at gmail dot com
2021-01-23 17:33 ` ebotcazou at gcc dot gnu.org
2021-01-23 20:07 ` romain.naour at gmail dot com
2021-01-23 21:56 ` ebotcazou at gcc dot gnu.org [this message]
2021-01-24  9:17 ` [Bug target/98784] [8/9/10/11 Regression] problematic build of uClibc with -fPIC ebotcazou at gcc dot gnu.org
2021-01-26 21:24 ` romain.naour at gmail dot com
2021-01-26 22:29 ` romain.naour at gmail dot com
2021-04-09  8:08 ` rguenth at gcc dot gnu.org
2021-05-14  9:54 ` [Bug target/98784] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:19 ` rguenth at gcc dot gnu.org
2021-06-28 16:40 ` yann at sionneau dot net
2021-06-28 16:50 ` yann at sionneau dot net
2022-05-27  9:44 ` [Bug target/98784] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 10:38 ` [Bug target/98784] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-08-08  9:51 ` wbx at openadk dot org
2024-04-30 15:05 ` [Bug target/98784] [11/12/13/14/15 " dm.chestnykh at gmail dot com
2024-04-30 17:55 ` dm.chestnykh at gmail dot com
2024-04-30 17:59 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98784-4-hBJZvYXekJ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).