[all-commits] [llvm/llvm-project] 599de1: [clang] Handle tm mangling on Solaris in PPMacroEx...

Rainer Orth via All-commits all-commits at lists.llvm.org
Fri Jul 26 07:51:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 599de135551cdb95a479b7f1f032aff506effeac
      https://github.com/llvm/llvm-project/commit/599de135551cdb95a479b7f1f032aff506effeac
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2024-07-26 (Fri, 26 Jul 2024)

  Changed paths:
    M clang/lib/Lex/PPMacroExpansion.cpp

  Log Message:
  -----------
  [clang] Handle tm mangling on Solaris in PPMacroExpansion.cpp (#100724)

The introduction of `std::put_time` in
fad17b43dbc09ac7e0a95535459845f72c2b739a broke the Solaris build:
```
Undefined			first referenced
 symbol  			    in file
_ZNKSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE3putES3_RSt8ios_basecPKSt2tmPKcSB_ lib/libclangLex.a(PPMacroExpansion.cpp.o)
ld: fatal: symbol referencing errors
```
As discussed in PR #99075, the problem is that GCC mangles `std::tm` as
`tm` on Solaris for binary compatility, while `clang` doesn't (Issue
#33114).

As a stop-gap measure, this patch introduces an `asm` level alias to the
same effect.

Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and
`x86_64-pc-linux-gnu`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list