fPIC in x64 environment
fPIC in x64 environment

Summary:
Check https://github.com/facebook/rocksdb/pull/15 for context.

Apparently [1], we need -fPIC in x64 environments (this is added only in non-fbcode).

In fbcode, I removed -fPIC per @dhruba's suggestion, since it introduces perf regression. I'm not sure what would are the implications of doing that, but looks like it works, and when releasing to the third-party, we're disabling -fPIC either way [2].

Would love a suggestion from someone who knows more about this

[1] http://eli.thegreenplace.net/2011/11/11/position-independent-code-pic-in-shared-libraries-on-x64/
[2] https://our.intern.facebook.com/intern/wiki/index.php/Database/RocksDB/Third_Party

Test Plan: make check works

Reviewers: dhruba, emayanke, kailiu

Reviewed By: dhruba

CC: leveldb, dhruba, reconnect.grayhat

Differential Revision: https://reviews.facebook.net/D14337

ryneli/rocksdb,JoeWoo/rocksdb,ryneli/rocksdb,ryneli/rocksdb,facebook/rocksdb,facebook/rocksdb,alihalabyah/rocksdb,mbarbon/rocksdb,amyvmiwei/rocksdb,Applied-Duality/rocksdb,makelivedotnet/rocksdb,siddhartharay007/rocksdb,kaschaeffer/rocksdb,luckywhu/rocksdb,siddhartharay007/rocksdb,vashstorm/rocksdb,Andymic/rocksdb,jalexanderqed/rocksdb,mbarbon/rocksdb,wenduo/rocksdb,vmx/rocksdb,biddyweb/rocksdb,tsheasha/rocksdb,amyvmiwei/rocksdb,fengshao0907/rocksdb,OverlordQ/rocksdb,temicai/rocksdb,makelivedotnet/rocksdb,dkorolev/rocksdb,Vaisman/rocksdb,dkorolev/rocksdb,wlqGit/rocksdb,msb-at-yahoo/rocksdb,ryneli/rocksdb,wenduo/rocksdb,wlqGit/rocksdb,lgscofield/rocksdb,temicai/rocksdb,NickCis/rocksdb,amyvmiwei/rocksdb,luckywhu/rocksdb,Vaisman/rocksdb,JackLian/rocksdb,tsheasha/rocksdb,Applied-Duality/rocksdb,zhangpng/rocksdb,hobinyoon/rocksdb,luckywhu/rocksdb,wlqGit/rocksdb,rDSN-Projects/rocksdb.replicated,NickCis/rocksdb,SunguckLee/RocksDB,Vaisman/rocksdb,anagav/rocksdb,geraldoandradee/rocksdb,skunkwerks/rocksdb,Applied-Duality/rocksdb,wskplho/rocksdb,JohnPJenkins/rocksdb,kaschaeffer/rocksdb,makelivedotnet/rocksdb,bbiao/rocksdb,JohnPJenkins/rocksdb,mbarbon/rocksdb,msb-at-yahoo/rocksdb,siddhartharay007/rocksdb,wat-ze-hex/rocksdb,ryneli/rocksdb,lgscofield/rocksdb,norton/rocksdb,bbiao/rocksdb,ylong/rocksdb,Applied-Duality/rocksdb,Applied-Duality/rocksdb,amyvmiwei/rocksdb,facebook/rocksdb,anagav/rocksdb,ylong/rocksdb,virtdb/rocksdb,bbiao/rocksdb,alihalabyah/rocksdb,skunkwerks/rocksdb,wenduo/rocksdb,SunguckLee/RocksDB,dkorolev/rocksdb,siddhartharay007/rocksdb,siddhartharay007/rocksdb,alihalabyah/rocksdb,wskplho/rocksdb,flabby/rocksdb,kaschaeffer/rocksdb,Andymic/rocksdb,tschottdorf/rocksdb,SunguckLee/RocksDB,mbarbon/rocksdb,temicai/rocksdb,flabby/rocksdb,OverlordQ/rocksdb,vashstorm/rocksdb,JohnPJenkins/rocksdb,siddhartharay007/rocksdb,msb-at-yahoo/rocksdb,lgscofield/rocksdb,JoeWoo/rocksdb,caijieming-baidu/rocksdb,makelivedotnet/rocksdb,ylong/rocksdb,luckywhu/rocksdb,JackLian/rocksdb,bbiao/rocksdb,ylong/rocksdb,JohnPJenkins/rocksdb,ylong/rocksdb,skunkwerks/rocksdb,tizzybec/rocksdb,skunkwerks/rocksdb,facebook/rocksdb,anagav/rocksdb,alihalabyah/rocksdb,Andymic/rocksdb,geraldoandradee/rocksdb,IMCG/RcoksDB,jalexanderqed/rocksdb,siddhartharay007/rocksdb,JohnPJenkins/rocksdb,tsheasha/rocksdb,tizzybec/rocksdb,fengshao0907/rocksdb,wlqGit/rocksdb,JohnPJenkins/rocksdb,zhangpng/rocksdb,Vaisman/rocksdb,norton/rocksdb,flabby/rocksdb,fengshao0907/rocksdb,norton/rocksdb,ylong/rocksdb,NickCis/rocksdb,Andymic/rocksdb,flabby/rocksdb,jalexanderqed/rocksdb,flabby/rocksdb,vmx/rocksdb,JoeWoo/rocksdb,Applied-Duality/rocksdb,hobinyoon/rocksdb,jalexanderqed/rocksdb,hobinyoon/rocksdb,luckywhu/rocksdb,wskplho/rocksdb,amyvmiwei/rocksdb,virtdb/rocksdb,wenduo/rocksdb,NickCis/rocksdb,vashstorm/rocksdb,tschottdorf/rocksdb,tschottdorf/rocksdb,fengshao0907/rocksdb,vashstorm/rocksdb,skunkwerks/rocksdb,virtdb/rocksdb,Vaisman/rocksdb,rDSN-Projects/rocksdb.replicated,mbarbon/rocksdb,tsheasha/rocksdb,temicai/rocksdb,virtdb/rocksdb,dkorolev/rocksdb,wenduo/rocksdb,RyanTech/rocksdb,zhangpng/rocksdb,rDSN-Projects/rocksdb.replicated,norton/rocksdb,wat-ze-hex/rocksdb,facebook/rocksdb,biddyweb/rocksdb,rDSN-Projects/rocksdb.replicated,amyvmiwei/rocksdb,wskplho/rocksdb,Andymic/rocksdb,luckywhu/rocksdb,temicai/rocksdb,sorphi/rocksdb,IMCG/RcoksDB,sorphi/rocksdb,OverlordQ/rocksdb,dkorolev/rocksdb,norton/rocksdb,RyanTech/rocksdb,JoeWoo/rocksdb,tizzybec/rocksdb,mbarbon/rocksdb,geraldoandradee/rocksdb,ryneli/rocksdb,wenduo/rocksdb,hobinyoon/rocksdb,msb-at-yahoo/rocksdb,RyanTech/rocksdb,anagav/rocksdb,ylong/rocksdb,lgscofield/rocksdb,skunkwerks/rocksdb,NickCis/rocksdb,virtdb/rocksdb,bbiao/rocksdb,biddyweb/rocksdb,Andymic/rocksdb,wlqGit/rocksdb,makelivedotnet/rocksdb,hobinyoon/rocksdb,tschottdorf/rocksdb,sorphi/rocksdb,jalexanderqed/rocksdb,OverlordQ/rocksdb,ryneli/rocksdb,tizzybec/rocksdb,flabby/rocksdb,alihalabyah/rocksdb,norton/rocksdb,wat-ze-hex/rocksdb,hobinyoon/rocksdb,biddyweb/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,JackLian/rocksdb,sorphi/rocksdb,tsheasha/rocksdb,tizzybec/rocksdb,norton/rocksdb,rDSN-Projects/rocksdb.replicated,wat-ze-hex/rocksdb,wat-ze-hex/rocksdb,NickCis/rocksdb,SunguckLee/RocksDB,JackLian/rocksdb,kaschaeffer/rocksdb,amyvmiwei/rocksdb,lgscofield/rocksdb,jalexanderqed/rocksdb,msb-at-yahoo/rocksdb,temicai/rocksdb,IMCG/RcoksDB,vmx/rocksdb,anagav/rocksdb,caijieming-baidu/rocksdb,IMCG/RcoksDB,hobinyoon/rocksdb,vmx/rocksdb,tschottdorf/rocksdb,wenduo/rocksdb,sorphi/rocksdb,Vaisman/rocksdb,norton/rocksdb,biddyweb/rocksdb,anagav/rocksdb,biddyweb/rocksdb,flabby/rocksdb,bbiao/rocksdb,IMCG/RcoksDB,vmx/rocksdb,caijieming-baidu/rocksdb,lgscofield/rocksdb,vashstorm/rocksdb,caijieming-baidu/rocksdb,geraldoandradee/rocksdb,rDSN-Projects/rocksdb.replicated,tsheasha/rocksdb,mbarbon/rocksdb,zhangpng/rocksdb,OverlordQ/rocksdb,vashstorm/rocksdb,luckywhu/rocksdb,virtdb/rocksdb,sorphi/rocksdb,kaschaeffer/rocksdb,anagav/rocksdb,facebook/rocksdb,SunguckLee/RocksDB,tschottdorf/rocksdb,caijieming-baidu/rocksdb,jalexanderqed/rocksdb,vashstorm/rocksdb,sorphi/rocksdb,dkorolev/rocksdb,fengshao0907/rocksdb,virtdb/rocksdb,facebook/rocksdb,Applied-Duality/rocksdb,kaschaeffer/rocksdb,rDSN-Projects/rocksdb.replicated,wat-ze-hex/rocksdb,bbiao/rocksdb,RyanTech/rocksdb,vmx/rocksdb,Andymic/rocksdb,kaschaeffer/rocksdb,wskplho/rocksdb,geraldoandradee/rocksdb,IMCG/RcoksDB,vmx/rocksdb,JackLian/rocksdb,facebook/rocksdb,RyanTech/rocksdb,caijieming-baidu/rocksdb,tizzybec/rocksdb,lgscofield/rocksdb,wat-ze-hex/rocksdb,OverlordQ/rocksdb,wskplho/rocksdb,tizzybec/rocksdb,JoeWoo/rocksdb,wat-ze-hex/rocksdb,wlqGit/rocksdb,msb-at-yahoo/rocksdb,tsheasha/rocksdb,hobinyoon/rocksdb,caijieming-baidu/rocksdb,geraldoandradee/rocksdb,SunguckLee/RocksDB,dkorolev/rocksdb,fengshao0907/rocksdb,skunkwerks/rocksdb,fengshao0907/rocksdb,makelivedotnet/rocksdb,wlqGit/rocksdb,makelivedotnet/rocksdb,OverlordQ/rocksdb,wenduo/rocksdb,geraldoandradee/rocksdb,biddyweb/rocksdb,JoeWoo/rocksdb,SunguckLee/RocksDB,zhangpng/rocksdb,zhangpng/rocksdb,IMCG/RcoksDB,RyanTech/rocksdb,alihalabyah/rocksdb,vmx/rocksdb,JoeWoo/rocksdb,JackLian/rocksdb,alihalabyah/rocksdb,Vaisman/rocksdb,tsheasha/rocksdb,wskplho/rocksdb,JackLian/rocksdb,zhangpng/rocksdb,temicai/rocksdb,NickCis/rocksdb,RyanTech/rocksdb,JohnPJenkins/rocksdb,Andymic/rocksdb