pie specs patch
robert at linuxfromscratch.org
Wed Nov 21 20:27:59 PST 2007
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 (
> 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
> make: *** [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 (mmx is the
most common problem). If I remember correctly, the nasm assembler also causes
> 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.
> What does this part of the patch do?
> Heiko Zuerker
> --- 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)
> -Common Report Var(flag_pie,2)
> +Common Report Var(flag_pie,2) Init(2)
> Generate position-independent code for executables if possible (large
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the hlfs-dev