]> granicus.if.org Git - clang/commit
This patch makes the behavior of clang consistent with the behavior of gcc 4.6 in...
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 13 Nov 2012 15:32:35 +0000 (15:32 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 13 Nov 2012 15:32:35 +0000 (15:32 +0000)
commitb12ecd3a3ef0a7010b33759b2310b83d51fbdc9a
treea5188f26650036d99849adc007b41a9dc21af5a9
parentdd81731d82a33a242e7b088e249e56873ef52807
This patch makes the behavior of clang consistent with the behavior of gcc 4.6 in cases where both -fPIC and -fPIE is used.

- Separately check if -fPIE was specified in the command line and define both __PIC__ and __PIE__ when -fPIE is used. We need to check this separately because -fPIE will infer -fPIC even if its not explicitly used.
- Fixed existing tests.
- Added new tests for cases where both -fPIC and -fPIE is used.

Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Fixes: PR13221
Review: http://llvm-reviews.chandlerc.com/D94

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167846 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Tools.cpp
test/Driver/pic.c