I have been looking through some configuration files and I’ve seen both being used (albeit on different architectures). If you’re using GCC on a Linux box, is there a difference between the two syntaxes for passing options to the linker?
Reading the GCC manual they are explained it almost identically as far as I could tell.
From
man gcc:As you can se, the only difference is that
-Wlallows you to specify multiple arguments by means of a comma, like-Wl,-rpath,/my/libs, which you cannot do with-Xlinker; on the other hand,-Xlinkeris maybe a bit more self-descriptive. Take your pick. Also check other compilers (nvcccomes to mind, andclang) to see if any of them agree on the syntax, and then use that for portability if that’s important to you.