Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22159

Why does the LIBRARY_PATH variable redundantly use "/../../" for locating certain directories?

$
0
0

I was analyzing gcc -v main.c -Wl, --verbose, when I realized a few of the paths mentioned in the LIBRARY_PATH variable were laughably redundant (assuming ../ refers to the parent directory).

LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/

For example, look at this:
:/usr/lib/../lib/
Why would this exist? What's the point of going into lib, then coming out of it and again going back into? Given that /usr/lib is also included at the end.


Viewing all articles
Browse latest Browse all 22159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>