This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 4304
  ld --fatal-warnings doesn't work Last modified: 2007-04-05 16:17:03
     Query page      Enter new bug
Bug#: 4304   Hardware:   Reporter: Robert Connolly <robert@linuxfromscratch.org>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: unassigned@sources.redhat.com   Target Milestone:  
Summary:
Keywords:

Attachment Description Type Created Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 4304 depends on: Show dependency tree
Show dependency graph
Bug 4304 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2007-03-31 18:50
Hello.

To reproduce this bug get yourself a copy of Gzip source and do:

env CFLAGS="-fpie -O2" \
 LDFLAGS="-Wl,--warn-shared-textrel -Wl,--fatal-warnings -pie" \
  ./configure &&
make

Then you should get something like this:

gcc -std=gnu99  -fpie -O2  -Wl,--warn-shared-textrel -Wl,--fatal-warnings -o 
gzip bits.o crypt.o deflate.o gzip.o inflate.o lzw.o trees.o unlzh.o unlzw.o 
unpack.o unzip.o util.o zip.o lib/libgzip.a
/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: 
warning: creating a DT_TEXTREL in a shared object.

and you might notice the warning is not fatal...

Tested on binutils-2.17 and binutils-070315.

P.S.
I also noticed adding -Werror and -Wfatal-errors GCC flags had no effect.

------- Additional Comment #1 From H.J. Lu 2007-04-05 14:41 -------
A patch is posted at

http://sourceware.org/ml/binutils/2007-04/msg00057.html

------- Additional Comment #2 From H.J. Lu 2007-04-05 16:58 -------
A simple patch is at

http://sourceware.org/ml/binutils/2007-04/msg00059.html

------- Additional Comment #3 From H.J. Lu 2007-04-05 17:17 -------
Fixed by

http://sourceware.org/ml/binutils/2007-04/msg00061.html

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In