Rev 21 | Rev 23 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 21 | Rev 22 | ||
|---|---|---|---|
| Line 241... | Line 241... | ||
| 241 | # Additionally, support for statfs()/fstatfs() has been restored in the QNX8 platform SDK in /usr/include/devs/sys/mount.h where it was claimed but absent from the QNX8 libc. |
241 | # Additionally, support for statfs()/fstatfs() has been restored in the QNX8 platform SDK in /usr/include/devs/sys/mount.h where it was claimed but absent from the QNX8 libc. |
| 242 | # FIXME: these hacks should be moved elsewhere not to pollute the QNX8 platform SDK -- it *SHOULD* be possible to build without devs |
242 | # FIXME: these hacks should be moved elsewhere not to pollute the QNX8 platform SDK -- it *SHOULD* be possible to build without devs |
| 243 | backup_and_patch_if_necessary "llvm/lib/Support/Unix/Path.inc" __QNXNTO__ \ |
243 | backup_and_patch_if_necessary "llvm/lib/Support/Unix/Path.inc" __QNXNTO__ \ |
| 244 | 's@defined\(__FreeBSD_kernel__\)@\(defined\(__FreeBSD_kernel__\) \|\| \defined\(__QNXNTO__\)\)@g' |
244 | 's@defined\(__FreeBSD_kernel__\)@\(defined\(__FreeBSD_kernel__\) \|\| \defined\(__QNXNTO__\)\)@g' |
| 245 | 245 | ||
| - | 246 | # -- 20240621 -- DISABLED -- the only other place (aside from llvm/lib/Support) where getMainExecutable() is defined is in ClangLinkerWrapper.cpp which is the LLD wrapper frontend. |
|
| - | 247 | # -- 20240621 -- DISABLED -- actually llvm/lib/Support/Unix/Path.inc defines *getMainExecutableImpl* and not getMainExecutable, despite what the function comments say. So the code is right. |
|
| - | 248 | # -- 20240621 -- DISABLED -- This block can be removed after a few successful thorough rebuilds. |
|
| 246 | |
249 | ## LLVM 16: patch llvm/lib/Support/Path.cpp if not done yet |
| 247 | |
250 | ## replace: |
| 248 | |
251 | ## std::string getMainExecutable |
| 249 | |
252 | ## with: |
| 250 | |
253 | ## #if 0 |
| 251 | |
254 | ## std::string getMainExecutable |
| 252 | |
255 | ## and: |
| 253 | |
256 | ## TempFile::TempFile(StringRef Name, int FD) |
| 254 | |
257 | ## with: |
| 255 | |
258 | ## #endif |
| 256 | |
259 | ## TempFile::TempFile(StringRef Name, int FD) |
| 257 | |
260 | ## RATIONALE: std::string getMainExecutable(const char *Argv0, void *MainAddr) is already defined in llvm/lib/Support/Unix/Path.inc, this looks like a LLVM bug? |
| 258 | |
261 | ## Specifically read the following patch list: https://reviews.llvm.org/D109977 -- it looks like the implementation of this diff in LLVM 16.0.6 is incomplete. |
| 259 | |
262 | ## This patch restores a working state (ante D109977). |
| 260 |
|
263 | #test "$(echo "${LLVM_VERSION}"|cut -d . -f 1)" -lt 17 && backup_and_patch_if_necessary "llvm/lib/Support/Path.cpp" "#if 0" \ |
| 261 |
|
264 | # 's@std::string getMainExecutable@#if 0\nstd::string getMainExecutable@' \ |
| 262 |
|
265 | # 's@TempFile::TempFile\(StringRef Name, int FD\)@#endif\nTempFile::TempFile\(StringRef Name, int FD\)@' |
| 263 | 266 | ||
| 264 | # Clang front-end patches |
267 | # Clang front-end patches |
| 265 | if echo "${LLVM_PROJECTS_TO_BUILD}"|tr ';' '\n'|grep -q "clang"; then |
268 | if echo "${LLVM_PROJECTS_TO_BUILD}"|tr ';' '\n'|grep -q "clang"; then |
| 266 | 269 | ||
| 267 | # patch clang/lib/Frontend/InitPreprocessor.cpp |
270 | # patch clang/lib/Frontend/InitPreprocessor.cpp |