Skip to content

Commit

Permalink
Improve the declaration when LDPO_PIE is not available.
Browse files Browse the repository at this point in the history
Thanks to İsmail Dönmez for the better declaration.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201163 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
sylvestre committed Feb 11, 2014
1 parent 31575e7 commit 6a089db
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tools/gold/gold-plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
# define read _read
#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;

namespace {
Expand Down Expand Up @@ -153,14 +159,7 @@ ld_plugin_status onload(ld_plugin_tv *tv) {
switch (tv->tv_u.tv_val) {
case LDPO_REL: // .o
case LDPO_DYN: // .so
#ifdef LDPO_PIE
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;
break;
case LDPO_EXEC: // .exe
Expand Down

0 comments on commit 6a089db

Please sign in to comment.