On Tue, Jul 22, 2008 at 10:03 PM, Josh Triplett <josht@xxxxxxxxxxxxxxxxxx> wrote: > On Tue, 2008-07-22 at 13:43 -0400, Morten Welinder wrote: >> > But won't gcc fail in such case? >> >> It will not fail, as gcc does not see any of it. But since the defines might >> not match what gcc runs with, you might get interesting effects. >> >> > Maybe we should not remove, but replace it >> > with a unique option to specify for which architecture sparse should check? >> >> That's certainly possible, but I would wait for an actual problem showing >> up before fixing anything. Right now, we can use -specs to get an idea >> what sparse would find for a different arch without actually having a gcc >> around that can cross compile. > > In general, it seems questionable to have cgcc handle an option named > identically to one in GCC but have it behave differently than GCC. > > That said, I do think Sparse should handle different architectures > without requiring compilation of a "cross-Sparse"; it really just needs > a specs-equivalent for each architecture. > > - Josh Triplett How about just s/specs/arch/ ? diff --git a/cgcc b/cgcc index 4fab530..f4417dc 100755 --- a/cgcc +++ b/cgcc @@ -23,7 +23,7 @@ foreach (@ARGV) { $m32 = 1 if /^-m32$/; $m64 = 1 if /^-m64$/; - if (/^-specs=(.*)$/) { + if (/^-arch=(.*)$/) { $check .= &add_specs ($1); $has_specs = 1; next; -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html