Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

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
# LLVM 16: patch llvm/lib/Support/Path.cpp if not done yet
249
## LLVM 16: patch llvm/lib/Support/Path.cpp if not done yet
247
# replace:
250
## replace:
248
#       std::string getMainExecutable
251
##      std::string getMainExecutable
249
# with:
252
## with:
250
#       #if 0
253
##      #if 0
251
#       std::string getMainExecutable
254
##      std::string getMainExecutable
252
# and:
255
## and:
253
#       TempFile::TempFile(StringRef Name, int FD)
256
##      TempFile::TempFile(StringRef Name, int FD)
254
# with:
257
## with:
255
#       #endif
258
##      #endif
256
#       TempFile::TempFile(StringRef Name, int FD)
259
##      TempFile::TempFile(StringRef Name, int FD)
257
# 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?
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
# 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.
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
# This patch restores a working state (ante D109977).
262
## This patch restores a working state (ante D109977).
260
test "$(echo "${LLVM_VERSION}"|cut -d . -f 1)" -lt 17 && backup_and_patch_if_necessary "llvm/lib/Support/Path.cpp" "#if 0" \
263
#test "$(echo "${LLVM_VERSION}"|cut -d . -f 1)" -lt 17 && backup_and_patch_if_necessary "llvm/lib/Support/Path.cpp" "#if 0" \
261
        's@std::string getMainExecutable@#if 0\nstd::string getMainExecutable@' \
264
#       's@std::string getMainExecutable@#if 0\nstd::string getMainExecutable@' \
262
        's@TempFile::TempFile\(StringRef Name, int FD\)@#endif\nTempFile::TempFile\(StringRef Name, int FD\)@'
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