tools/python: Pass linker to Python build process
authorElliott Mitchell <ehem+xen@m5p.com>
Mon, 12 Oct 2020 01:11:39 +0000 (18:11 -0700)
committerWei Liu <wl@xen.org>
Fri, 16 Oct 2020 13:25:35 +0000 (13:25 +0000)
commit17d192e0238d6c714e9f04593b59597b7090be38
treea56f8e4dae9d49b1094eda2b37b8c5981dfa8c53
parent40fe714ca4245a9716264fcb3ee8df42c3650cf6
tools/python: Pass linker to Python build process

Unexpectedly the environment variable which needs to be passed is
$LDSHARED and not $LD.  Otherwise Python may find the build `ld` instead
of the host `ld`.

Replace $(LDFLAGS) with $(SHLIB_LDFLAGS) as Python needs shared objects
it can load at runtime, not executables.

This uses $(CC) instead of $(LD) since Python distutils appends $CFLAGS
to $LDFLAGS which breaks many linkers.

Signed-off-by: Elliott Mitchell <ehem+xen@m5p.com>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
tools/pygrub/Makefile
tools/python/Makefile