buildgcc: Build GMP `--with-pic` if GCC defaults to `-pie`

GCC 6 can optionally default to building all binaries as position
independent executables (PIE). This breaks linking against static
libraries that are compiled without position independent code (PIC).

Building GMP `--with-pic` in this case seems to be the least fragile

TEST=Run `make all` and `make BUILDGCC_OPTIONS=-b build-i386` in
     util/crossgcc on Debian Stretch.

Change-Id: I5f3185af9c8d599379a628e18724b217b88be974
Signed-off-by: Nico Huber <>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <>
Reviewed-by: Jonathan Neuschäfer <>
1 file changed