[LLVMdev] Clang predefined macros with -fPIC and -fPIE

197 views
Skip to first unread message

Siraj, Tareq A

unread,
Oct 3, 2012, 11:57:55 AM10/3/12
to llv...@cs.uiuc.edu
Hello everyone,
Clang seems to only define __PIE__ when both –fPIC and –fPIE is used in the command line whereas gcc defines both __PIC__ and __PIE__. Is this intended or a bug in clang? Thanks.

Command line:
clang -fPIC -fPIE -dM -E - < /dev/null | grep __PI

--
Tareq

_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

Eric Christopher

unread,
Oct 3, 2012, 1:30:00 PM10/3/12
to Siraj, Tareq A, llv...@cs.uiuc.edu
On Wed, Oct 3, 2012 at 8:57 AM, Siraj, Tareq A <tareq....@intel.com> wrote:
> Hello everyone,
> Clang seems to only define __PIE__ when both –fPIC and –fPIE is used in the command line whereas gcc defines both __PIC__ and __PIE__. Is this intended or a bug in clang? Thanks.
>
> Command line:
> clang -fPIC -fPIE -dM -E - < /dev/null | grep __PI
>

Yes, please file if you can.

Thanks.

-eric
Reply all
Reply to author
Forward
0 new messages