Changes in / [ef46abb:4f5a8a2]
- Files:
-
- 10 edited
-
configure (modified) (7 diffs)
-
configure.ac (modified) (1 diff)
-
driver/cfa.cc (modified) (7 diffs)
-
libcfa/Makefile.in (modified) (3 diffs)
-
libcfa/configure (modified) (5 diffs)
-
libcfa/configure.ac (modified) (1 diff)
-
libcfa/prelude/Makefile.am (modified) (3 diffs)
-
libcfa/prelude/Makefile.in (modified) (6 diffs)
-
libcfa/src/Makefile.am (modified) (3 diffs)
-
libcfa/src/Makefile.in (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
configure
ref46abb r4f5a8a2 663 663 ac_ct_DUMPBIN 664 664 DUMPBIN 665 LD 665 666 FGREP 666 667 EGREP … … 700 701 LDFLAGS 701 702 CXXFLAGS 703 CXX 702 704 CFA_FLAGS 703 705 LIBCFA_TARGET_MAKEFILES … … 721 723 CFA_INCDIR 722 724 CFA_PREFIX 723 LD724 CXX725 ENABLE_DISTCC_FALSE726 ENABLE_DISTCC_TRUE727 725 DOendif 728 726 DOifskipcompile … … 799 797 enable_silent_rules 800 798 with_cfa_name 801 enable_distcc802 799 with_target_hosts 803 800 enable_gprofiler … … 1462 1459 --enable-silent-rules less verbose build output (undo: "make V=1") 1463 1460 --disable-silent-rules verbose build output (undo: "make V=0") 1464 --enable-distcc whether or not to enable distributed compilation1465 1461 --enable-gprofiler whether or not to enable gprofiler tools (if available) 1466 1462 --enable-demangler whether or not to build the demangler (executable and library) … … 3184 3180 3185 3181 DOendif='endif' 3186 3187 3188 3189 #==============================================================================3190 # distcc support3191 3192 # Check whether --enable-distcc was given.3193 if test "${enable_distcc+set}" = set; then :3194 enableval=$enable_distcc; enable_distcc=$enableval3195 else3196 enable_distcc=no3197 fi3198 3199 3200 if test x$enable_distcc = xyes; then3201 ENABLE_DISTCC_TRUE=3202 ENABLE_DISTCC_FALSE='#'3203 else3204 ENABLE_DISTCC_TRUE='#'3205 ENABLE_DISTCC_FALSE=3206 fi3207 3208 3209 if test x$enable_distcc = xyes; then3210 CXX="distcc ${CXX}"3211 LD="distcc ${LD} -lstdc++"3212 echo "Enabling distributed builds"3213 fi3214 3215 3182 3216 3183 … … 17050 17017 fi 17051 17018 17052 if test -z "${ENABLE_DISTCC_TRUE}" && test -z "${ENABLE_DISTCC_FALSE}"; then17053 as_fn_error $? "conditional \"ENABLE_DISTCC\" was never defined.17054 Usually this means the macro was only invoked conditionally." "$LINENO" 517055 fi17056 17019 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 17057 17020 as_fn_error $? "conditional \"AMDEP\" was never defined. -
configure.ac
ref46abb r4f5a8a2 56 56 AC_SUBST([DOendif]) 57 57 AM_SUBST_NOTMAKE([DOendif]) 58 59 #==============================================================================60 # distcc support61 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; then69 CXX="distcc ${CXX}"70 LD="distcc ${LD} -lstdc++"71 echo "Enabling distributed builds"72 fi73 74 AC_SUBST(CXX)75 AC_SUBST(LD)76 58 77 59 #============================================================================== -
driver/cfa.cc
ref46abb r4f5a8a2 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 }82 78 83 79 … … 116 112 bool m64 = false; // -m64 flag 117 113 bool intree = false; 118 bool disttree = false;119 114 120 115 const char *args[argc + 100]; // cfa command line values, plus some space for additional flags … … 133 128 134 129 // process command-line arguments 135 136 args[nargs] = "-x"; // turn off language137 nargs += 1;138 args[nargs] = "c";139 nargs += 1;140 130 141 131 for ( int i = 1; i < argc; i += 1 ) { … … 181 171 } else if ( arg == "-in-tree" ) { 182 172 intree = true; 183 } else if ( arg == "-dist-tree" ) {184 disttree = true;185 173 } else if ( arg == "-compiler" ) { 186 174 // use the user specified compiler … … 392 380 string libdir = libbase + arch + "-" + config; 393 381 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 } 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(); 419 395 nargs += 1; 420 396 … … 505 481 506 482 if ( Bprefix.length() == 0 ) { 507 if(disttree) { 508 Bprefix = dir(argv[0]); 509 } else if(intree) { 510 Bprefix = srcdriverdir; 511 } else { 512 Bprefix = installlibdir; 513 } 514 483 Bprefix = ! intree ? installlibdir : srcdriverdir; 515 484 if ( Bprefix[Bprefix.length() - 1] != '/' ) Bprefix += '/'; 516 485 args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str(); … … 570 539 if ( ! quiet ) { 571 540 cerr << "CFA " << "Version " << Version << heading << endl; 541 572 542 if ( help ) { 573 543 cerr << -
libcfa/Makefile.in
ref46abb r4f5a8a2 231 231 CFACC = @CFACC@ 232 232 CFACPP = @CFACPP@ 233 CFADIR_HASH = @CFADIR_HASH@234 233 CFA_BINDIR = @CFA_BINDIR@ 235 234 CFA_INCDIR = @CFA_INCDIR@ … … 275 274 LIPO = @LIPO@ 276 275 LN_S = @LN_S@ 277 LOCAL_CFACC = @LOCAL_CFACC@278 276 LTLIBOBJS = @LTLIBOBJS@ 279 277 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ … … 295 293 PACKAGE_VERSION = @PACKAGE_VERSION@ 296 294 PATH_SEPARATOR = @PATH_SEPARATOR@ 297 PRELUDEFLAG = @PRELUDEFLAG@298 295 RANLIB = @RANLIB@ 299 296 SED = @SED@ -
libcfa/configure
ref46abb r4f5a8a2 707 707 CONFIG_CFLAGS 708 708 ARCH_FLAGS 709 PRELUDEFLAG710 CFADIR_HASH711 LOCAL_CFACC712 709 CFACPP 713 710 CFACC 714 ENABLE_DISTCC_FALSE715 ENABLE_DISTCC_TRUE716 711 CFA_VERSION 717 712 DRIVER_DIR … … 788 783 enable_option_checking 789 784 enable_silent_rules 790 enable_distcc791 785 with_cfa_name 792 786 enable_shared … … 1451 1445 --enable-silent-rules less verbose build output (undo: "make V=1") 1452 1446 --disable-silent-rules verbose build output (undo: "make V=0") 1453 --enable-distcc whether or not to enable distributed compilation1454 1447 --enable-shared[=PKGS] build shared libraries [default=yes] 1455 1448 --enable-static[=PKGS] build static libraries [default=yes] … … 2948 2941 2949 2942 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 2943 CFACC=${DRIVER_DIR}cfa 2971 2944 CFACPP=${DRIVER_DIR}cfa-cpp 2972 LOCAL_CFACC=${DRIVER_DIR}cfa2973 2974 if test x$enable_distcc = xyes; then2975 ENABLE_DISTCC_TRUE=2976 ENABLE_DISTCC_FALSE='#'2977 else2978 ENABLE_DISTCC_TRUE='#'2979 ENABLE_DISTCC_FALSE=2980 fi2981 2982 2983 2984 2985 2986 2945 2987 2946 … … 17023 16982 fi 17024 16983 17025 if test -z "${ENABLE_DISTCC_TRUE}" && test -z "${ENABLE_DISTCC_FALSE}"; then17026 as_fn_error $? "conditional \"ENABLE_DISTCC\" was never defined.17027 Usually this means the macro was only invoked conditionally." "$LINENO" 517028 fi17029 16984 if test -z "${BUILDLIB_TRUE}" && test -z "${BUILDLIB_FALSE}"; then 17030 16985 as_fn_error $? "conditional \"BUILDLIB\" was never defined. -
libcfa/configure.ac
ref46abb r4f5a8a2 27 27 AC_ARG_VAR(CFA_VERSION, [The long version of cfa]) 28 28 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 29 CFACC=${DRIVER_DIR}cfa 46 30 CFACPP=${DRIVER_DIR}cfa-cpp 47 LOCAL_CFACC=${DRIVER_DIR}cfa48 49 AM_CONDITIONAL([ENABLE_DISTCC], [test x$enable_distcc = xyes])50 51 31 AC_SUBST(CFACC) 52 32 AC_SUBST(CFACPP) 53 AC_SUBST(LOCAL_CFACC)54 AC_SUBST(CFADIR_HASH)55 33 AC_SUBST(CFA_VERSION) 56 AC_SUBST(PRELUDEFLAG)57 34 58 35 #============================================================================== -
libcfa/prelude/Makefile.am
ref46abb r4f5a8a2 23 23 cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c 24 24 25 CC = @ LOCAL_CFACC@25 CC = @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 @LOCAL_CFACC@56 builtins.cf : builtins.c ${CC} 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_DISTCC72 distribution: @LOCAL_CFACC@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh73 ${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 distribution77 endif ENABLE_DISTCC -
libcfa/prelude/Makefile.in
ref46abb r4f5a8a2 167 167 AUTOMAKE = @AUTOMAKE@ 168 168 AWK = @AWK@ 169 CC = @ LOCAL_CFACC@169 CC = @CFACC@ 170 170 CCAS = @CCAS@ 171 171 CCASDEPMODE = @CCASDEPMODE@ … … 174 174 CFACC = @CFACC@ 175 175 CFACPP = @CFACPP@ 176 CFADIR_HASH = @CFADIR_HASH@177 176 CFA_BINDIR = @CFA_BINDIR@ 178 177 CFA_INCDIR = @CFA_INCDIR@ … … 218 217 LIPO = @LIPO@ 219 218 LN_S = @LN_S@ 220 LOCAL_CFACC = @LOCAL_CFACC@221 219 LTLIBOBJS = @LTLIBOBJS@ 222 220 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ … … 238 236 PACKAGE_VERSION = @PACKAGE_VERSION@ 239 237 PATH_SEPARATOR = @PATH_SEPARATOR@ 240 PRELUDEFLAG = @PRELUDEFLAG@241 238 RANLIB = @RANLIB@ 242 239 SED = @SED@ … … 558 555 559 556 # create forward declarations for cfa builtins 560 builtins.cf : builtins.c @LOCAL_CFACC@557 builtins.cf : builtins.c ${CC} 561 558 ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po -D__cforall 562 559 ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po … … 569 566 maintainer-clean-local : 570 567 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.sh573 @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 distribution577 568 578 569 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
libcfa/src/Makefile.am
ref46abb r4f5a8a2 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 @PRELUDEFLAG@-I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@32 AM_CFAFLAGS = -quiet -in-tree -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) : @ LOCAL_CFACC@ @CFACPP@ prelude.cfa64 $(libobjs) : @CFACC@ @CFACPP@ prelude.cfa 65 65 66 66 thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc)))) 67 $(thread_libobjs) : @ LOCAL_CFACC@ @CFACPP@ prelude.cfa67 $(thread_libobjs) : @CFACC@ @CFACPP@ prelude.cfa 68 68 69 69 … … 84 84 85 85 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 ${@}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 ${@} 88 88 89 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @ LOCAL_CFACC@ @CFACPP@89 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@ 90 90 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 91 $(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}91 $(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@} 92 92 93 93 -
libcfa/src/Makefile.in
ref46abb r4f5a8a2 284 284 CFACC = @CFACC@ 285 285 CFACPP = @CFACPP@ 286 CFADIR_HASH = @CFADIR_HASH@287 286 CFA_BINDIR = @CFA_BINDIR@ 288 287 CFA_INCDIR = @CFA_INCDIR@ … … 328 327 LIPO = @LIPO@ 329 328 LN_S = @LN_S@ 330 LOCAL_CFACC = @LOCAL_CFACC@331 329 LTLIBOBJS = @LTLIBOBJS@ 332 330 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ … … 348 346 PACKAGE_VERSION = @PACKAGE_VERSION@ 349 347 PATH_SEPARATOR = @PATH_SEPARATOR@ 350 PRELUDEFLAG = @PRELUDEFLAG@351 348 RANLIB = @RANLIB@ 352 349 SED = @SED@ … … 443 440 # use -no-include-stdhdr to prevent rebuild cycles 444 441 # The built sources must not depend on the installed headers 445 AM_CFAFLAGS = -quiet @PRELUDEFLAG@-I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@442 AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@ 446 443 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 447 444 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ … … 939 936 $(LTCFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 940 937 $(am__mv) $$depbase.Tpo $$depbase.Plo 941 $(libobjs) : @ LOCAL_CFACC@ @CFACPP@ prelude.cfa942 $(thread_libobjs) : @ LOCAL_CFACC@ @CFACPP@ prelude.cfa938 $(libobjs) : @CFACC@ @CFACPP@ prelude.cfa 939 $(thread_libobjs) : @CFACC@ @CFACPP@ prelude.cfa 943 940 944 941 -include $(libdeps) … … 946 943 -include $(thread_libdeps) 947 944 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@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@ 952 949 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 953 $(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}950 $(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@} 954 951 955 952 #----------------------------------------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.