diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2012-11-19 10:43:23 -0800 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2012-12-04 13:04:57 -0800 |
commit | 5b6ec1b6e92b9de070a36df11eb123338228a85b (patch) | |
tree | 96e95f098e7f84d5d61df01fac028c1d28edecab /pkg.c | |
parent | 9bf6277b9c4f1980e3449ddc164e748d9b762200 (diff) | |
download | pkg-config-5b6ec1b6e92b9de070a36df11eb123338228a85b.tar.gz |
Output -l and other Libs flags in the order they appear
Often other Libs flags have semantics that are based on their context
with -l arguments. For example, the GNU linker options
-Bdynamic/-Bstatic pertain only to the objects or link options that
follow them. So, a valid link command containing these options would get
mangled by pkg-config since it separates -l flags from others..
-Bdynamic -la -Bstatic -lb -> -Bdynamic -Bstatic -la -lb
Instead, output -l and other Libs flags in a single pass so they mantain
their ordering.
Freedesktop #19950 (https://bugs.freedesktop.org/show_bug.cgi?id=19950)
Diffstat (limited to 'pkg.c')
-rw-r--r-- | pkg.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -997,17 +997,11 @@ packages_get_flags (GList *pkgs, FlagType flags) g_string_append (str, cur); g_free (cur); } - if (flags & LIBS_OTHER) + if (flags & (LIBS_OTHER | LIBS_l)) { - cur = get_multi_merged (pkgs, LIBS_OTHER, FALSE, !ignore_private_libs); - debug_spew ("adding LIBS_OTHER string \"%s\"\n", cur); - g_string_append (str, cur); - g_free (cur); - } - if (flags & LIBS_l) - { - cur = get_multi_merged (pkgs, LIBS_l, FALSE, !ignore_private_libs); - debug_spew ("adding LIBS_l string \"%s\"\n", cur); + cur = get_multi_merged (pkgs, flags & (LIBS_OTHER | LIBS_l), FALSE, + !ignore_private_libs); + debug_spew ("adding LIBS_OTHER | LIBS_l string \"%s\"\n", cur); g_string_append (str, cur); g_free (cur); } |