[distcc] patch: -Wa,-xarch=v8 incorrectly not distributed

Ben Scarlet bscarlet at endeca.com
Sat Jan 24 01:53:18 GMT 2004


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.

	Ben Scarlet

----------------------------------------------------------
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;



More information about the distcc mailing list