(Adding OCaml author)
On Wed, Jul 29, 2020 at 05:54:52PM +0200, Mark Wielaard wrote:
Hi Richard,
On Wed, 2020-07-29 at 16:07 +0100, Richard W.M. Jones wrote:
> On Wed, Jul 29, 2020 at 04:11:56PM +0200, Mark Wielaard wrote:
> > Given these are .ml files I suspect it is not gcc, but some other
> > code/DWARF generator issue. Maybe it does use the default
> > (binutils)
> > liker though?
>
> It uses its own DWARF generator but everything is linked together
> using standard binutils (via GCC).
>
> > Is there a way to extract the /usr/bin/hacha from the BUILDROOT so
> > we
> > can inspect it?
>
> I've uploaded the binary which I built on my own machine here:
>
>
http://oirase.annexia.org/tmp/hacha.native
This one looks OK.
> plus some of the *.o files which went into it:
>
>
http://oirase.annexia.org/tmp/myLexing.o
>
http://oirase.annexia.org/tmp/myStack.o
>
http://oirase.annexia.org/tmp/hacha.o
And so do these.
I should probably add that I'm building these on my local machine
which isn't completely updated to Rawhide. I'm not sure whether or
not that will make a difference - I'm assuming _not_ for what the
OCaml compiler generates (since I'm running the latest of that), but
not sure about the rest of the toolchain. I'm using
binutils-2.34-3.fc32.x86_64.
I also tried to do a mockbuild locally, and that one succeeded.
Don't know what is different from the koji buildroot :{
> I also saved an asm file from one of them which may be helpful:
>
>
http://oirase.annexia.org/tmp/hacha.s
So ml depends on binutils gas to generate the actual debuginfo.
I assume it gets called with: as -g
Is there a way to see how exactly gas is called (with which arguments)?
In fact it *isn't* passing -g to as:
$ /usr/bin/ocamlopt.opt -c -w +a-3-4-9-41-45-67 -g -annot -safe-string -o hacha.cmx
hacha.ml -S -verbose
+ as -o 'hacha.o' 'hacha.s'
Is this a problem? I sort of assumed that as would have nothing to do
with generating debug information, beyond what is contained explicitly
in the .s file itself.
One of the gas 2.35 features is:
* Add --gdwarf-5 option to the assembler to generate DWARF 5 debug output
(if such output is being generated). Added the ability to generate
version 5 .debug_line sections.
Which is the version that just hit fedora rawhide. Maybe that changed
something about the gas -g output as well?
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/