Sample Header Ad - 728x90

Filter out command line options before passing to a program

1 vote
2 answers
1850 views
I am running cmake and it is passing a flag to my linker that is unrecognized (-rdynamic), and it's causing an error. I cannot figure out where it is getting this flag from, so I want to just filter it out. I can specify -DCMAKE_LINKER=, so what I would like to do is set `` to a program that reads its command line arguments, filters out the bad one, and then passes the result back to the actual linker. I have been using awk '{gsub("-rdynamic", "");print}', but I don't know to make the input stdin and the output ld.
Asked by RJTK (123 rep)
Oct 5, 2018, 03:48 PM
Last activity: Aug 3, 2025, 12:34 AM