kumquat-buildroot/package/qt5
Romain Naour f9548114d8 package/qt5/qt5webengine: don't link with libstdc++.a on the host
While cross-compiling, qt5webengine is building a host tool, 'gn', and
by default wants to link it statically with libstdc++, when the tool is
otherwise dynamically linked with other libraries:

    $ ldd 3rdparty/gn/out/Release/gn
        linux-vdso.so.1 (0x00007ffc1c999000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f48a3c06000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f48a3be4000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f48a3a1b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f48a3c53000)

Not all ditributions have the static libraries installed by default; for
example, on Fedora, libstdc++-static is not installed on a fresh system,
leading to build issues:

  [185/185] LINK gn
  FAILED: gn
  /usr/bin/g++ -O3 -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-strip-all -Wl,--as-needed -static-libstdc++ -pthread -o gn -Wl,--start-group tools/gn/gn_main.o base.a gn_lib.a -Wl,--end-group -ldl
  /usr/bin/ld : unable to find -lstdc++
  [...]
  Project ERROR: GN build error!

The root cause is the addition in [0] of a command line option to the
build of gn, that requests static linking with libstdc++ by default.

Explicitly pass that option now, to avoid static linking with libstdc++
and get a fully dynamicallty linked executable:

    $ ldd 3rdparty/gn/out/Release/gn
        linux-vdso.so.1 (0x00007ffd3f160000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f68138e7000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f68138c5000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f68136fc000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f68135b6000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6813b13000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f681359c000)

[0] cfab9198a9 (diff-905c8f054808213577c0a92d1b704615)

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Gaël Portay <gael.portay@collabora.com>
[yann.morin.1998@free.fr:
  - rewrite the commit log with extra details and explanations
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-05-31 22:22:25 +02:00
..
qt5base package/qt5base: disable feature-relocatable 2020-05-17 21:24:22 +02:00
qt5charts
qt5connectivity
qt5declarative package/qt5/qt5declarative: fix parallel install 2020-05-28 22:16:19 +02:00
qt5enginio
qt5graphicaleffects
qt5imageformats
qt5location
qt5multimedia
qt5quickcontrols
qt5quickcontrols2
qt5script
qt5scxml
qt5sensors
qt5serialbus
qt5serialport
qt5svg
qt5tools
qt5virtualkeyboard
qt5wayland
qt5webchannel
qt5webengine package/qt5/qt5webengine: don't link with libstdc++.a on the host 2020-05-31 22:22:25 +02:00
qt5webkit
qt5webkit-examples
qt5websockets
qt5webview
qt5x11extras
qt5xmlpatterns
qt53d
Config.in
qt5.mk