https://bugs.kde.org/show_bug.cgi?id=509103

            Bug ID: 509103
           Summary: tests/arm64/bug484935.c doesn't build if CFLAGS
                    contain "-O2 -flto -ffat-lto-objects"
    Classification: Developer tools
           Product: valgrind
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 184706
  --> https://bugs.kde.org/attachment.cgi?id=184706&action=edit
proposed patch (git format-patch format)

Hi,

This is a small bug report about a valgrind test case. We do build our software
stack (including valgring) in a special way, we enable at top level the use of
fat LTO objects, to be able to choose if we later build with or without LTO our
own libraries depending on the open sources librairies we build. When doing
that with valgrind, we have hit the issue describe in this gcc bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121719 Basically compiling on ARM
the test case tests/arm64/bug484935.c with CLAGS containing "-O2 -flto
-ffat-lto-objects" with gcc on Linux results in having this assembler error:

/tmp/ccfnh7KQ.s: Assembler messages:
/tmp/ccfnh7KQ.s:175: Error: symbol `loop' is already defined

It's reproducible with clang as well, on Compiler explorer. See this reproducer
for gcc: https://godbolt.org/z/7d9MEfdh3

We applied the fix suggested by Jakub Jelinek in the gcc bug, and it fixed our
issue. I guess it's fine applying to upstream valgrind too. I will attach the
patch to this bug report.

Cheers,
Romain

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to