@@ -73,7 +73,9 @@ int bar() { return X; }
7373When compiling for powerpc, the #define is skipped, so it doesn't know that bar
7474uses a #define that is set on some other target. In practice, limited cases
7575could be handled by scanning the skipped region of a #if, but the fully general
76- case cannot be implemented efficiently. In particular, code like this (from
76+ case cannot be implemented efficiently. In this case, for example, the #define
77+ in the protected region could be turned into either a #define_target or
78+ #define_other_target as appropriate. The harder case is code like this (from
7779OSByteOrder.h):
7880
7981 #if (defined(__ppc__) || defined(__ppc64__))
@@ -84,9 +86,9 @@ OSByteOrder.h):
8486 #include <libkern/machine/OSByteOrder.h>
8587 #endif
8688
87- ... should be fixed by having an initial #ifdef __llvm__ that defines its
88- contents in terms of the llvm bswap intrinsics. Other things should be handled
89- on a case-by-case basis.
89+ The realistic way to fix this is by having an initial #ifdef __llvm__ that
90+ defines its contents in terms of the llvm bswap intrinsics. Other things should
91+ be handled on a case-by-case basis.
9092
9193
9294We probably have to do something smarter like this in the future. The C++ header
@@ -129,6 +131,8 @@ the decl for these ivars.
129131
130132An ideal way to solve this issue is to mark __DARWIN_LDBL_COMPAT /
131133__DARWIN_LDBL_COMPAT2 / __DARWIN_LONG_DOUBLE_IS_DOUBLE as being non-portable
132- because they depend on non-portable macros.
134+ because they depend on non-portable macros. In practice though, this may end
135+ up being a serious problem: every use of printf will mark the translation unit
136+ non-portable if targetting ppc32 and something else.
133137
134138//===---------------------------------------------------------------------===//
0 commit comments