jkmcnk / sx-gcc

The GNU Compiler Collection port to NEC SX CPU architecture.
GNU General Public License v2.0
0 stars 2 forks source link

building for full profiling fails #105

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
building with -p fails due to:

/home/jaka/dev/sx/inst-binutils-head/lib/gcc/sx8-nec-superux/4.2.2/../../../../s
x8-nec-superux/lib/mcrt3.o:mcrt3.s:(.text+0x568):
undefined reference to `_prof_nfunc'
collect2: ld returned 1 exit status

it seems that SX mcrt3.o requires the compiler to introduce the above
symbol (it's not found in any SX libs, just referenced from mcrt?.o
objects) - gcc does not, though.

the question is: do we fix this for superux libc target, or do we just
leave it be until we provide our own startup files (probably as part of
newlib/glibc port).

this issue touches testcase gcc.dg/20021014-1.c

Original issue reported on code.google.com by jmoc...@gmail.com on 9 Feb 2009 at 3:02

GoogleCodeExporter commented 8 years ago

Original comment by jmoc...@gmail.com on 9 Feb 2009 at 3:03

GoogleCodeExporter commented 8 years ago
also need to implement FUNCTION_PROFILER (file, labelno) hook. attaching a diff
between SX assembly with (new) and without (old) profiling enabled to see how
profiling call looks like.

counters are per-function (and should be added to data by gcc). calling _mcount 
is a
bit weird wrt. common calls.

Original comment by jmoc...@gmail.com on 18 Feb 2009 at 10:48

GoogleCodeExporter commented 8 years ago
argh ... attaching for real this time.

Original comment by jmoc...@gmail.com on 18 Feb 2009 at 10:52

Attachments: