-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__APPLE_CC__ is incorrectly defined on Linux #1402
Comments
I'm not sure this is actually a bug. The LLVM front end is, in fact, the Apple C |
Well, APPLE_CC is defined in darwin.h, so, it seems, it shouldn't be defined |
This isn't correct. The APPLE_CC symbol is defined by the compiler (header I have fixed the test/Regression/CFrontend/extern-weak.ll test to check for the |
This isn't quite true. Mainline GCC also defines APPLE_CC when targetting darwin. If llvm-gcc defines -Chris |
Is this conclusive enough? ../cfe/install-4/bin/llvm-cpp -dM -o - | grep APPLE ../cfe/install-4/bin/llvm-cpp -v 1 ""1 ""1 ""1 ""The cpp used was built a few minutes from the SVN Mirro r248 (2007-01-14) |
yes, this is definitely a bug. The bug appears to be in define__GNUC__ in gcc/c-cppbuiltin.c. The apple- Devang, does this approach sound reasonable? Reid, can you prepare a patch that adds #ifdef -Chris |
An llvm-gcc patch to only define APPLE_CC when CONFIG_DARWIN_H is set |
Works on Linux. This command (the original one): llvm-gcc -E -dM -xc /dev/null -o - | grep APPLE Produces no output now on Linux. Additionally, the llvm-gcc built with the All we need to do is test that it doesn't break Darwin now, which I can't do (yet!). |
Thanks Reid. Devang, please take a look and apply if appropriate. |
Looks good. Applied. |
Extended Description
It seems, that this define is incorrectly set (al least) on Linux platform
Running
llvm-gcc -E -dM -xc /dev/null -o - | grep APPLE
produces:
#define APPLE_CC 5421
The text was updated successfully, but these errors were encountered: