mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-21 23:28:13 +02:00
For some flags, pkg-config will sort them by the depth of their .pc path before outputting. The idea is that flags from a deeper path should come earlier in the command line. This makes sense for -L and -I flags, but not for generic linker and compiler flags. For these flags and -l flags, it makes sense to sort them only by package order.
14 lines
353 B
Bash
Executable file
14 lines
353 B
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
. ${srcdir}/common
|
|
|
|
RESULT="-DPATH2 -DPATH1 -DFOO -I/path/include"
|
|
run_test --cflags flag-dup-1 flag-dup-2
|
|
run_test --cflags flag-dup-2 flag-dup-1
|
|
|
|
RESULT="-Wl,--whole-archive --Wl,--no-whole-archive -R -Xlinker /path/lib \
|
|
-L/path/lib -lpath2 -lpath1 -lm"
|
|
run_test --libs flag-dup-1 flag-dup-2
|
|
run_test --libs flag-dup-2 flag-dup-1
|