From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A535838438A3; Sat, 23 Jan 2021 21:56:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A535838438A3 From: "ebotcazou at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2021 21:56:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98784 Eric Botcazou 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 --- > The previous gcc command line was from the busybox build (without -fPIC) = but > this is not busybox that crash... this is the libc. >=20 > See how the libc (uClibc) was built: >=20 > 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=3Dgnu99 -mcpu=3Dv8 -fno-stack-protector -nostd= inc > -I./include -I./include -include libc-symbols.h -I./libc/sysdeps/linux/sp= arc > -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/b= its > -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=3Dlibc > -fPIC -MT libc/stdlib/atoll.os -MD -MP -MF libc/stdlib/.atoll.os.dep >=20 > 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?=