pie specs patch

Heiko Zuerker heiko at zuerker.org
Thu Nov 22 06:04:52 PST 2007


Happy Thanksgiving !

On Wed, November 21, 2007 22:27, Robert Connolly wrote:
> On Wednesday November 21 2007 08:51:16 pm Heiko Zuerker wrote:
>>
>> The section of the gcc-4.1.2-fpie-1.patch I copied at the end of the
>> email, seems to cause problems with some packages (beyond the standard
>> HLFS build).
>> The most recent one I had trouble with is open-vm-tools (
>> http://sourceforge.net/project/showfiles.php?group_id=204462&package_id=
>> 244
>> 023&release_id=555776 ).
>> Unfortunately right now I don't recall the other packages which had the
>> same problem.
>>
>> This is the error:
>> checkvm.c: In function `getVersion':
>> checkvm.c:80: error: can't find a register in class `BREG' while
>> reloading `asm'
>> make[1]: *** [checkvm.o] Error 1
>>
>
> The 'BREG' is from non-pic assembly code. Often these packages have
> patches, or there's a ./configure option to disable some of the assembly

No patches unfortunately.

> (mmx is the
> most common problem). If I remember correctly, the nasm assembler also
> causes the 'BREG'.

And now I remember the other package: syslinux

>> You'll have to compile it with
>> ./configure --prefix=/usr --without-x
>> make CC="gcc -U_FORTIFY_SOURCE" LDFLAGS=-liconv
>
> I don't know why you would need the -U_FORTIFY_SOURCE here.

The package is producing warnings which prevent it from fully compiling.
I need to attack one problem at a time, that's why I choose the easy way
out of this one. ;-)

>> What does this part of the patch do?
>>
>> --- gcc-4.1.2.orig/gcc/common.opt	2006-05-17 18:38:58.000000000 +0000
>> +++ gcc-4.1.2/gcc/common.opt	2007-06-10 12:52:38.000000000 +0000
>> @@ -639,7 +639,7 @@
>> Generate position-independent code if possible (large mode)
>>
>>
>> fPIE -Common Report Var(flag_pie,2)
>> +Common Report Var(flag_pie,2) Init(2)
>> Generate position-independent code for executables if possible (large
>> mode)
>>
>> fpic
>
> This enables default -fPIE. The gcc specs replace it with -fPIC for
> libraries. This is what is causing your error. You can disable it with
> -fno-PIE.

OK I'll take a closer look at this (hopefully this weekend).

Thanks for the infos.

-- 

Regards
  Heiko Zuerker
  http://www.devil-linux.org





More information about the hlfs-dev mailing list