Jon Turney via Cygwin wrote:
On 12/02/2024 16:49, ASSI via Cygwin wrote:
Christian Franke via Cygwin writes:
This requires that always the same build directory is used.

Would that be solvable by using -ffile-prefix-map or is there more to
it?

That should now be used in 0.36.8, so something else leaking the local build directory into the package, perhaps

A closer look shows that (only) the pathnames of the assembly (*.S) files in cygwin1.dll.dbg now contain the build path instead of the mapped path:

$ strings cygwin1.dll.dbg | grep '^/.*bcopy\.S$' | uniq
/tmp/build/cygwin-3.5.0-1.x86_64/src/newlib-cygwin/winsup/cygwin/x86_64/bcopy.S

The paths in the released package are correct:

$ strings /usr/lib/debug/usr/bin/cygwin1.dll.dbg | grep '^/.*bcopy\.S$' | uniq
/usr/src/debug/cygwin-3.5.0-1/winsup/cygwin/x86_64/bcopy.S

The regression was introduced by cygport commit 9e82685 in conjunction with the fact that --file-prefix-map has no effect on *.S files:

Testcase:

$ cygcheck -f /bin/as
binutils-2.42-1

$ cygcheck -f /bin/gcc
gcc-core-11.4.0-1

$ pwd
/tmp/build

$ echo ret > a.S

$ echo > c.c

$ gcc -c -g --file-prefix-map=/tmp/build=/foo/bar a.S c.c

$ strings -f *.o | grep ': /' | uniq
a.o: /tmp/build
c.o: /foo/bar

$ gcc -c -g --debug-prefix-map=/tmp/build=/foo/bar a.S c.c

$ strings -f *.o | grep ': /' | uniq
a.o: /foo/bar
c.o: /foo/bar

Also gcc builtin specs show that --file-prefix-map is not handled for asm:

$ gcc -dumpspecs | fgrep -A1 '*asm_debug:'
*asm_debug:
%{%:debug-level-gt(0):%{gstabs*:--gstabs;:%{g*:}}} %{fdebug-prefix-map=*:--debug-prefix-map %*}

--
Regards,
Christian


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to