ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC

Mark Millard marklmi at yahoo.com
Thu Nov 15 03:42:09 UTC 2018


[My wording presumed some context not presented.]

On 2018-Nov-14, at 18:21, Mark Millard <marklmi at yahoo.com> wrote:

> On 2018-Nov-14, at 17:45, Bryan Drewery <bdrewery at FreeBSD.org> wrote:
> 
>> I think the real problem here is that Poudriere is setting MACHINE_ARCH
>> in make.conf and sys.mk loads make.conf *after* checking MACHINE_CPUARCH
>> (derived from MACHINE_ARCH) to determine CFLAGS; The .if is expanding
>> MACHINE_CPUARCH before make.conf is included.
>> 
>> We probably need a make-env.conf thing like src-env.conf to allow
>> modifying sys.mk earlier.
> 
> Cool.
> 
> 
> We still get the result that arm[67], and possibly some mips,
> have had a lot of -O2 use based on what has historically been
> done by the qemu-user-static based official-build servers.
 
The reference to qemu-user-static was meant to be for
with /nxb-bin/. . . (or some form of native tools). It
is the native tools that initially have MACHINE_ARCH
being amd64 by default for the example contexts.

Absent that, qemu-arm-static would likely report armv6 for
all arm's until the explicit assignment. (The "armv6" is a
single compile-time constant in the qemu-arm-static
source at this time.) So this likely would behave as on
a native build: -O .

> And that leads to questioning the need for -O instead of -O2
> for armv[67] and possibly some mips contexts.
> 
> Or, going the other way: Should -O be forced and have an
> exp run for, say armv7 ? An example of what would be found is
> what I ran into for x11/pixman when its build used -O (native)
> instead of -O2 (cross-build via qemu-user-static) and a link
> command failed for -O use. (It was the failure that started my
> looking for what was different from my prior cross-build that
> had worked.)


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-ports mailing list