Use of LTO causes linker to fail due to multiple definitions of compiler RTS functions

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Urgent

      Extract the attached zip file to an empty directory.  Build it ...

      % tiarmclang @lc.txt
      error: symbol "ldexp" redefined: first defined in
         ".\{CE08F262-89FB-4696-B4B8-3E7DDD12BA40}"; redefined in
         "C:\ti\compilers\ti-cgt-armllvm_4.0.4.LTS\lib\armv7r-ti-none-eabihf/c/libc.a
         <s_scalbn.c.obj>"
      error: symbol "ldexpl" redefined: first defined in
         ".\{CE08F262-89FB-4696-B4B8-3E7DDD12BA40}"; redefined in
         "C:\ti\compilers\ti-cgt-armllvm_4.0.4.LTS\lib\armv7r-ti-none-eabihf/c/libc.a
         <s_scalbn.c.obj>"
      "j721s2_linker_safertos.cmd", line 90: warning: no matching section
      "j721s2_linker_safertos.cmd", line 136: warning: no matching section
      <many more similar diagnostics skipped>
      error: errors encountered during linking; "adc5_spu.elf" not built
      tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
      

      The function ldexp is from the compiler RTS library. The diagnostic says it is defined in both the LTO temporary file and the compiler RTS library.

      Build with version 3.2.2.LTS and the build succeeds.  (Note the warning diagnostics are still issued.)

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-6076 - Use of LTO causes linker to fail du...
                SYNCHRONIZED
                • Last Sync Date: