Changes in / [4f5a8a2:ef46abb]
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r4f5a8a2 ref46abb 663 663 ac_ct_DUMPBIN 664 664 DUMPBIN 665 LD666 665 FGREP 667 666 EGREP … … 701 700 LDFLAGS 702 701 CXXFLAGS 703 CXX704 702 CFA_FLAGS 705 703 LIBCFA_TARGET_MAKEFILES … … 723 721 CFA_INCDIR 724 722 CFA_PREFIX 723 LD 724 CXX 725 ENABLE_DISTCC_FALSE 726 ENABLE_DISTCC_TRUE 725 727 DOendif 726 728 DOifskipcompile … … 797 799 enable_silent_rules 798 800 with_cfa_name 801 enable_distcc 799 802 with_target_hosts 800 803 enable_gprofiler … … 1459 1462 --enable-silent-rules less verbose build output (undo: "make V=1") 1460 1463 --disable-silent-rules verbose build output (undo: "make V=0") 1464 --enable-distcc whether or not to enable distributed compilation 1461 1465 --enable-gprofiler whether or not to enable gprofiler tools (if available) 1462 1466 --enable-demangler whether or not to build the demangler (executable and library) … … 3180 3184 3181 3185 DOendif='endif' 3186 3187 3188 3189 #============================================================================== 3190 # distcc support 3191 3192 # Check whether --enable-distcc was given. 3193 if test "${enable_distcc+set}" = set; then : 3194 enableval=$enable_distcc; enable_distcc=$enableval 3195 else 3196 enable_distcc=no 3197 fi 3198 3199 3200 if test x$enable_distcc = xyes; then 3201 ENABLE_DISTCC_TRUE= 3202 ENABLE_DISTCC_FALSE='#' 3203 else 3204 ENABLE_DISTCC_TRUE='#' 3205 ENABLE_DISTCC_FALSE= 3206 fi 3207 3208 3209 if test x$enable_distcc = xyes; then 3210 CXX="distcc ${CXX}" 3211 LD="distcc ${LD} -lstdc++" 3212 echo "Enabling distributed builds" 3213 fi 3214 3182 3215 3183 3216 … … 17017 17050 fi 17018 17051 17052 if test -z "${ENABLE_DISTCC_TRUE}" && test -z "${ENABLE_DISTCC_FALSE}"; then 17053 as_fn_error $? "conditional \"ENABLE_DISTCC\" was never defined. 17054 Usually this means the macro was only invoked conditionally." "$LINENO" 5 17055 fi 17019 17056 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 17020 17057 as_fn_error $? "conditional \"AMDEP\" was never defined. -
configure.ac
r4f5a8a2 ref46abb 56 56 AC_SUBST([DOendif]) 57 57 AM_SUBST_NOTMAKE([DOendif]) 58 59 #============================================================================== 60 # distcc support 61 62 AC_ARG_ENABLE(distcc, 63 [ --enable-distcc whether or not to enable distributed compilation], 64 enable_distcc=$enableval, enable_distcc=no) 65 66 AM_CONDITIONAL([ENABLE_DISTCC], [test x$enable_distcc = xyes]) 67 68 if test x$enable_distcc = xyes; then 69 CXX="distcc ${CXX}" 70 LD="distcc ${LD} -lstdc++" 71 echo "Enabling distributed builds" 72 fi 73 74 AC_SUBST(CXX) 75 AC_SUBST(LD) 58 76 59 77 #============================================================================== -
driver/cfa.cc
r4f5a8a2 ref46abb 76 76 return false; 77 77 } //dirExists 78 79 static inline string dir(const string & path) { 80 return path.substr(0, path.find_last_of('/')); 81 } 78 82 79 83 … … 112 116 bool m64 = false; // -m64 flag 113 117 bool intree = false; 118 bool disttree = false; 114 119 115 120 const char *args[argc + 100]; // cfa command line values, plus some space for additional flags … … 128 133 129 134 // process command-line arguments 135 136 args[nargs] = "-x"; // turn off language 137 nargs += 1; 138 args[nargs] = "c"; 139 nargs += 1; 130 140 131 141 for ( int i = 1; i < argc; i += 1 ) { … … 171 181 } else if ( arg == "-in-tree" ) { 172 182 intree = true; 183 } else if ( arg == "-dist-tree" ) { 184 disttree = true; 173 185 } else if ( arg == "-compiler" ) { 174 186 // use the user specified compiler … … 380 392 string libdir = libbase + arch + "-" + config; 381 393 382 if ( ! nolib && ! dirExists( libdir ) ) { 383 cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl; 384 cerr << "Was looking for " << libdir << endl; 385 libdir = libbase + arch + "-" + "nolib"; 386 } // if 387 388 if ( ! dirExists( libdir ) ) { 389 cerr << argv[0] << " internal error, cannot find prelude directory." << endl; 390 cerr << "Was looking for " << libdir << endl; 391 exit( EXIT_FAILURE ); 392 } // if 393 394 args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + libdir + (intree ? "/prelude" : "")) ).c_str(); 394 if (!disttree) { 395 if ( ! nolib && ! dirExists( libdir ) ) { 396 cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl; 397 cerr << "Was looking for " << libdir << endl; 398 for(int i = 1; i < argc; i++) { 399 cerr << argv[i] << " "; 400 } 401 cerr << endl; 402 libdir = libbase + arch + "-" + "nolib"; 403 } // if 404 405 if ( ! dirExists( libdir ) ) { 406 cerr << argv[0] << " internal error, cannot find prelude directory." << endl; 407 cerr << "Was looking for " << libdir << endl; 408 exit( EXIT_FAILURE ); 409 } // if 410 } // if 411 412 if(disttree) { 413 args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + dir(argv[0])) ).c_str(); 414 } else if(intree) { 415 args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + libdir + "/prelude") ).c_str(); 416 } else { 417 args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + libdir) ).c_str(); 418 } 395 419 nargs += 1; 396 420 … … 481 505 482 506 if ( Bprefix.length() == 0 ) { 483 Bprefix = ! intree ? installlibdir : srcdriverdir; 507 if(disttree) { 508 Bprefix = dir(argv[0]); 509 } else if(intree) { 510 Bprefix = srcdriverdir; 511 } else { 512 Bprefix = installlibdir; 513 } 514 484 515 if ( Bprefix[Bprefix.length() - 1] != '/' ) Bprefix += '/'; 485 516 args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str(); … … 539 570 if ( ! quiet ) { 540 571 cerr << "CFA " << "Version " << Version << heading << endl; 541 542 572 if ( help ) { 543 573 cerr << -
libcfa/Makefile.in
r4f5a8a2 ref46abb 231 231 CFACC = @CFACC@ 232 232 CFACPP = @CFACPP@ 233 CFADIR_HASH = @CFADIR_HASH@ 233 234 CFA_BINDIR = @CFA_BINDIR@ 234 235 CFA_INCDIR = @CFA_INCDIR@ … … 274 275 LIPO = @LIPO@ 275 276 LN_S = @LN_S@ 277 LOCAL_CFACC = @LOCAL_CFACC@ 276 278 LTLIBOBJS = @LTLIBOBJS@ 277 279 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ … … 293 295 PACKAGE_VERSION = @PACKAGE_VERSION@ 294 296 PATH_SEPARATOR = @PATH_SEPARATOR@ 297 PRELUDEFLAG = @PRELUDEFLAG@ 295 298 RANLIB = @RANLIB@ 296 299 SED = @SED@ -
libcfa/configure
r4f5a8a2 ref46abb 707 707 CONFIG_CFLAGS 708 708 ARCH_FLAGS 709 PRELUDEFLAG 710 CFADIR_HASH 711 LOCAL_CFACC 709 712 CFACPP 710 713 CFACC 714 ENABLE_DISTCC_FALSE 715 ENABLE_DISTCC_TRUE 711 716 CFA_VERSION 712 717 DRIVER_DIR … … 783 788 enable_option_checking 784 789 enable_silent_rules 790 enable_distcc 785 791 with_cfa_name 786 792 enable_shared … … 1445 1451 --enable-silent-rules less verbose build output (undo: "make V=1") 1446 1452 --disable-silent-rules verbose build output (undo: "make V=0") 1453 --enable-distcc whether or not to enable distributed compilation 1447 1454 --enable-shared[=PKGS] build shared libraries [default=yes] 1448 1455 --enable-static[=PKGS] build static libraries [default=yes] … … 2941 2948 2942 2949 2943 CFACC=${DRIVER_DIR}cfa 2950 # Check whether --enable-distcc was given. 2951 if test "${enable_distcc+set}" = set; then : 2952 enableval=$enable_distcc; enable_distcc=$enableval 2953 else 2954 enable_distcc=no 2955 fi 2956 2957 2958 echo -n "checking for distributated build... " 2959 if test x$enable_distcc = xno; then 2960 CFACC=${DRIVER_DIR}cfa 2961 PRELUDEFLAG='-in-tree' 2962 echo "no" 2963 else 2964 path=$(readlink -f .) 2965 CFADIR_HASH=$(openssl dgst -sha256 <<< $path) 2966 CFADIR_HASH="${CFADIR_HASH: -10}" 2967 CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa" 2968 PRELUDEFLAG='-dist-tree' 2969 echo "yes (hash=${CFADIR_HASH})" 2970 fi 2944 2971 CFACPP=${DRIVER_DIR}cfa-cpp 2972 LOCAL_CFACC=${DRIVER_DIR}cfa 2973 2974 if test x$enable_distcc = xyes; then 2975 ENABLE_DISTCC_TRUE= 2976 ENABLE_DISTCC_FALSE='#' 2977 else 2978 ENABLE_DISTCC_TRUE='#' 2979 ENABLE_DISTCC_FALSE= 2980 fi 2981 2982 2983 2984 2985 2945 2986 2946 2987 … … 16982 17023 fi 16983 17024 17025 if test -z "${ENABLE_DISTCC_TRUE}" && test -z "${ENABLE_DISTCC_FALSE}"; then 17026 as_fn_error $? "conditional \"ENABLE_DISTCC\" was never defined. 17027 Usually this means the macro was only invoked conditionally." "$LINENO" 5 17028 fi 16984 17029 if test -z "${BUILDLIB_TRUE}" && test -z "${BUILDLIB_FALSE}"; then 16985 17030 as_fn_error $? "conditional \"BUILDLIB\" was never defined. -
libcfa/configure.ac
r4f5a8a2 ref46abb 27 27 AC_ARG_VAR(CFA_VERSION, [The long version of cfa]) 28 28 29 CFACC=${DRIVER_DIR}cfa 29 AC_ARG_ENABLE(distcc, 30 [ --enable-distcc whether or not to enable distributed compilation], 31 enable_distcc=$enableval, enable_distcc=no) 32 33 echo -n "checking for distributated build... " 34 if test x$enable_distcc = xno; then 35 CFACC=${DRIVER_DIR}cfa 36 PRELUDEFLAG='-in-tree' 37 echo "no" 38 else 39 path=$(readlink -f .) 40 CFADIR_HASH=$(openssl dgst -sha256 <<< $path) 41 CFADIR_HASH="${CFADIR_HASH: -10}" 42 CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa" 43 PRELUDEFLAG='-dist-tree' 44 echo "yes (hash=${CFADIR_HASH})" 45 fi 30 46 CFACPP=${DRIVER_DIR}cfa-cpp 47 LOCAL_CFACC=${DRIVER_DIR}cfa 48 49 AM_CONDITIONAL([ENABLE_DISTCC], [test x$enable_distcc = xyes]) 50 31 51 AC_SUBST(CFACC) 32 52 AC_SUBST(CFACPP) 53 AC_SUBST(LOCAL_CFACC) 54 AC_SUBST(CFADIR_HASH) 33 55 AC_SUBST(CFA_VERSION) 56 AC_SUBST(PRELUDEFLAG) 34 57 35 58 #============================================================================== -
libcfa/prelude/Makefile.am
r4f5a8a2 ref46abb 23 23 cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c 24 24 25 CC = @ CFACC@25 CC = @LOCAL_CFACC@ 26 26 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 27 27 AM_CFAFLAGS = @CONFIG_CFAFLAGS@ … … 54 54 55 55 # create forward declarations for cfa builtins 56 builtins.cf : builtins.c ${CC}56 builtins.cf : builtins.c @LOCAL_CFACC@ 57 57 ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po -D__cforall 58 58 ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po … … 68 68 MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cfa 69 69 MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} 70 71 if ENABLE_DISTCC 72 distribution: @LOCAL_CFACC@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh 73 ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ 74 echo "Dummy file to track distribution to remote hosts" > ${@} 75 76 all: all-am distribution 77 endif ENABLE_DISTCC -
libcfa/prelude/Makefile.in
r4f5a8a2 ref46abb 167 167 AUTOMAKE = @AUTOMAKE@ 168 168 AWK = @AWK@ 169 CC = @ CFACC@169 CC = @LOCAL_CFACC@ 170 170 CCAS = @CCAS@ 171 171 CCASDEPMODE = @CCASDEPMODE@ … … 174 174 CFACC = @CFACC@ 175 175 CFACPP = @CFACPP@ 176 CFADIR_HASH = @CFADIR_HASH@ 176 177 CFA_BINDIR = @CFA_BINDIR@ 177 178 CFA_INCDIR = @CFA_INCDIR@ … … 217 218 LIPO = @LIPO@ 218 219 LN_S = @LN_S@ 220 LOCAL_CFACC = @LOCAL_CFACC@ 219 221 LTLIBOBJS = @LTLIBOBJS@ 220 222 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ … … 236 238 PACKAGE_VERSION = @PACKAGE_VERSION@ 237 239 PATH_SEPARATOR = @PATH_SEPARATOR@ 240 PRELUDEFLAG = @PRELUDEFLAG@ 238 241 RANLIB = @RANLIB@ 239 242 SED = @SED@ … … 555 558 556 559 # create forward declarations for cfa builtins 557 builtins.cf : builtins.c ${CC}560 builtins.cf : builtins.c @LOCAL_CFACC@ 558 561 ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po -D__cforall 559 562 ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po … … 566 569 maintainer-clean-local : 567 570 rm -rf $(DEPDIR) 571 572 @ENABLE_DISTCC_TRUE@distribution: @LOCAL_CFACC@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh 573 @ENABLE_DISTCC_TRUE@ ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ 574 @ENABLE_DISTCC_TRUE@ echo "Dummy file to track distribution to remote hosts" > ${@} 575 576 @ENABLE_DISTCC_TRUE@all: all-am distribution 568 577 569 578 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
libcfa/src/Makefile.am
r4f5a8a2 ref46abb 30 30 # use -no-include-stdhdr to prevent rebuild cycles 31 31 # The built sources must not depend on the installed headers 32 AM_CFAFLAGS = -quiet -in-tree-I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@32 AM_CFAFLAGS = -quiet @PRELUDEFLAG@ -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@ 33 33 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 34 34 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ … … 62 62 # add dependency of cfa files 63 63 libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc)))) 64 $(libobjs) : @ CFACC@ @CFACPP@ prelude.cfa64 $(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa 65 65 66 66 thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc)))) 67 $(thread_libobjs) : @ CFACC@ @CFACPP@ prelude.cfa67 $(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa 68 68 69 69 … … 84 84 85 85 86 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @ CFACC@ @CFACPP@87 ${AM_V_GEN}$(CFACOMPILE) -quiet -in-tree-XCFA -l ${<} -c -o ${@}86 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 87 ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@} 88 88 89 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @ CFACC@ @CFACPP@89 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 90 90 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 91 $(CFACOMPILE) -quiet -in-tree-XCFA -l ${<} -c -o ${@}91 $(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@} 92 92 93 93 -
libcfa/src/Makefile.in
r4f5a8a2 ref46abb 284 284 CFACC = @CFACC@ 285 285 CFACPP = @CFACPP@ 286 CFADIR_HASH = @CFADIR_HASH@ 286 287 CFA_BINDIR = @CFA_BINDIR@ 287 288 CFA_INCDIR = @CFA_INCDIR@ … … 327 328 LIPO = @LIPO@ 328 329 LN_S = @LN_S@ 330 LOCAL_CFACC = @LOCAL_CFACC@ 329 331 LTLIBOBJS = @LTLIBOBJS@ 330 332 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ … … 346 348 PACKAGE_VERSION = @PACKAGE_VERSION@ 347 349 PATH_SEPARATOR = @PATH_SEPARATOR@ 350 PRELUDEFLAG = @PRELUDEFLAG@ 348 351 RANLIB = @RANLIB@ 349 352 SED = @SED@ … … 440 443 # use -no-include-stdhdr to prevent rebuild cycles 441 444 # The built sources must not depend on the installed headers 442 AM_CFAFLAGS = -quiet -in-tree-I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@445 AM_CFAFLAGS = -quiet @PRELUDEFLAG@ -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@ 443 446 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 444 447 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ … … 936 939 $(LTCFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 937 940 $(am__mv) $$depbase.Tpo $$depbase.Plo 938 $(libobjs) : @ CFACC@ @CFACPP@ prelude.cfa939 $(thread_libobjs) : @ CFACC@ @CFACPP@ prelude.cfa941 $(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa 942 $(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa 940 943 941 944 -include $(libdeps) … … 943 946 -include $(thread_libdeps) 944 947 945 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @ CFACC@ @CFACPP@946 ${AM_V_GEN}$(CFACOMPILE) -quiet -in-tree-XCFA -l ${<} -c -o ${@}947 948 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @ CFACC@ @CFACPP@948 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 949 ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@} 950 951 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 949 952 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 950 $(CFACOMPILE) -quiet -in-tree-XCFA -l ${<} -c -o ${@}953 $(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@} 951 954 952 955 #----------------------------------------------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.