[llvm] r201110 - Fix an old FIXME. LDPO_PIE is available since 2.23, realeased 2012-10-22.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Feb 11 09:10:31 PST 2014


>> --- llvm/trunk/tools/gold/gold-plugin.cpp (original)
>> +++ llvm/trunk/tools/gold/gold-plugin.cpp Mon Feb 10 14:38:38 2014
>> @@ -153,8 +153,7 @@ ld_plugin_status onload(ld_plugin_tv *tv
>>          switch (tv->tv_u.tv_val) {
>>            case LDPO_REL:  // .o
>>            case LDPO_DYN:  // .so
>> -          // FIXME: Replace 3 with LDPO_PIE once that is in a released binutils.
>> -          case 3: // position independent executable
>> +          case LDPO_PIE:  // position independent executable
>>
> This patch broke any backport on older version of Ubuntu ( example:
> http://llvm.org/apt/ ).

Sorry about that. It is amazing how long binutils takes to propagate out :-(

> Do you mind if I apply this patch:

Please do, but add a fixme saying where LDPO_PIE is not defined
(newest ubuntu/debian missing it).

> Index: tools/gold/gold-plugin.cpp
> ===================================================================
> --- tools/gold/gold-plugin.cpp    (révision 201158)
> +++ tools/gold/gold-plugin.cpp    (copie de travail)
> @@ -153,7 +153,11 @@
>          switch (tv->tv_u.tv_val) {
>            case LDPO_REL:  // .o
>            case LDPO_DYN:  // .so
> +#ifdef LDPO_PIE
>            case LDPO_PIE:  // position independent executable
> +#else
> +            case 3:
> +#endif
>              output_type = LTO_CODEGEN_PIC_MODEL_DYNAMIC;
>              break;
>            case LDPO_EXEC:  // .exe
>
>
> S

Thanks,
Rafael




More information about the llvm-commits mailing list