On 23 Jan 2004, Ben Scarlet <[EMAIL PROTECTED]> wrote: > The following patch makes the processing of arguments passed through to the > assembler slightly less conservative. When compiling 32-bit sparc code with > gcc-2.95.3, it is sometimes necessary to tweak assembler's notion of the > architecture to allow for the use of some fancier instructions. (e.g. - the > atomic operation instructions used in implementing reference counting in > some multithread-safe implementations of the c++ class std::string). One way > to get the appropriate information to the compiler is to use the flag > -Wa,-xarch=v8. As of distcc version 2.12.1, this flag would erroneously > cause distcc to refuse to distribute a compilation, because that version > takes a very simplistic approach to detecting another assembler flag, > -Wa,-al=foo. The following patch improves the detection of the "-al" flag > just slightly, so as to let compiles without it but still with an '=' in an > assembler flag get distributed.
The basic idea is OK, but I think the implementation is still too
likely to guess wrong if there happens to be another -al in the
option.
Since the gcc manual says the option is split at the commas then I
think we need to look for something like the regexp ,-al[=,]
> ----------------------------------------------------------
> diff -rc distcc-2.12.1/src/arg.c distcc-2.12.1-new/src/arg.c
> *** distcc-2.12.1/src/arg.c 2003-10-08 01:41:49.000000000 -0400
> --- distcc-2.12.1-new/src/arg.c 2004-01-23 20:48:46.000000000 -0500
> ***************
> *** 177,184 ****
> * listing to the named file and cannot be remote.
> Parsing
> * all the options would be complex since you can give
> several
> * comma-separated assembler options after -Wa, but
> looking
> ! * for '=' should be safe. */
> ! if (strchr(a, '=')) {
> rs_trace("%s needs to write out assembly listings and
> must be local",
> a);
> return EXIT_DISTCC_FAILED;
> --- 177,184 ----
> * listing to the named file and cannot be remote.
> Parsing
> * all the options would be complex since you can give
> several
> * comma-separated assembler options after -Wa, but
> looking
> ! * for "-al=" should be safe. */
> ! if (strstr(a, "-al=")) {
> rs_trace("%s needs to write out assembly listings and
> must be local",
> a);
> return EXIT_DISTCC_FAILED;
> __
> distcc mailing list http://distcc.samba.org/
> To unsubscribe or change options:
> http://lists.samba.org/mailman/listinfo/distcc
--
Martin
signature.asc
Description: Digital signature
__ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/distcc
