Force GCC to ignore certain flags?
I am trying to find a way to get GCC to temporarily ignore -arch ppc and -arch i386 flags. Does anyone have a method for accomplishing this? I have read about ways to force flags, like writing shell scripts called GCC and putting them in your path above the real GCC, but I'm looking for the opposite. My want for accomplishing this is to potentia开发者_高级运维lly solve this problem:
R-Perl Install Problems with GCC 4.0: How do you remove unnecessary -arch flags
Thanks for your help!
You could do it the same way: write a wrapper script but instead of passing all flags, go through them and remove the arch flag. This can look like this:
#!/bin/bash
gcc ${@/-arch=i386}
(here maybe some fine tuning is necessary: when you have to remove multiple options introduce a help variable and make the changes step by step).
EDIT: Removed other suggestion.
精彩评论