After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794978 - Meson: glib-networking uses get_support_arguments() on ldflags
Meson: glib-networking uses get_support_arguments() on ldflags
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2018-04-04 15:39 UTC by Xavier Claessens
Modified: 2018-04-25 20:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Meson: Use get_supported_link_arguments() for '-Wl,' args (1.12 KB, patch)
2018-04-23 20:41 UTC, Xavier Claessens
committed Details | Review

Description Xavier Claessens 2018-04-04 15:39:23 UTC
Meson configuration prints this warnings:

WARNING: -Wl,--version-script,/home/xclaesse/programmation/glib-networking/glib-networking.map looks like a linker argument, but has_argument
and other similar methods only support checking compiler arguments.
Using them to check linker arguments are never supported, and results
are likely to be wrong regardless of the compiler you are using.

That's because cc.get_supported_arguments() is only for cflags not ldflags. That code is wrong:

  test_ldflag = '-Wl,--version-script,' + symbol_map
  module_ldflags += cc.get_supported_arguments(test_ldflag)

There is currently no API in meson to test for link flags. I made a PR there:
https://github.com/mesonbuild/meson/pull/3353
Comment 1 Xavier Claessens 2018-04-23 20:41:33 UTC
Created attachment 371300 [details] [review]
Meson: Use get_supported_link_arguments() for '-Wl,' args

Otherwise meson print warning because get_supported_arguments() tests if
a code snippet compiles but not links.

This uses new API added in meson 0.46.0.
Comment 2 Xavier Claessens 2018-04-25 20:07:47 UTC
Attachment 371300 [details] pushed as 452c085 - Meson: Use get_supported_link_arguments() for '-Wl,' args
Comment 3 Xavier Claessens 2018-04-25 20:12:38 UTC
Oops, pushed this one by error when pushing patch for bug #795043. I think this patch was OK too, right?
Comment 4 Michael Catanzaro 2018-04-25 20:44:35 UTC
Yes, thanks!