code coverage builds busted in elfhack

RESOLVED FIXED in mozilla6

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ted, Assigned: glandium)

Tracking

(Blocks: 1 bug)

Trunk
mozilla6
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
These used to break in JS, now they're broken in elfhack, probably fallout from GCC 4.5/PGO:
/tools/gcc-4.5/bin/g++ -fno-rtti -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 -fprofile-arcs -ftest-coverage -fno-strict-aliasing -std=gnu++0x -pthread -pipe -fexceptions  -DDEBUG -D_DEBUG -DTRACING -g -fPIC -shared -Wl,-z,defs -Wl,-h,test.so -o test.so test.o
===
=== If you get failures below, please file a bug describing the error
=== and your environment (compiler and linker versions), and use
=== --disable-elf-hack until this is fixed.
===
/builds/slave/cen-lnx-codecoverage/build/objdir/build/unix/elfhack/elfhack -b test.so
test.so: Reduced by 3984 bytes
# Fail if the backup file doesn't exist
[ -f "test.so.bak" ]
# Fail if the new library doesn't contain less relocations
[ $(objdump -R test.so.bak | wc -l) -gt $(objdump -R test.so | wc -l) ]
/tools/gcc-4.5/bin/gcc -lpthread -lgcov -static-libgcc   -Wl,-rpath-link,/builds/slave/cen-lnx-codecoverage/build/objdir/dist/bin -Wl,-rpath-link,/usr/local/lib -o dummy dummy.o test.so
dummy.o: In function `global constructors keyed to 65535_0_dummy.c':
/builds/slave/cen-lnx-codecoverage/build/build/unix/elfhack/dummy.c:5: undefined reference to `__gcov_init'
dummy.o:(.data.rel+0x24): undefined reference to `__gcov_merge_add'
collect2: ld returned 1 exit status
NEXT ERROR make[7]: *** [dummy] Error 1
(Assignee)

Comment 1

6 years ago
Can't reproduce locally with the code-coverage mozconfig :-/
(Assignee)

Comment 2

6 years ago
Created attachment 532694 [details] [diff] [review]
Move LDFLAGS after other flags when building elfhack test case

I managed to reproduce, and fix.
Attachment #532694 - Flags: review?(ted.mielczarek)
(Reporter)

Updated

6 years ago
Attachment #532694 - Flags: review?(ted.mielczarek) → review+
(Reporter)

Updated

6 years ago
Assignee: nobody → mh+mozilla
(Assignee)

Comment 3

6 years ago
http://hg.mozilla.org/mozilla-central/rev/14bbc2fa43a7
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
You need to log in before you can comment on or make changes to this bug.