Improve the declaration when LDPO_PIE is not available.

Thanks to İsmail Dönmez for the better declaration.

llvm-svn: 201163
This commit is contained in:
Sylvestre Ledru 2014-02-11 17:30:18 +00:00
parent c939907a5a
commit 539997978e
1 changed files with 6 additions and 7 deletions

View File

@ -38,6 +38,12 @@
# define read _read # define read _read
#endif #endif
#ifndef LDPO_PIE
// FIXME: remove this declaration when we stop maintaining Ubuntu Quantal and
// Precise and Debian Wheezy (binutils 2.23 is required)
# define LDPO_PIE 3
#endif
using namespace llvm; using namespace llvm;
namespace { namespace {
@ -153,14 +159,7 @@ ld_plugin_status onload(ld_plugin_tv *tv) {
switch (tv->tv_u.tv_val) { switch (tv->tv_u.tv_val) {
case LDPO_REL: // .o case LDPO_REL: // .o
case LDPO_DYN: // .so case LDPO_DYN: // .so
#ifdef LDPO_PIE
case LDPO_PIE: // position independent executable case LDPO_PIE: // position independent executable
#else
// FIXME: remove this declaration when we stop maintaining
// Ubuntu Quantal and Precise and Debian Wheezy (binutils 2.23 is
// required)
case 3:
#endif
output_type = LTO_CODEGEN_PIC_MODEL_DYNAMIC; output_type = LTO_CODEGEN_PIC_MODEL_DYNAMIC;
break; break;
case LDPO_EXEC: // .exe case LDPO_EXEC: // .exe