[Bug gold/5986] New: build failure with gcc 4.3.0

2008-03-25 Thread cryptooctoploid at gmail dot com
if g++ -DHAVE_CONFIG_H -I. -I.././gold -I. -I.././gold -I.././gold/../include
-I.././gold/../elfcpp -DLOCALEDIR="\"/usr/share/locale\""
-DBINDIR="\"/usr/bin\"" -DTOOLBINDIR="\"/usr/x86_64-unknown-linux-gnu/bin\""   
-W -Wall   -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=k8
-pipe -MT dynobj.o -MD -MP -MF ".deps/dynobj.Tpo" -c -o dynobj.o dynobj.cc; \
then mv -f ".deps/dynobj.Tpo" ".deps/dynobj.Po"; else rm -f
".deps/dynobj.Tpo"; exit 1; fi
In file included from dynobj.cc:30:
script.h: In member function ‘bool
gold::Version_script_info::symbol_is_local(const char*) const’:
script.h:152: error: invalid use of incomplete type ‘const struct
std::basic_string, std::allocator >’
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0/include/g++-v4/bits/stringfwd.h:56:
error: declaration of ‘const struct std::basic_string, std::allocator >’
script.h:153: error: invalid use of incomplete type ‘const struct
std::basic_string, std::allocator >’
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.0/include/g++-v4/bits/stringfwd.h:56:
error: declaration of ‘const struct std::basic_string, std::allocator >’
script.h: At global scope:
script.h:247: error: field ‘name_’ has incomplete type
script.h: In constructor ‘gold::Symbol_assignment::Symbol_assignment(const
char*, size_t, gold::Expression*, bool, bool)’:
script.h:206: error: class ‘gold::Symbol_assignment’ does not have any field
named ‘name_’
script.h: At global scope:
script.h:282: error: field ‘message_’ has incomplete type
script.h: In constructor
‘gold::Script_assertion::Script_assertion(gold::Expression*, const char*, 
size_t)’:
script.h:267: error: class ‘gold::Script_assertion’ does not have any field
named ‘message_’
script.h: At global scope:
script.h:376: error: field ‘entry_’ has incomplete type
make[4]: *** [dynobj.o] Error 1
make[4]: Leaving directory `/home/markus/binutils/src/gold'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/markus/binutils/src/gold'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/markus/binutils/src/gold'
make[1]: *** [all-gold] Error 2
make[1]: Leaving directory `/home/markus/binutils/src'
make: *** [all] Error 2

-- 
   Summary: build failure with gcc 4.3.0
   Product: binutils
   Version: 2.19 (HEAD)
Status: NEW
      Severity: normal
          Priority: P2
 Component: gold
AssignedTo: ian at airs dot com
ReportedBy: cryptooctoploid at gmail dot com
CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=5986

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] New: linux kernel linked with gold fails to boot

2008-04-15 Thread cryptooctoploid at gmail dot com
Any kernel linked with the latest (or any) version of gold (GNU gold (GNU
Binutils 2.18.50.20080415) 1.5) fails to boot.

Normal kernel:

# file kernel176
kernel176: Linux kernel x86 boot executable RO-rootFS, root_dev 0x801, swap_dev
0x1, Normal VGA

kernel linked with gold:

# file kernel177
kernel177: x86 boot sector; partition 4: ID=0x1, starthead 0, startsector 1,
134348799 sectors

I guess linking fails in the last stages of kernel building.

-- 
   Summary: linux kernel linked with gold fails to boot
   Product: binutils
   Version: 2.19 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: ian at airs dot com
ReportedBy: cryptooctoploid at gmail dot com
CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] linux kernel linked with gold fails to boot

2008-04-15 Thread cryptooctoploid at gmail dot com

--- Additional Comments From cryptooctoploid at gmail dot com  2008-04-15 
14:41 ---
I narrowed it down to one linker script, namely arch/x86/boot/setup.ld .

On my machine (amd64) running: 
ld -m elf_x86_64   -T arch/x86/boot/setup.ld arch/x86/boot/a20.o
arch/x86/boot/cmdline.o arch/x86/boot/copy.o arch/x86/boot/cpu.o
arch/x86/boot/cpucheck.o arch/x86/boot/edd.o arch/x86/boot/header.o
arch/x86/boot/main.o arch/x86/boot/mca.o arch/x86/boot/memory.o
arch/x86/boot/pm.o arch/x86/boot/pmjump.o arch/x86/boot/printf.o
arch/x86/boot/string.o arch/x86/boot/tty.o arch/x86/boot/video.o
arch/x86/boot/version.o arch/x86/boot/video-vga.o arch/x86/boot/video-vesa.o
arch/x86/boot/video-bios.o -o arch/x86/boot/setup.elf
and then
objcopy  -O binary arch/x86/boot/setup.elf arch/x86/boot/setup.bin
using the default linker, I get:
% file setup.bin
setup.bin: Linux kernel x86 boot executable RO-rootFS, Normal VGA

with gold I get:
% file setup.bin
setup.bin: x86 boot sector; partition 4: ID=0x1, starthead 0, startsector 0,
65535 sectors

So something wents wrong here. I'm no linker expert, but maybe you immediately
see whats wrong with arch/x86/boot/setup.ld.



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] linux kernel linked with gold fails to boot

2008-04-15 Thread cryptooctoploid at gmail dot com

--- Additional Comments From cryptooctoploid at gmail dot com  2008-04-15 
15:04 ---
Created an attachment (id=2695)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2695&action=view)
dumpelf -vv setup.elf > dump_ld


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] linux kernel linked with gold fails to boot

2008-04-15 Thread cryptooctoploid at gmail dot com

--- Additional Comments From cryptooctoploid at gmail dot com  2008-04-15 
15:05 ---
Created an attachment (id=2696)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=2696&action=view)
dumpelf -vv setup.elf >dump_gold


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] linux kernel linked with gold fails to boot

2008-04-15 Thread cryptooctoploid at gmail dot com


-- 
   What|Removed |Added

   Attachment #2695|application/octet-stream|text/plain
  mime type||
Attachment #2695 is|0   |1
  patch||


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] linux kernel linked with gold fails to boot

2008-04-15 Thread cryptooctoploid at gmail dot com


-- 
   What|Removed |Added

   Attachment #2696|application/octet-stream|text/plain
  mime type||
Attachment #2696 is|0   |1
  patch||


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13311] internal error, aborting at bfd.c line 649 in _bfd_default_error_handler

2011-10-17 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13311

--- Comment #1 from Octoploid  2011-10-17 
20:17:45 UTC ---
Created attachment 6013
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6013
testcase

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13311] New: internal error, aborting at bfd.c line 649 in _bfd_default_error_handler

2011-10-17 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13311

 Bug #: 13311
   Summary: internal error, aborting at bfd.c line 649 in
_bfd_default_error_handler
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: cryptooctopl...@gmail.com
Classification: Unclassified


Just came across this error while I was testing lto/linker-pluging settings:

 # make
gcc -fuse-linker-plugin -Wl,--as-needed,--gc-sections  luac.o liblua.so.5.1.4
/tmp/ccoAPG5W.ltrans0.ltrans.o: In function `combine.2469.2460':
ccoAPG5W.ltrans0.o:(.text+0x461): undefined reference to `luaF_newproto'
ccoAPG5W.ltrans0.o:(.text+0x4ba): undefined reference to `luaD_growstack'
ccoAPG5W.ltrans0.o:(.text+0x4e6): undefined reference to `luaS_newlstr'
ccoAPG5W.ltrans0.o:(.text+0x52d): undefined reference to `luaM_realloc_'
ccoAPG5W.ltrans0.o:(.text+0x53b): undefined reference to `luaM_toobig'
ccoAPG5W.ltrans0.o:(.text+0x579): undefined reference to `luaM_realloc_'
ccoAPG5W.ltrans0.o:(.text+0x587): undefined reference to `luaM_toobig'
/tmp/ccoAPG5W.ltrans0.ltrans.o: In function `pmain.2456.2241':
ccoAPG5W.ltrans0.o:(.text+0x7e0): undefined reference to `luaU_print'
ccoAPG5W.ltrans0.o:(.text+0x857): undefined reference to `luaU_dump'
liblua.so.5.1.4: undefined reference to `floor@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.22.51.20111015 internal error, aborting at bfd.c line 649
in _bfd_default_error_handler

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
Please report this bug.

collect2: error: ld returned 1 exit status
make: *** [all] Error 1

Testcase is attached

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13311] internal error, aborting at bfd.c line 649 in _bfd_default_error_handler

2011-10-18 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13311

--- Comment #3 from Octoploid  2011-10-18 
07:27:49 UTC ---
(In reply to comment #2)
> Can you try applying the first hunk (ie. the elf_link_output_extsym change)
> from the patch in http://sourceware.org/ml/binutils/2011-10/msg00123.html?

Yes, this hunk fixes the error.

Another thing that caught me eye are the undefined references to libc libraries
with bfd and --as-needed:

 # make
gcc -fuse-linker-plugin -Wl,--as-needed,--gc-sections  luac.o liblua.so.5.1.4
/tmp/ccwugZXD.ltrans0.ltrans.o: In function `combine.2469.2460':
ccwugZXD.ltrans0.o:(.text+0x461): undefined reference to `luaF_newproto'
ccwugZXD.ltrans0.o:(.text+0x4ba): undefined reference to `luaD_growstack'
ccwugZXD.ltrans0.o:(.text+0x4e6): undefined reference to `luaS_newlstr'
ccwugZXD.ltrans0.o:(.text+0x52d): undefined reference to `luaM_realloc_'
ccwugZXD.ltrans0.o:(.text+0x53b): undefined reference to `luaM_toobig'
ccwugZXD.ltrans0.o:(.text+0x579): undefined reference to `luaM_realloc_'
ccwugZXD.ltrans0.o:(.text+0x587): undefined reference to `luaM_toobig'
/tmp/ccwugZXD.ltrans0.ltrans.o: In function `pmain.2456.2241':
ccwugZXD.ltrans0.o:(.text+0x7e0): undefined reference to `luaU_print'
ccwugZXD.ltrans0.o:(.text+0x857): undefined reference to `luaU_dump'
liblua.so.5.1.4: undefined reference to `floor@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `ceil@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `sinh@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `atan@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `tan@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `dlopen@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `dlerror@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `sqrt@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `cosh@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `fmod@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `log10@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `sin@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `dlclose@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `cos@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `atan2@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `acos@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `tanh@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `exp@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `log@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `dlsym@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `asin@GLIBC_2.2.5'
liblua.so.5.1.4: undefined reference to `pow@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

gold:
 # make
gcc -fuse-linker-plugin -Wl,--as-needed,--gc-sections  luac.o liblua.so.5.1.4
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaF_newproto'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaD_growstack'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaS_newlstr'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaM_realloc_'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaM_toobig'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaM_realloc_'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function combine.2469.2460:
error: undefined reference to 'luaM_toobig'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function pmain.2456.2241:
error: undefined reference to 'luaU_print'
/tmp/ccG7JVZB.ltrans0.ltrans.o:ccG7JVZB.ltrans0.o:function pmain.2456.2241:
error: undefined reference to 'luaU_dump'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

But maybe this is harmless in this case, because the link fails anyway.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13311] internal error, aborting at bfd.c line 649 in _bfd_default_error_handler

2011-10-18 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13311

--- Comment #4 from Octoploid  2011-10-18 
12:07:52 UTC ---
(In reply to comment #3)
> Another thing that caught me eye are the undefined references to libc 
> libraries
> with bfd and --as-needed:

This appears to be the same bug as
http://sourceware.org/bugzilla/show_bug.cgi?id=13287 .

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/13311] internal error, aborting at bfd.c line 649 in _bfd_default_error_handler

2011-10-19 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13311

Octoploid  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #6 from Octoploid  2011-10-19 
07:20:52 UTC ---
Fixed. Thanks Alan.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13245] PREVAILING_DEF reported too often.

2011-11-02 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13245

Octoploid  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #15 from Octoploid  2011-11-02 
11:35:39 UTC ---
fixed

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/14342] [gold] symbol 'std::__once_callable' used as both __thread and non-__thread

2012-07-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14342

Octoploid  changed:

   What|Removed |Added

 CC||cryptooctoploid at gmail
   ||dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] linux kernel linked with gold fails to boot

2008-05-30 Thread cryptooctoploid at gmail dot com


-- 
   What|Removed |Added

 CC||andi at firstfloor dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] linux kernel linked with gold fails to boot

2008-05-30 Thread cryptooctoploid at gmail dot com

--- Additional Comments From cryptooctoploid at gmail dot com  2008-05-30 
16:42 ---
The kernel still does not boot on my machine (amd64) using the current »gold«
version. It prints this message:
»bad gzip magic number«

So we got a step further, but are still not quite there.

I noticed that Andy Kleen reported a similar problem on the binutils
mailinglist and wanted to look into the problem. 
Maybe he can give us an update?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6407] linux kernel linked with gold fails to boot

2008-05-30 Thread cryptooctoploid at gmail dot com

--- Additional Comments From cryptooctoploid at gmail dot com  2008-05-30 
17:51 ---
>I assume you are building a 64-bit kernel on the amd64 box?

Yes.

>Should we track this problem in a separate PR so it gets a unique ID?

Ok, I will enter a new bug.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6407

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/6584] New: kernel image decompression fails on 64bit machines (linked with gold)

2008-05-30 Thread cryptooctoploid at gmail dot com
A kernel linked with gold fails early in the boot process during
the kernel image decompression (»bad gzip magic number«). 
This happens an 64bit machines running 64bit kernels.

-- 
   Summary:  kernel image decompression fails on 64bit machines
(linked with gold)
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: ian at airs dot com
ReportedBy: cryptooctoploid at gmail dot com
CC: andi at firstfloor dot org,bug-binutils at gnu dot
org,kris dot van dot hees at oracle dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6584

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/10698] gold 2.20.51.0.1.20091009 fails to link linux kernel 2.6.31.1

2009-10-19 Thread cryptooctoploid at gmail dot com

--- Additional Comments From cryptooctoploid at gmail dot com  2009-10-19 
15:38 ---
Fixed in the 2.20 release here.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10698

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/12557] New: Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-09 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

   Summary: Firefox fails to build with -flto and --as-needed
LDFLAGS
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sources.redhat.com
ReportedBy: cryptooctopl...@gmail.com


Please see also:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375#c53

Firefox 4 fails to build with the following flags:
CXXFLAGS="-march=native -fpermissive -flto=4 -fuse-linker-plugin
-fwhole-program"
LDFLAGS="-Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory"

c++ -o xpcshell -fno-rtti -fno-exceptions -Wall -Wpointer-arith
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor
-Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type
-Wno-long-long -march=native -fpermissive -flto=4 -fuse-linker-plugin
-fwhole-program -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG
-DTRIMMED -O3  xpcshell.o   -lpthread
-Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory 
-Wl,-rpath-link,/var/tmp/mozilla-central/moz-build-dir/dist/bin
-Wl,-rpath-link,/usr/lib  -L../../../../dist/bin -L../../../../dist/lib
../../../../dist/lib/libxpcomglue_s.a
-L/var/tmp/mozilla-central/moz-build-dir/dist/bin -lxpcom -lmozalloc -lxul 
-L/var/tmp/mozilla-central/moz-build-dir/dist/bin -lxpcom -lmozalloc -lxul  
-Wl,-R/usr/lib64 -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl
../../../../dist/bin/libxul.so: undefined reference to `PR_smprintf_free'
../../../../dist/bin/libxul.so: undefined reference to `PR_SetEnv'
../../../../dist/bin/libxul.so: undefined reference to `PR_Now'
../../../../dist/bin/libxul.so: undefined reference to `PR_GetErrorText'
../../../../dist/bin/libxul.so: undefined reference to `PR_FindFunctionSymbol'
../../../../dist/bin/libxul.so: undefined reference to `PR_PushIOLayer'
../../../../dist/bin/libxul.so: undefined reference to `PR_ntohs'
../../../../dist/bin/libxul.so: undefined reference to `PR_FormatTimeUSEnglish'
../../../../dist/bin/libxul.so: undefined reference to `PR_MemMap'
../../../../dist/bin/libxul.so: undefined reference to `PR_LocalTimeParameters'
../../../../dist/bin/libxul.so: undefined reference to `PR_GetDefaultIOMethods'
../../../../dist/bin/libxul.so: undefined reference to `PR_ReadDir'
../../../../dist/bin/libxul.so: undefined reference to `PR_SetPollableEvent'
../../../../dist/bin/libxul.so: undefined reference to `PR_FindSymbol'
/usr/lib/libssl3.so: undefined reference to `PR_OpenAnonFileMap'
/usr/lib/libssl3.so: undefined reference to `PR_ExportFileMapAsString'
../../../../dist/bin/libxul.so: undefined reference to `PR_Delete'
../../../../dist/bin/libxul.so: undefined reference to `PR_AtomicSet'
/usr/lib/libnss3.so: undefined reference to `PR_NewRWLock'
../../../../dist/bin/libxul.so: undefined reference to `PR_SetNetAddr'
...

It builds fine without the "--as-needed" LDFLAG.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-09 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

Octoploid  changed:

   What|Removed |Added

 CC||cryptooctoploid at gmail
   ||dot com
  Component|binutils|ld

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-09 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #2 from Octoploid  2011-03-10 
06:31:09 UTC ---
The problem comes from:
"-Wl,-R/usr/lib64 -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl"
If I remove "-lnspr4" from above, ld links without any problem.

When I remove the whole system library part:
"-Wl,-R/usr/lib64 -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl" 
ld still links fine.

So it seems that ld gets irritated when you explicitly specify system 
libraries that it already figured out itself in the -flto/--as-needed case.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #4 from Octoploid  2011-03-10 
16:30:57 UTC ---
Created attachment 5285
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5285
mozconfig

No, there's only one libnspr4.so on my system.
# cd /
/ # find . -name "libnspr4*"
./usr/lib/libnspr4.so
./usr/lib/libnspr4.so.8
/ #

And I build Firefox with --with-system-nspr ...
I've attached my .mozconfig in case someone would like
to reproduce the issue. (Just run "make -f client.mk"
in the Firefox top directory)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

Octoploid  changed:

   What|Removed |Added

   Attachment #5285|0   |1
is obsolete||

--- Comment #5 from Octoploid  2011-03-10 
16:37:22 UTC ---
Created attachment 5286
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5286
Correct mozconfig (use this one)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #7 from Octoploid  2011-03-10 
17:43:09 UTC ---
Created attachment 5287
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5287
output_bad

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #8 from Octoploid  2011-03-10 
17:43:32 UTC ---
Created attachment 5288
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5288
map_bad

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #9 from Octoploid  2011-03-10 
17:43:59 UTC ---
Created attachment 5289
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5289
output_good

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #10 from Octoploid  2011-03-10 
17:45:27 UTC ---
Created attachment 5290
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5290
map_good

Everything is attached. 

Good > without --as-needed
Bad > with --as-needed

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #12 from Octoploid  2011-03-10 
18:28:19 UTC ---
Thanks. Unfortunately nothing obvious stands out in vimdiff.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

Octoploid  changed:

   What|Removed |Added

   Attachment #5289|0   |1
is obsolete||

--- Comment #13 from Octoploid  2011-03-11 
07:27:50 UTC ---
Created attachment 5292
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5292
output_good

This may be better for comparison:
removed:
"-Wl,-R/usr/lib64 -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl"

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

Octoploid  changed:

   What|Removed |Added

   Attachment #5290|0   |1
is obsolete||

--- Comment #14 from Octoploid  2011-03-11 
07:28:28 UTC ---
Created attachment 5293
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5293
map_good

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-10 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #15 from Octoploid  2011-03-11 
07:34:09 UTC ---
Now two lines stands out in "vimdiff verbose_good verbose_bad":

libnspr4.so needed by ../../../../dist/bin/libxul.so
found libnspr4.so at /usr/lib/libnspr4.so

These two lines are missing in verbose_bad...

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-11 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #17 from Octoploid  2011-03-11 
18:22:34 UTC ---
Created attachment 5294
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5294
gcc_verbose_good

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-11 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #18 from Octoploid  2011-03-11 
18:23:03 UTC ---
Created attachment 5295
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5295
gcc_verbose_bad

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-11 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

Octoploid  changed:

   What|Removed |Added

 Status|WAITING |UNCONFIRMED
 Ever Confirmed|1   |0

--- Comment #22 from Octoploid  2011-03-11 
19:02:50 UTC ---
GNU ld (Linux/GNU Binutils) 2.21.51.0.7.20110306

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-11 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #24 from Octoploid  2011-03-11 
19:24:33 UTC ---
>I really need a small testcase.

Understood. I will take a deeper look.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] gcc & Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-11 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

Octoploid  changed:

   What|Removed |Added

Summary|Firefox fails to build with |gcc & Firefox fails to
   |-flto and --as-needed   |build with -flto and
   |LDFLAGS |--as-needed LDFLAGS

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] gcc & Firefox fail to build with -flto and --as-needed LDFLAGS

2011-03-11 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

Octoploid  changed:

   What|Removed |Added

Summary|gcc & Firefox fails to  |gcc & Firefox fail to build
   |build with -flto and|with -flto and --as-needed
   |--as-needed LDFLAGS |LDFLAGS

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] gcc & Firefox fails to build with -flto and --as-needed LDFLAGS

2011-03-11 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #25 from Octoploid  2011-03-11 
21:02:12 UTC ---
Even gcc fails to build with the same combination (-flto and Wl,--as-needed):

...
/var/tmp/gcc_build_dir/./prev-gcc/g++ -B/var/tmp/gcc_build_dir/./prev-gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/var/tmp/gcc_build_dir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-I/var/tmp/gcc_build_dir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I/var/tmp/gcc_build_dir/prev-x86_64-pc-linux-gnu/libstdc++-v3/include
-I/var/tmp/gcc/libstdc++-v3/libsupc++
-L/var/tmp/gcc_build_dir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs 
-march=native -O2 -pipe -flto=jobserver -frandom-seed=1 -fprofile-use -DIN_GCC 
 -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc  gcov.o intl.o version.o errors.o
../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a 
-o gcov
/lib64/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
/lib64/libc.so.6: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
/lib64/libc.so.6: undefined reference to `__tls_get_addr@GLIBC_2.3'
/lib64/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib64/libc.so.6: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
make[3]: *** [gcov] Error 1
make[3]: *** Waiting for unfinished jobs
rm gfortran.pod cpp.pod gcov.pod gcc.pod fsf-funding.pod gfdl.pod
make[3]: Leaving directory `/var/tmp/gcc_build_dir/gcc'
make[2]: *** [all-stagefeedback-gcc] Error 2
make[2]: Leaving directory `/var/tmp/gcc_build_dir'
make[1]: *** [stagefeedback-bubble] Error 2
make[1]: Leaving directory `/var/tmp/gcc_build_dir'
make: *** [profiledbootstrap] Error 2

Configured with:
../gcc/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-build-with-cxx --enable-initfini-array --with-gold --enable-secureplt
--enable-libmudflap --disable-libssp --enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran
--enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-multilib
--enable-clocale=gnu --with-build-config=bootstrap-lto

And build with:
make -j4 BOOT_CFLAGS="-march=native -O2 -pipe" STAGE1_CFLAGS="-march=native -O2
-pipe" CFLAGS_FOR_TARGET="-march=native -O2 -pipe"
LDFLAGS="-Wl,-O1,--hash-style=gnu,--as-needed" profiledbootstrap

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] gcc & Firefox fail to build with -flto and --as-needed LDFLAGS

2011-03-11 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #26 from Octoploid  2011-03-11 
22:12:02 UTC ---
Hmm, the LDFLAGS are simply ignored by gcc.
And gcc builds fine when I configure it with:
--with-boot-ldflags=-Wl,-O1,--hash-style=gnu,--as-needed

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] gcc & Firefox fail to build with -flto and --as-needed LDFLAGS

2011-03-14 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #28 from Octoploid  2011-03-14 
16:39:13 UTC ---
(In reply to comment #27)
> I have no problems with gcc bootstrap using
> 
> .../configure --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld  
> --prefix=/usr/gcc-4.7.0 --with-local-prefix=/usr/local
> --enable-gnu-indirect-function
> --with-boot-ldflags=-Wl,-O1,--hash-style=gnu,--as-needed
> --with-build-config=bootstrap-lto --enable-cloog-backend=isl
> --with-ppl-include=/opt/gnu/include --with-ppl-lib=/opt/gnu/lib64
> --with-cloog-include=/opt/gnu/include --with-cloog-lib=/opt/gnu/lib64
> --with-fpmath=sse

Yes, the problem only occurs when you configure gcc without
"--with-boot-ldflags=-Wl,-O1,--hash-style=gnu,--as-needed".

I've tested this a little further:

/var/tmp/gcc_build_dir/./prev-gcc/g++ -B/lib
-B/var/tmp/gcc_build_dir/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/
-nostdinc++
-B/var/tmp/gcc_build_dir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/var/tmp/gcc_build_dir/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -pipe
-flto -frandom-seed=1 -DIN_GCC -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc
gcov.o intl.o version.o errors.o ../libiberty/libiberty.a -o gcov
/lib64/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
/lib64/libc.so.6: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
/lib64/libc.so.6: undefined reference to `__tls_get_addr@GLIBC_2.3'
/lib64/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib64/libc.so.6: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE'
collect2: ld returned 1 exit status

Without -static-libstdc++ it compiles fine.
Without -flto it also compiles fine.
When I use xgcc instead of g++ there aren't any problems.
When I use gold as linker there aren't any problems either.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12557] gcc & Firefox fail to build with -flto and --as-needed LDFLAGS

2011-03-16 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12557

--- Comment #30 from Octoploid  2011-03-16 
08:06:47 UTC ---
Thanks H.J.. Both issues are fixed now.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/12898] gold throws "internal error in segment_precedes" when building kvm

2011-06-16 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12898

Octoploid  changed:

   What|Removed |Added

   Attachment #5796|text/x-asm  |text/plain
  mime type||

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/12898] New: gold throws "internal error in segment_precedes" when building kvm

2011-06-16 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12898

   Summary: gold throws "internal error in segment_precedes" when
building kvm
   Product: binutils
   Version: 2.21
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: cryptooctopl...@gmail.com


Created attachment 5796
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5796
failing linker script

gold fails to link the new kernel kvm tool.
http://article.gmane.org/gmane.linux.kernel/1155280

ld -T bios/rom.ld.S -o bios/bios.bin.elf bios/bios.o bios/e820.o bios/int10.o
ld: error: allocated section not in any segment
ld: error: allocated section not in any segment
ld: internal error in segment_precedes, at
/var/tmp/portage/sys-devel/binutils-2.21.52.0.2/work/binutils-2.21.52.0.2/gold/layout.cc:2803

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/12898] gold throws "internal error in segment_precedes" when building kvm

2011-06-17 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12898

--- Comment #2 from Octoploid  2011-06-17 
14:58:02 UTC ---
Created attachment 5802
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5802
input files

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/12898] gold throws "internal error in segment_precedes" when building kvm

2011-06-28 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12898

--- Comment #5 from Octoploid  2011-06-29 
06:44:52 UTC ---
And thank you for the quick fix. 
KVM is linking fine now.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13019] New: "error: load segment overlap" when linking Linux kernel

2011-07-23 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13019

   Summary: "error: load segment overlap" when linking Linux
kernel
   Product: binutils
   Version: 2.22 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: cryptooctopl...@gmail.com


Created attachment 5857
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5857
output of "readelf -lSW ./vmlinux"

When I try to build the latest kernel git tree with gold I get this error:

  ld -m elf_x86_64 --build-id -o vmlinux -T arch/x86/kernel/vmlinux.lds
arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/head.o
arch/x86/kernel/init_task.o  init/built-in.o --start-group  usr/built-in.o 
arch/x86/built-in.o  kernel/built-in.o  mm/built-in.o  fs/built-in.o 
ipc/built-in.o  security/built-in.o  crypto/built-in.o  block/built-in.o 
lib/lib.a  arch/x86/lib/lib.a  lib/built-in.o  arch/x86/lib/built-in.o 
drivers/built-in.o  sound/built-in.o  firmware/built-in.o 
arch/x86/pci/built-in.o  arch/x86/video/built-in.o  net/built-in.o --end-group
.tmp_kallsyms2.o
ld: error: dot may not move backward
ld: error: dot may not move backward
ld: error: load segment overlap [0x180 -> 0x18940e0] and [0x1893000 ->
0x1893c10]

ld.bfd links without any problems.

The output of "readelf -lSW ./vmlinux" is attached.


Program Headers:
  Type   Offset   VirtAddr   PhysAddr   FileSiz  MemSiz
  Flg Align
  LOAD   0x20 0x8100 0x0100 0x7d1000
0x7d1000 R E 0x20
  LOAD   0xa0 0x8180 0x0180 0x0940e0
0x0940e0 RW  0x20
  LOAD   0xc0 0xff60 0x01893000 0x001000
0x001000 R E 0x20
  LOAD   0xe0 0x 0x01895000 0x012500
0x012500 RW  0x20
  LOAD   0xea8000 0x818a8000 0x018a8000 0x085000
0x152000 RWE 0x20
  NOTE   0x71bb34 0x8151bb34 0x0151bb34 0x24
0x24 0x4

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13023] gold misinterprets dot assignments in sections

2011-07-23 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13023

Octoploid  changed:

   What|Removed |Added

 CC||cryptooctoploid at gmail
   ||dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13245] PREVAILING_DEF reported too often.

2011-10-02 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13245

Octoploid  changed:

   What|Removed |Added

 CC||cryptooctoploid at gmail
   ||dot com

--- Comment #2 from Octoploid  2011-10-02 
08:19:49 UTC ---
I cannot reproduce this issue:

 % gcc t2.C --shared -o t2.so -fPIC -L ./ -lt -flto --save-temps
[Leaving LTRANS /tmp/ccVZyHEi.args]
[Leaving LTRANS t2.so.ltrans.out]
[Leaving LTRANS /tmp/ccqiTieX.args]
[Leaving LTRANS t2.so.ltrans0.o]

 % < t2.res
1
t2.o 2
172 54331a27 PREVAILING_DEF_IRONLY_EXP _Z5test2v
176 54331a27 RESOLVED_DYN _Z5test3v

 % nm t2.so
1618 d _DYNAMIC
1830 d _GLOBAL_OFFSET_TABLE_
 w _Jv_RegisterClasses
055c t _Z4testv.local.0.2237
054c T _Z5test2v
 U _Z5test3v
1860 d __JCR_END__
...

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13245] PREVAILING_DEF reported too often.

2011-10-02 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13245

--- Comment #5 from Octoploid  2011-10-02 
13:01:38 UTC ---
What about the following naive patch?

diff --git a/gold/plugin.cc b/gold/plugin.cc
index b5880a1..d999254 100644
--- a/gold/plugin.cc
+++ b/gold/plugin.cc
@@ -889,10 +889,10 @@ Pluginobj::get_symbol_resolution_info(int nsyms,
 res = LDPR_RESOLVED_EXEC;
   else if (lsym->object()->pluginobj() == this)
{
- if (is_referenced_from_outside(lsym))
-   res = LDPR_PREVAILING_DEF;
- else if (is_visible_from_outside(lsym))
+ if (is_visible_from_outside(lsym))
res = ldpr_prevailing_def_ironly_exp;
+ else if (is_referenced_from_outside(lsym))
+   res = LDPR_PREVAILING_DEF;
  else
res = LDPR_PREVAILING_DEF_IRONLY;
}
@@ -910,10 +910,10 @@ Pluginobj::get_symbol_resolution_info(int nsyms,
 res = LDPR_PREEMPTED_REG;
   else if (lsym->object() == static_cast(this))
{
- if (is_referenced_from_outside(lsym))
-   res = LDPR_PREVAILING_DEF;
- else if (is_visible_from_outside(lsym))
+ if (is_visible_from_outside(lsym))
res = ldpr_prevailing_def_ironly_exp;
+ else if (is_referenced_from_outside(lsym))
+   res = LDPR_PREVAILING_DEF;
  else
res = LDPR_PREVAILING_DEF_IRONLY;
}


It fixes the issue:

 % gcc t2.C --shared -o t2.so -fPIC -L ./ -lt -flto --save-temps
[Leaving LTRANS /tmp/ccHFvJ09.args]
[Leaving LTRANS t2.so.ltrans.out]
[Leaving LTRANS /tmp/ccwhzNf0.args]
[Leaving LTRANS t2.so.ltrans0.o]

 % < t2.res
1
t2.o 3
164 e040fa02d1822684 PREVAILING_DEF_IRONLY_EXP _Z4testv
172 e040fa02d1822684 PREVAILING_DEF_IRONLY_EXP _Z5test2v
176 e040fa02d1822684 RESOLVED_DYN _Z5test3v

 % nm -CD t2.so
 w _Jv_RegisterClasses
 w test()
056c T test2()
 U test3()
1898 A __bss_start
 w __cxa_finalize
 w __gmon_start__
1898 A _edata
189c A _end
0584 T _fini
04a0 T _init

It also survived bootstrap-lto of gcc and an "-flto -fno-fat-lto-objects" build
of Firefox.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13245] PREVAILING_DEF reported too often.

2011-10-02 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13245

--- Comment #7 from Octoploid  2011-10-02 
18:41:58 UTC ---
(In reply to comment #6)
> > Cool!  If you happen to have a lot of memory (15GB), you may try if it 
> > solves
> the -fprofile-generate -flto problem.

Yes, it does solve the problem here (I have 8GB of RAM and used a
large swapfile on my SSD. It took ~10 minutes to output all ltrans.o 
files).

> In meantime I suceeded building FDO+LTO firefox with -fprofile-generate
> -fno-lto train run (that makes more sense
> anyway, I am trying to debug the other just to be sure that there are no more
> problems in this area)

-fprofile-generate should set -fno-lto automatically IMHO.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/13245] PREVAILING_DEF reported too often.

2011-10-14 Thread cryptooctoploid at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13245

--- Comment #13 from Octoploid  2011-10-15 
06:44:54 UTC ---
Any update on this?
The issue just got fixed on the bfd side:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elflink.c.diff?cvsroot=src&r1=1.423&r2=1.424

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils