[Bug 836588] Re: armel FTBFS with gcc 4.5 org 4.6 O2 and fPIC

Bug Watch Updater 836588 at bugs.launchpad.net
Thu Oct 27 12:19:35 UTC 2011


Launchpad has imported 12 comments from the remote bug at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48308.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-03-28T02:30:01+00:00 Dev-gcc-20110327-b588 wrote:

Created attachment 23786
reduced testcase

Hello,

I tried to crosscompile openssl to arm and it stopped with the following
error message:

{standard input}: Assembler messages:
{standard input}:113: Error: can't resolve `.LC4' {.rodata.str1.1 section} - `.LPIC4' {*UND* section}

This happens only if I try to compile the file with "-Os -fPIC".

/data/br-build/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc -fPIC
-Os -c pkeyparam.out.i

Output of arm-unknown-linux-uclibcgnueabi-gcc -v:

COLLECT_GCC=/data/br-build/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc
COLLECT_LTO_WRAPPER=/data/br-build/host/usr/libexec/gcc/arm-unknown-linux-uclibcgnueabi/4.6.0/lto-wrapper
Target: arm-unknown-linux-uclibcgnueabi
Configured with: /data/br-build/toolchain/gcc-4.6.0/configure --prefix=/home/data/br-build/host/usr --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-unknown-linux-uclibcgnueabi --enable-languages=c --with-sysroot=/data/br-build/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot --with-build-time-tools=/data/br-build/host/usr/arm-unknown-linux-uclibcgnueabi/bin --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-libssp --disable-multilib --disable-tls --enable-shared --with-gmp=/data/br-build/host/usr --with-mpfr=/data/br-build/host/usr --with-mpc=/data/br-build/host/usr --enable-threads --disable-decimal-float --with-float=soft --with-abi=aapcs-linux --with-pkgversion='Buildroot 2011.05-git-dirty' --with-bugurl=http://bugs.buildroot.net/
Thread model: posix
gcc version 4.6.0 (Buildroot 2011.05-git-dirty)

Output of arm-unknown-linux-uclibcgnueabi-as -version:

GNU assembler (GNU Binutils) 2.21
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-unknown-linux-uclibcgnueabi'

Regards,
  Gerhard

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/0

------------------------------------------------------------------------
On 2011-03-28T07:47:41+00:00 Mikpe wrote:

Works for me on armv5tel-linux-gnueabi with gcc-4.6-20110325 (r171529)
and binutils-2.20.1 (heavily updated).  Please attach the intermediate
assembly file.

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/1

------------------------------------------------------------------------
On 2011-03-28T12:34:31+00:00 Dev-gcc-20110327-b588 wrote:

Created attachment 23791
generated assembler

On line 114, the generates assembler code refers to .LPIC4, which does
not exists.

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/2

------------------------------------------------------------------------
On 2011-03-28T13:09:15+00:00 Mikpe wrote:

(In reply to comment #2)
> Created attachment 23791 [details]
> generated assembler
> 
> On line 114, the generates assembler code refers to .LPIC4, which does not
> exists.

Indeed.  If I compile with -mcpu=arm9tdmi as your assembly file
indicates then I lose several lines of code, including the .LPIC4 label
and a strcmp() call, but the reference to .LPIC4 remained.  Normally I
have -march=armv5te -mtune=xscale, and in that case the .LPIC4 label and
surrounding code is not lost.

Works(*) with gcc-4.4.5 and 4.5.2, so it's a regression.

(*) Had to eliminate some apparent C1X-isms from the test case though.

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/3

------------------------------------------------------------------------
On 2011-03-28T22:24:05+00:00 Mikpe wrote:

It's triggered by r163998:

Author: matz
Date: Wed Sep  8 12:34:52 2010
New Revision: 163998

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163998
Log:
	PR tree-optimization/33244
	* tree-ssa-sink.c (statement_sink_location): Don't sink into
	empty loop latches.

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/4

------------------------------------------------------------------------
On 2011-03-28T22:57:21+00:00 Mikpe wrote:

Created attachment 23793
reduced^2 test case

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/5

------------------------------------------------------------------------
On 2011-03-29T15:23:12+00:00 Ibolton wrote:

Using trunk, r171422, I have compiled the reduced test case as follows:

arm-none-linux-gnueabi-gcc -fPIC -Os -c pr48308.c -mcpu=arm9tdmi -marm
pr48308.s: Assembler messages:
pr48308.s:97: Error: can't resolve `.LC4' {.rodata.str1.1 section} - `.LPIC4' {*UND* section}

With --save-temps, you can see the missing .LPIC4 in the .s.

This is therefore confirmed in trunk as well.

FYI: the problem doesn't happen with -mthumb.

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/6

------------------------------------------------------------------------
On 2011-06-22T15:14:06+00:00 Michael K. Edwards wrote:

I hit this with Linaro GCC 4.6 (4.6.1-based) and the same pkeyparam.c
from OpenSSL.  I am also compiling with -Os and -fPIC, and implicitly
with -mthumb (the default in my toolchain); so it's not specific to ARM
mode.

The situation appears to be that two pc-relative fetches (artifacts of
-fPIC and string literals) get folded together, losing one of the labels
(needed for calculation of the offset in the table of PIC indirections).

Reverting http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163998 makes
the problem go away, at least at compile time; I should be able to run a
test suite soon.

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/7

------------------------------------------------------------------------
On 2011-06-24T09:15:08+00:00 Ramana-gcc wrote:

Not sure if this is a target or tree-optimization issue yet.

Ramana

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/8

------------------------------------------------------------------------
On 2011-09-07T07:53:23+00:00 Pinskia wrote:

(In reply to comment #8)
> Not sure if this is a target or tree-optimization issue yet.

The tree level change just exposed the issue really.  I think you need
to look at the RTL level to see where the label disappears.

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/15

------------------------------------------------------------------------
On 2011-09-13T06:31:39+00:00 Ramana-gcc wrote:

*** Bug 50313 has been marked as a duplicate of this bug. ***

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/18

------------------------------------------------------------------------
On 2011-10-26T17:14:01+00:00 Jakub-gcc wrote:

GCC 4.6.2 is being released.

Reply at: https://bugs.launchpad.net/gcc/+bug/836588/comments/21


** Changed in: gcc
       Status: Unknown => In Progress

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.5 in Ubuntu.
https://bugs.launchpad.net/bugs/836588

Title:
  armel FTBFS with gcc 4.5 org 4.6 O2 and fPIC

Status in The GNU Compiler Collection:
  In Progress
Status in Linaro GCC:
  Triaged
Status in “gcc-4.5” package in Ubuntu:
  Confirmed
Status in “gcc-4.6” package in Ubuntu:
  Confirmed
Status in “gmime2.4” package in Ubuntu:
  Fix Released

Bug description:
  A reference to an inexistent label in the asm file causes FTBFS.
  Using -O1 or dropping -fPIC works fine, so does gcc-4.4 with O2 and fPIC on.

  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../util -DGMIME_VERSION=\"2.4.26\" -DGMIME_MAJOR_VERSION=2 -DGMIME_MINOR_VERSION=4 -DGMIME_MICRO_VERSION=26 -DG_LOG_DOMAIN=\"gmime\" -DG_DISABLE_DEPRECATED -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabi/glib-2.0/include  -O2  -c gmime-param.c  -fPIC  -o .libs/gmime-param.o
  /tmp/ccDqUYcb.s: Assembler messages:
  /tmp/ccDqUYcb.s:1153: Error: can't resolve `.rodata' {.rodata section} - `.LPIC20' {*UND* section}

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/836588/+subscriptions




More information about the foundations-bugs mailing list