preserving order of linker flags

Tollef Fog Heen tfheen at err.no
Tue Jan 25 22:27:14 PST 2011


]] Stefan Vigerske 

| Is there any way how to avoid this behaviour, i.e., to tell pkg-config
| to keep the relative order of the entries in the "Libs:" field?

No, not at the moment.

| PS: Reformulating /mine/lib2.a as -L/mine -l2 is not possible since,
| first, these are linker flags provided by a user from "outside", and,
| second, because /mine/lib2.a is used since there is already a
| /usr/lib/lib2.a, which may be choosen instead of /mine/lib2.a, if the
| -L,-l syntax is used.

No, this won't happen, we strip -L/usr/lib so the system paths are
always searched last, unless your toolchain is doing something wrong.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


More information about the pkg-config mailing list