Changes in / [c2051e10:216597d]


Ignore:
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    rc2051e10 r216597d  
    294294FGREP = @FGREP@
    295295GREP = @GREP@
    296 HAS_DISTCC = @HAS_DISTCC@
    297296HOST_FLAGS = @HOST_FLAGS@
    298297INSTALL = @INSTALL@
  • benchmark/Makefile.in

    rc2051e10 r216597d  
    244244FGREP = @FGREP@
    245245GREP = @GREP@
    246 HAS_DISTCC = @HAS_DISTCC@
    247246HOST_FLAGS = @HOST_FLAGS@
    248247INSTALL = @INSTALL@
  • configure

    rc2051e10 r216597d  
    663663ac_ct_DUMPBIN
    664664DUMPBIN
     665LD
    665666FGREP
    666667EGREP
     
    700701LDFLAGS
    701702CXXFLAGS
     703CXX
    702704CFA_FLAGS
    703705LIBCFA_TARGET_MAKEFILES
     
    721723CFA_INCDIR
    722724CFA_PREFIX
    723 HAS_DISTCC
    724 LD
    725 CXX
    726 ENABLE_DISTCC_FALSE
    727 ENABLE_DISTCC_TRUE
    728725DOendif
    729726DOifskipcompile
     
    800797enable_silent_rules
    801798with_cfa_name
    802 enable_distcc
    803799with_target_hosts
    804800enable_gprofiler
     
    14631459  --enable-silent-rules   less verbose build output (undo: "make V=1")
    14641460  --disable-silent-rules  verbose build output (undo: "make V=0")
    1465   --enable-distcc     whether or not to enable distributed compilation
    14661461  --enable-gprofiler     whether or not to enable gprofiler tools (if available)
    14671462  --enable-demangler     whether or not to build the demangler (executable and library)
     
    31853180
    31863181DOendif='endif'
    3187 
    3188 
    3189 
    3190 #==============================================================================
    3191 # distcc support
    3192 
    3193 # Check whether --enable-distcc was given.
    3194 if test "${enable_distcc+set}" = set; then :
    3195   enableval=$enable_distcc; enable_distcc=$enableval
    3196 else
    3197   enable_distcc=no
    3198 fi
    3199 
    3200 
    3201  if test x$enable_distcc = xyes; then
    3202   ENABLE_DISTCC_TRUE=
    3203   ENABLE_DISTCC_FALSE='#'
    3204 else
    3205   ENABLE_DISTCC_TRUE='#'
    3206   ENABLE_DISTCC_FALSE=
    3207 fi
    3208 
    3209 HAS_DISTCC="False"
    3210 
    3211 if test x$enable_distcc = xyes; then
    3212         CXX="distcc ${CXX}"
    3213         LD="distcc ${LD} -lstdc++"
    3214         HAS_DISTCC="True"
    3215         echo "Enabling distributed builds"
    3216 fi
    3217 
    3218 
    32193182
    32203183
     
    1705417017fi
    1705517018
    17056 if test -z "${ENABLE_DISTCC_TRUE}" && test -z "${ENABLE_DISTCC_FALSE}"; then
    17057   as_fn_error $? "conditional \"ENABLE_DISTCC\" was never defined.
    17058 Usually this means the macro was only invoked conditionally." "$LINENO" 5
    17059 fi
    1706017019if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
    1706117020  as_fn_error $? "conditional \"AMDEP\" was never defined.
  • configure.ac

    rc2051e10 r216597d  
    5656AC_SUBST([DOendif])
    5757AM_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 HAS_DISTCC="False"
    68 
    69 if test x$enable_distcc = xyes; then
    70         CXX="distcc ${CXX}"
    71         LD="distcc ${LD} -lstdc++"
    72         HAS_DISTCC="True"
    73         echo "Enabling distributed builds"
    74 fi
    75 
    76 AC_SUBST(CXX)
    77 AC_SUBST(LD)
    78 AC_SUBST(HAS_DISTCC)
    7958
    8059#==============================================================================
  • driver/Makefile.in

    rc2051e10 r216597d  
    231231FGREP = @FGREP@
    232232GREP = @GREP@
    233 HAS_DISTCC = @HAS_DISTCC@
    234233HOST_FLAGS = @HOST_FLAGS@
    235234INSTALL = @INSTALL@
  • driver/cfa.cc

    rc2051e10 r216597d  
    3535//#define __DEBUG_H__
    3636
     37
    3738static string __CFA_FLAGPREFIX__( "__CFA_FLAG" );               // "N__=" suffix
    3839
    3940void Putenv( char * argv[], string arg ) {
    40         // environment variables must have unique names
    41         static int flags = 0;
     41        static int flags = 0;                                                           // environment variables must have unique names
    4242
    4343        if ( putenv( (char *)( *new string( string( __CFA_FLAGPREFIX__ + to_string( flags++ ) + "__=" ) + arg ) ).c_str() ) ) {
     
    4747} // Putenv
    4848
    49 // check if string has prefix
    50 bool prefix( const string & arg, const string & pre ) {
     49
     50bool prefix( const string & arg, const string & pre ) { // check if string has prefix
    5151        return arg.substr( 0, pre.size() ) == pre;
    5252} // prefix
    53 
    54 inline bool ends_with(const string & str, const string & sfix) {
    55         if (sfix.size() > str.size()) return false;
    56         return std::equal(str.rbegin(), str.rbegin() + sfix.size(), sfix.rbegin(), sfix.rend());
    57 }
    5853
    5954bool suffix( const string & arg ) {                                             // check if string has suffix
     
    7368        return (info.st_mode & S_IFDIR) != 0;
    7469} // dirExists
    75 
    76 static inline string dir(const string & path) {
    77         return path.substr(0, path.find_last_of('/'));
    78 }
    7970
    8071
     
    114105        bool m64 = false;                                                                       // -m64 flag
    115106        bool intree = false;                                                            // build in tree
    116         bool compiling_libs = false;
    117         bool disttree = false;
    118107        int o_file = 0;                                                                         // -o filename position
    119108
     
    173162                        } else if ( arg == "-in-tree" ) {
    174163                                intree = true;
    175                         } else if ( arg == "-dist-tree" ) {
    176                                 disttree = true;
    177                         } else if ( arg == "-cfalib") {
    178                                 compiling_libs = true;
    179164                        } else if ( arg == "-compiler" ) {
    180165                                // use the user specified compiler
     
    308293        } else {
    309294                libbase = TOP_BUILDDIR "libcfa/";
    310         } // if
    311 
    312         if( compiling_libs ) {
    313295                Putenv( argv, "-t" );
    314296        } // if
     
    323305        } // if
    324306
    325         const char * config = nolib ? "nolib" : (debug ? "debug": "nodebug");
    326         string libdir = libbase + arch + "-" + config;
    327 
    328         if (!disttree) {
    329                 if ( ! nolib && ! dirExists( libdir ) ) {
    330                         cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl;
    331                         cerr << "Was looking for " << libdir << endl;
    332                         for(int i = 1; i < argc; i++) {
    333                                 cerr << argv[i] << " ";
    334                         }
    335                         cerr << endl;
    336                         libdir = libbase + arch + "-" + "nolib";
    337                 } // if
    338 
    339                 if ( ! dirExists( libdir ) ) {
    340                         cerr << argv[0] << " internal error, cannot find prelude directory." << endl;
    341                         cerr << "Was looking for " << libdir << endl;
    342                         exit( EXIT_FAILURE );
    343                 } // if
    344         } // if
    345 
    346         if(disttree) {
    347                 Putenv( argv, "--prelude-dir=" + dir(argv[0])) );
    348         } else if(intree) {
    349                 Putenv( argv, "--prelude-dir=" + libdir + "/prelude") );
    350         } else {
    351                 Putenv( argv, "--prelude-dir=" + libdir) );
    352         }
    353         nargs += 1;
     307        string libdir( libbase + arch + "-" + (nolib ? "nolib" : (debug ? "debug": "nodebug")) );
     308        if ( ! dirExists( libdir ) ) {
     309                cerr << argv[0] << " internal error, cannot find prelude directory " << libdir << endl;
     310                exit( EXIT_FAILURE );
     311        } // if
     312
    354313        for ( int i = 0; i < nlibs; i += 1 ) {                          // copy non-user libraries after all user libraries
    355314                args[nargs++] = libs[i];
     
    412371
    413372        if ( bprefix.length() == 0 ) {
    414                 if(disttree) {
    415                         bprefix = dir(argv[0]);
    416                 } else if(intree) {
    417                         bprefix = srcdriverdir;
    418                 } else {
    419                         bprefix = installlibdir;
    420                 }
     373                bprefix = ! intree ? installlibdir : srcdriverdir;
    421374                if ( bprefix[bprefix.length() - 1] != '/' ) bprefix += '/';
    422375                Putenv( argv, ( *new string( string("-B=") + bprefix ) ).c_str() );
     
    462415                cerr << " \"" << args[i] << "\"" << endl;
    463416        } // for
    464         cerr << endl;
    465417        #endif // __DEBUG_H__
    466418
    467419        if ( ! quiet ) {
    468420                cerr << "CFA " << "Version " << Version << heading << endl;
     421
    469422                if ( help ) {
    470423                        cerr <<
  • libcfa/Makefile.in

    rc2051e10 r216597d  
    231231CFACC = @CFACC@
    232232CFACPP = @CFACPP@
    233 CFADIR_HASH = @CFADIR_HASH@
    234233CFA_BINDIR = @CFA_BINDIR@
    235234CFA_INCDIR = @CFA_INCDIR@
     
    275274LIPO = @LIPO@
    276275LN_S = @LN_S@
    277 LOCAL_CFACC = @LOCAL_CFACC@
    278276LTLIBOBJS = @LTLIBOBJS@
    279277LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
     
    295293PACKAGE_VERSION = @PACKAGE_VERSION@
    296294PATH_SEPARATOR = @PATH_SEPARATOR@
    297 PRELUDEFLAG = @PRELUDEFLAG@
    298295RANLIB = @RANLIB@
    299296SED = @SED@
  • libcfa/configure

    rc2051e10 r216597d  
    707707CONFIG_CFLAGS
    708708ARCH_FLAGS
    709 PRELUDEFLAG
    710 CFADIR_HASH
    711 LOCAL_CFACC
    712709CFACPP
    713710CFACC
    714 ENABLE_DISTCC_FALSE
    715 ENABLE_DISTCC_TRUE
    716711CFA_VERSION
    717712DRIVER_DIR
     
    788783enable_option_checking
    789784enable_silent_rules
    790 enable_distcc
    791785with_cfa_name
    792786enable_shared
     
    14511445  --enable-silent-rules   less verbose build output (undo: "make V=1")
    14521446  --disable-silent-rules  verbose build output (undo: "make V=0")
    1453   --enable-distcc     whether or not to enable distributed compilation
    14541447  --enable-shared[=PKGS]  build shared libraries [default=yes]
    14551448  --enable-static[=PKGS]  build static libraries [default=yes]
     
    29482941
    29492942
    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         tools="$(readlink -m $ac_confdir/)/../tools/build"
    2965         config=$(basename $(readlink -f .))
    2966         echo "$tools/distcc_hash $config"
    2967         CFADIR_HASH=$($tools/distcc_hash $config)
    2968         CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa"
    2969         PRELUDEFLAG='-dist-tree'
    2970         echo "yes (hash=${CFADIR_HASH})"
    2971 fi
     2943CFACC=${DRIVER_DIR}cfa
    29722944CFACPP=${DRIVER_DIR}cfa-cpp
    2973 LOCAL_CFACC=${DRIVER_DIR}cfa
    2974 
    2975  if test x$enable_distcc = xyes; then
    2976   ENABLE_DISTCC_TRUE=
    2977   ENABLE_DISTCC_FALSE='#'
    2978 else
    2979   ENABLE_DISTCC_TRUE='#'
    2980   ENABLE_DISTCC_FALSE=
    2981 fi
    2982 
    2983 
    2984 
    2985 
    2986 
    29872945
    29882946
     
    1702416982fi
    1702516983
    17026 if test -z "${ENABLE_DISTCC_TRUE}" && test -z "${ENABLE_DISTCC_FALSE}"; then
    17027   as_fn_error $? "conditional \"ENABLE_DISTCC\" was never defined.
    17028 Usually this means the macro was only invoked conditionally." "$LINENO" 5
    17029 fi
    1703016984if test -z "${BUILDLIB_TRUE}" && test -z "${BUILDLIB_FALSE}"; then
    1703116985  as_fn_error $? "conditional \"BUILDLIB\" was never defined.
  • libcfa/configure.ac

    rc2051e10 r216597d  
    2727AC_ARG_VAR(CFA_VERSION, [The long version of cfa])
    2828
    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         tools="$(readlink -m $ac_confdir/)/../tools/build"
    40         config=$(basename $(readlink -f .))
    41         echo "$tools/distcc_hash $config"
    42         CFADIR_HASH=$($tools/distcc_hash $config)
    43         CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa"
    44         PRELUDEFLAG='-dist-tree'
    45         echo "yes (hash=${CFADIR_HASH})"
    46 fi
     29CFACC=${DRIVER_DIR}cfa
    4730CFACPP=${DRIVER_DIR}cfa-cpp
    48 LOCAL_CFACC=${DRIVER_DIR}cfa
    49 
    50 AM_CONDITIONAL([ENABLE_DISTCC], [test x$enable_distcc = xyes])
    51 
    5231AC_SUBST(CFACC)
    5332AC_SUBST(CFACPP)
    54 AC_SUBST(LOCAL_CFACC)
    55 AC_SUBST(CFADIR_HASH)
    5633AC_SUBST(CFA_VERSION)
    57 AC_SUBST(PRELUDEFLAG)
    5834
    5935#==============================================================================
  • libcfa/prelude/Makefile.am

    rc2051e10 r216597d  
    2323cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c
    2424
    25 CC = @LOCAL_CFACC@
     25CC = @CFACC@
    2626AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    2727AM_CFAFLAGS = @CONFIG_CFAFLAGS@
     
    5454
    5555# create forward declarations for cfa builtins
    56 builtins.cf : builtins.c @LOCAL_CFACC@
     56builtins.cf : builtins.c ${CC}
    5757        ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po -D__cforall
    5858        ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po
     
    6868MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cfa
    6969MAINTAINERCLEANFILES = ${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

    rc2051e10 r216597d  
    167167AUTOMAKE = @AUTOMAKE@
    168168AWK = @AWK@
    169 CC = @LOCAL_CFACC@
     169CC = @CFACC@
    170170CCAS = @CCAS@
    171171CCASDEPMODE = @CCASDEPMODE@
     
    174174CFACC = @CFACC@
    175175CFACPP = @CFACPP@
    176 CFADIR_HASH = @CFADIR_HASH@
    177176CFA_BINDIR = @CFA_BINDIR@
    178177CFA_INCDIR = @CFA_INCDIR@
     
    218217LIPO = @LIPO@
    219218LN_S = @LN_S@
    220 LOCAL_CFACC = @LOCAL_CFACC@
    221219LTLIBOBJS = @LTLIBOBJS@
    222220LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
     
    238236PACKAGE_VERSION = @PACKAGE_VERSION@
    239237PATH_SEPARATOR = @PATH_SEPARATOR@
    240 PRELUDEFLAG = @PRELUDEFLAG@
    241238RANLIB = @RANLIB@
    242239SED = @SED@
     
    558555
    559556# create forward declarations for cfa builtins
    560 builtins.cf : builtins.c @LOCAL_CFACC@
     557builtins.cf : builtins.c ${CC}
    561558        ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po -D__cforall
    562559        ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po
     
    569566maintainer-clean-local :
    570567        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
    577568
    578569# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • libcfa/src/Makefile.am

    rc2051e10 r216597d  
    3232# use -no-include-stdhdr to prevent rebuild cycles
    3333# The built sources must not depend on the installed headers
    34 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
     34AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
    3535AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3636AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     
    6464# add dependency of cfa files
    6565libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
    66 $(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
     66$(libobjs) : @CFACC@ @CFACPP@ prelude.cfa
    6767
    6868thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
    69 $(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
     69$(thread_libobjs) : @CFACC@ @CFACPP@ prelude.cfa
    7070
    7171
     
    8686
    8787
    88 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
    89         ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@}
     88prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
     89        ${AM_V_GEN}$(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@}
    9090
    91 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
     91prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
    9292        ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
    93         $(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@}
     93        $(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@}
    9494
    9595
  • libcfa/src/Makefile.in

    rc2051e10 r216597d  
    284284CFACC = @CFACC@
    285285CFACPP = @CFACPP@
    286 CFADIR_HASH = @CFADIR_HASH@
    287286CFA_BINDIR = @CFA_BINDIR@
    288287CFA_INCDIR = @CFA_INCDIR@
     
    328327LIPO = @LIPO@
    329328LN_S = @LN_S@
    330 LOCAL_CFACC = @LOCAL_CFACC@
    331329LTLIBOBJS = @LTLIBOBJS@
    332330LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
     
    348346PACKAGE_VERSION = @PACKAGE_VERSION@
    349347PATH_SEPARATOR = @PATH_SEPARATOR@
    350 PRELUDEFLAG = @PRELUDEFLAG@
    351348RANLIB = @RANLIB@
    352349SED = @SED@
     
    444441# use -no-include-stdhdr to prevent rebuild cycles
    445442# The built sources must not depend on the installed headers
    446 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
     443AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
    447444AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    448445AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     
    940937        $(LTCFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
    941938        $(am__mv) $$depbase.Tpo $$depbase.Plo
    942 $(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
    943 $(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
     939$(libobjs) : @CFACC@ @CFACPP@ prelude.cfa
     940$(thread_libobjs) : @CFACC@ @CFACPP@ prelude.cfa
    944941
    945942-include $(libdeps)
     
    947944-include $(thread_libdeps)
    948945
    949 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
    950         ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@}
    951 
    952 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
     946prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
     947        ${AM_V_GEN}$(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@}
     948
     949prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
    953950        ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
    954         $(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@}
     951        $(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@}
    955952
    956953#----------------------------------------------------------------------------------------------------------------
  • longrun_tests/Makefile.in

    rc2051e10 r216597d  
    378378FGREP = @FGREP@
    379379GREP = @GREP@
    380 HAS_DISTCC = @HAS_DISTCC@
    381380HOST_FLAGS = @HOST_FLAGS@
    382381INSTALL = @INSTALL@
  • src/Makefile.in

    rc2051e10 r216597d  
    441441FGREP = @FGREP@
    442442GREP = @GREP@
    443 HAS_DISTCC = @HAS_DISTCC@
    444443HOST_FLAGS = @HOST_FLAGS@
    445444INSTALL = @INSTALL@
  • tests/Makefile.am

    rc2051e10 r216597d  
    3535
    3636# applies to both programs
    37 # since automake doesn't have support for CFA we have to
    3837AM_CFLAGS = $(if $(test), 2> $(test), ) \
    3938        -g \
     
    4342        -DIN_DIR="${abs_srcdir}/.in/"
    4443
    45 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
    46 CFACCBIN = @CFACC@
    47 CFACC = $(CC)
     44AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
     45CC = @CFACC@
    4846
    4947PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
     
    5957#----------------------------------------------------------------------------------------------------------------
    6058all-local :
    61         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
     59        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    6260
    6361all-tests :
    64         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     62        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    6563
    6664clean-local :
     
    8987
    9088# Use for all tests, make sure the path are correct and all flags are added
    91 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) -c $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
     89CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
    9290
    93 # Use for tests that either generate an executable, print directly to stdout or the make command is expected to fail
     91# Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail
    9492CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@})
    9593
     
    10098
    10199# implicit rule so not all test require a rule
    102 % : %.cfa $(CFACCBIN)
    103         $(CFACOMPILETEST) -o $(abspath ${@}).o
    104         $(CFACC) $(abspath ${@}).o -o $(abspath ${@})
    105 
     100% : %.cfa $(CFACC)
     101        $(CFATEST_STDOUT)
    106102
    107103% : %.cpp
     
    127123# CUSTOM TARGET
    128124#------------------------------------------------------------------------------
    129 typedefRedef-ERR1: typedefRedef.cfa $(CFACCBIN)
     125typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
    130126        $(CFATEST_STDOUT) -DERR1
    131127
    132 alloc-ERROR: alloc.cfa $(CFACCBIN)
     128alloc-ERROR: alloc.cfa $(CFACC)
    133129        $(CFATEST_STDOUT) -DERR1
    134130
    135 nested-types-ERR1: nested-types.cfa $(CFACCBIN)
     131nested-types-ERR1: nested-types.cfa $(CFACC)
    136132        $(CFATEST_STDOUT) -DERR1
    137133
    138 nested-types-ERR2: nested-types.cfa $(CFACCBIN)
     134nested-types-ERR2: nested-types.cfa $(CFACC)
    139135        $(CFATEST_STDOUT) -DERR2
    140136
    141 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACCBIN)
     137raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
    142138        $(CFATEST_STDOUT) -DERR1
    143139
    144 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACCBIN)
     140raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
    145141        $(CFATEST_STDOUT) -DERR2
    146142
    147 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACCBIN)
     143raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
    148144        $(CFATEST_STDOUT) -DERR1
    149145
    150 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACCBIN)
     146raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
    151147        $(CFATEST_STDOUT) -DERR1
    152148
    153149#builtins
    154 builtins/sync: builtins/sync.cfa $(CFACCBIN)
     150builtins/sync: builtins/sync.cfa $(CFACC)
    155151        $(CFATEST_STDERR) -fsyntax-only
    156152
    157153# Warnings
    158 warnings/self-assignment: warnings/self-assignment.cfa $(CFACCBIN)
     154warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
    159155        $(CFATEST_STDERR) -fsyntax-only
  • tests/Makefile.in

    rc2051e10 r216597d  
    212212AWK = @AWK@
    213213BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
    214 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
     214CC = @CFACC@
    215215CCAS = @CCAS@
    216216CCASDEPMODE = @CCASDEPMODE@
    217217CCASFLAGS = @CCASFLAGS@
    218218CCDEPMODE = @CCDEPMODE@
    219 CFACC = $(CC)
     219CFACC = @CFACC@
    220220CFACPP = @CFACPP@
    221221CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    248248FGREP = @FGREP@
    249249GREP = @GREP@
    250 HAS_DISTCC = @HAS_DISTCC@
    251250HOST_FLAGS = @HOST_FLAGS@
    252251INSTALL = @INSTALL@
     
    387386
    388387# applies to both programs
    389 # since automake doesn't have support for CFA we have to
    390 AM_CFLAGS = $(if $(test), 2> $(test), ) \
    391         -g \
    392         -Wall \
    393         -Wno-unused-function \
    394         -quiet @CFA_FLAGS@ \
    395         -DIN_DIR="${abs_srcdir}/.in/"
    396 
    397 CFACCBIN = @CFACC@
     388AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \
     389        -quiet @CFA_FLAGS@ -DIN_DIR="${abs_srcdir}/.in/" \
     390        ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
    398391PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    399392avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa
     
    404397
    405398# Use for all tests, make sure the path are correct and all flags are added
    406 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) -c $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
    407 
    408 # Use for tests that either generate an executable, print directly to stdout or the make command is expected to fail
     399CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
     400
     401# Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail
    409402CFATEST_STDOUT = $(CFACOMPILETEST) -o $(abspath ${@})
    410403
     
    778771#----------------------------------------------------------------------------------------------------------------
    779772all-local :
    780         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
     773        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    781774
    782775all-tests :
    783         @+${TEST_PY} --debug=${debug} --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     776        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    784777
    785778clean-local :
     
    808801
    809802# implicit rule so not all test require a rule
    810 % : %.cfa $(CFACCBIN)
    811         $(CFACOMPILETEST) -o $(abspath ${@}).o
    812         $(CFACC) $(abspath ${@}).o -o $(abspath ${@})
     803% : %.cfa $(CFACC)
     804        $(CFATEST_STDOUT)
    813805
    814806% : %.cpp
     
    818810# CUSTOM TARGET
    819811#------------------------------------------------------------------------------
    820 typedefRedef-ERR1: typedefRedef.cfa $(CFACCBIN)
     812typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
    821813        $(CFATEST_STDOUT) -DERR1
    822814
    823 alloc-ERROR: alloc.cfa $(CFACCBIN)
     815alloc-ERROR: alloc.cfa $(CFACC)
    824816        $(CFATEST_STDOUT) -DERR1
    825817
    826 nested-types-ERR1: nested-types.cfa $(CFACCBIN)
     818nested-types-ERR1: nested-types.cfa $(CFACC)
    827819        $(CFATEST_STDOUT) -DERR1
    828820
    829 nested-types-ERR2: nested-types.cfa $(CFACCBIN)
     821nested-types-ERR2: nested-types.cfa $(CFACC)
    830822        $(CFATEST_STDOUT) -DERR2
    831823
    832 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACCBIN)
     824raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
    833825        $(CFATEST_STDOUT) -DERR1
    834826
    835 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACCBIN)
     827raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
    836828        $(CFATEST_STDOUT) -DERR2
    837829
    838 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACCBIN)
     830raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
    839831        $(CFATEST_STDOUT) -DERR1
    840832
    841 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACCBIN)
     833raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
    842834        $(CFATEST_STDOUT) -DERR1
    843835
    844836#builtins
    845 builtins/sync: builtins/sync.cfa $(CFACCBIN)
     837builtins/sync: builtins/sync.cfa $(CFACC)
    846838        $(CFATEST_STDERR) -fsyntax-only
    847839
    848840# Warnings
    849 warnings/self-assignment: warnings/self-assignment.cfa $(CFACCBIN)
     841warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
    850842        $(CFATEST_STDERR) -fsyntax-only
    851843
  • tests/config.py.in

    rc2051e10 r216597d  
    88BUILDDIR = "@abs_builddir@"
    99HOSTARCH = "@host_cpu@"
    10 DISTRIBUTE = @HAS_DISTCC@
  • tests/pybin/settings.py

    rc2051e10 r216597d  
    1414        SRCDIR = os.path.abspath(config.SRCDIR)
    1515        BUILDDIR = os.path.abspath(config.BUILDDIR)
    16         distribute = config.DISTRIBUTE
    1716        os.chdir(testpath)
    1817
     
    8988                self.string = "debug" if value else "no debug"
    9089                self.flags  = """DEBUG_FLAGS=%s""" % ("-debug -O0" if value else "-nodebug -O2")
    91                 self.path   = "debug" if value else "nodebug"
    9290
    9391class Install:
    9492        def __init__(self, value):
    95                 if value:
    96                         distribute = False
    97 
    9893                self.string = "installed" if value else "in-tree"
    9994                self.flags  = """INSTALL_FLAGS=%s""" % ("" if value else "-in-tree")
     
    114109def init( options ):
    115110        global arch
    116         global archive
    117         global debug
    118         global distcc
    119111        global dry_run
    120112        global generating
     113        global make
     114        global debug
    121115        global install
    122         global make
     116        global timeout
    123117        global output_width
    124         global timeout
     118        global archive
    125119
    126         arch         = Architecture(options.arch)
    127         archive      = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None
    128         debug        = Debug(options.debug)
    129         distcc       = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash()
    130120        dry_run      = options.dry_run
    131121        generating   = options.regenerate_expected
     122        make         = ['make']
     123        debug        = Debug(options.debug)
    132124        install      = Install(options.install)
    133         make         = ['make']
     125        arch         = Architecture(options.arch)
     126        timeout      = Timeouts(options.timeout, options.global_timeout)
    134127        output_width = 24
    135         timeout      = Timeouts(options.timeout, options.global_timeout)
     128        archive      = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None
    136129
    137         # if we distribute, distcc errors will fail tests, use log file for distcc
    138         # don't use "'DISTCC_LOG' not in os.environ" because it can be set to ''
    139         if distribute and not os.environ.get('DISTCC_LOG'):
    140                 os.putenv('DISTCC_LOG', os.path.join(BUILDDIR, 'distcc_error.log'))
    141130
    142131def update_make_cmd(force, jobs):
     
    147136def validate():
    148137        errf = os.path.join(BUILDDIR, ".validate.err")
    149         make_ret, out = tools.make( ".validate", error_file = errf, output_file=subprocess.DEVNULL, error=subprocess.DEVNULL )
     138        make_ret, out = tools.make( ".validate", error_file = errf, output=subprocess.DEVNULL, error=subprocess.DEVNULL )
    150139        if make_ret != 0:
    151140                with open (errf, "r") as myfile:
  • tests/pybin/tools.py

    rc2051e10 r216597d  
    2323
    2424# helper functions to run terminal commands
    25 def sh(*cmd, timeout = False, output_file = None, input_file = None, input_text = None, error = subprocess.STDOUT):
     25def sh(*cmd, timeout = False, output = None, input = None, error = subprocess.STDOUT):
    2626        cmd = list(cmd)
    27 
    28         if input_file and input_text:
    29                 return 401, "Cannot use both text and file inputs"
    3027
    3128        # if this is a dry_run, only print the commands that would be ran
    3229        if settings.dry_run :
    3330                cmd = "{} cmd: {}".format(os.getcwd(), ' '.join(cmd))
    34                 if output_file and not isinstance(output_file, int):
     31                if output and not isinstance(output, int):
    3532                        cmd += " > "
    36                         cmd += output_file
     33                        cmd += output
    3734
    3835                if error and not isinstance(error, int):
     
    4037                        cmd += error
    4138
    42                 if input_file and not isinstance(input_file, int) and os.path.isfile(input_file):
     39                if input and not isinstance(input, int) and os.path.isfile(input):
    4340                        cmd += " < "
    44                         cmd += input_file
     41                        cmd += input
    4542
    4643                print(cmd)
     
    4946        with contextlib.ExitStack() as onexit:
    5047                # add input redirection if needed
    51                 input_file = openfd(input_file, 'r', onexit, True)
     48                input = openfd(input, 'r', onexit, True)
    5249
    5350                # add output redirection if needed
    54                 output_file = openfd(output_file, 'w', onexit, False)
     51                output = openfd(output, 'w', onexit, False)
    5552
    5653                # add error redirection if needed
     
    6158                        proc = subprocess.run(
    6259                                cmd,
    63                                 **({'input' : bytes(input_text, encoding='utf-8')} if input_text else {'stdin' : input_file}),
    64                                 stdout  = output_file,
    65                                 stderr  = error,
    66                                 timeout = settings.timeout.single if timeout else None
     60                                stdin =input,
     61                                stdout=output,
     62                                stderr=error,
     63                                timeout=settings.timeout.single if timeout else None
    6764                        )
    68 
    6965                        return proc.returncode, proc.stdout.decode("utf-8") if proc.stdout else None
    7066                except subprocess.TimeoutExpired:
     
    7975                return False
    8076
    81         code, out = sh("file %s" % fname, output_file=subprocess.PIPE)
     77        code, out = sh("file %s" % fname, output=subprocess.PIPE)
    8278        if code != 0:
    8379                return False
     
    111107        if isinstance(files, str ): files = [ files ]
    112108        for file in files:
    113                 sh( 'rm', '-f', file, output_file=subprocess.DEVNULL, error=subprocess.DEVNULL )
     109                sh( 'rm', '-f', file, output=subprocess.DEVNULL, error=subprocess.DEVNULL )
    114110
    115111# Create 1 or more directory
     
    119115                p = os.path.normpath( file )
    120116                d = os.path.dirname ( p )
    121                 sh( 'mkdir', '-p', d, output_file=subprocess.DEVNULL, error=subprocess.DEVNULL )
     117                sh( 'mkdir', '-p', d, output=subprocess.DEVNULL, error=subprocess.DEVNULL )
    122118
    123119
     
    142138                lhs,
    143139                rhs,
    144                 output_file=subprocess.PIPE
     140                output=subprocess.PIPE
    145141        )
    146142
    147143# call make
    148 def make(target, *, flags = '', output_file = None, error = None, error_file = None, silent = False):
     144def make(target, *, flags = '', output = None, error = None, error_file = None, silent = False):
    149145        test_param = """test="%s" """ % (error_file) if error_file else None
    150146        cmd = [
     
    155151                settings.debug.flags,
    156152                settings.install.flags,
    157                 settings.distcc if settings.distribute else None,
    158153                flags,
    159154                target
    160155        ]
    161156        cmd = [s for s in cmd if s]
    162         return sh(*cmd, output_file=output_file, error=error)
     157        return sh(*cmd, output=output, error=error)
    163158
    164159def which(program):
     
    206201# cat one file into the other
    207202def cat(source, dest):
    208         ret, _ = sh("cat", source, output_file=dest)
     203        ret, _ = sh("cat", source, output=dest)
    209204        return ret
    210205
     
    279274################################################################################
    280275
    281 # get hash for given configuration
    282 def config_hash():
    283         path = os.path.normpath(os.path.join(
    284                 settings.SRCDIR,
    285         ))
    286 
    287         distcc_hash = os.path.join(settings.SRCDIR, '../tools/build/distcc_hash')
    288         config = "%s-%s" % (settings.arch.target, settings.debug.path)
    289         _, out = sh(distcc_hash, config, output_file=subprocess.PIPE)
    290         return out.strip()
    291 
    292 # get pretty string for time of day
    293276def pretty_now():
    294277        ts = time.time()
     
    325308                return 1, "ERR No core dump"
    326309
    327         return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output_file=subprocess.PIPE)
     310        return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output=subprocess.PIPE)
    328311
    329312def core_archive(dst, name, exe):
  • tests/test.py

    rc2051e10 r216597d  
    143143        # build, skipping to next test on error
    144144        with Timed() as comp_dur:
    145                 make_ret, _ = make( test.target(), output_file=subprocess.DEVNULL, error=out_file, error_file = err_file )
     145                make_ret, _ = make( test.target(), output=subprocess.DEVNULL, error=out_file, error_file = err_file )
    146146
    147147        run_dur = None
     
    153153                                if settings.dry_run or is_exe(exe_file):
    154154                                        # run test
    155                                         retcode, _ = sh(exe_file, output_file=out_file, input_file=in_file, timeout=True)
     155                                        retcode, _ = sh(exe_file, output=out_file, input=in_file, timeout=True)
    156156                                else :
    157157                                        # simply cat the result into the output
     
    219219def run_tests(tests, jobs) :
    220220        # clean the sandbox from previous commands
    221         make('clean', output_file=subprocess.DEVNULL, error=subprocess.DEVNULL)
     221        make('clean', output=subprocess.DEVNULL, error=subprocess.DEVNULL)
    222222
    223223        # create the executor for our jobs and handle the signal properly
     
    260260
    261261        # clean the workspace
    262         make('clean', output_file=subprocess.DEVNULL, error=subprocess.DEVNULL)
     262        make('clean', output=subprocess.DEVNULL, error=subprocess.DEVNULL)
    263263
    264264        return 1 if failed else 0
  • tools/Makefile.in

    rc2051e10 r216597d  
    238238FGREP = @FGREP@
    239239GREP = @GREP@
    240 HAS_DISTCC = @HAS_DISTCC@
    241240HOST_FLAGS = @HOST_FLAGS@
    242241INSTALL = @INSTALL@
  • tools/prettyprinter/Makefile.in

    rc2051e10 r216597d  
    267267FGREP = @FGREP@
    268268GREP = @GREP@
    269 HAS_DISTCC = @HAS_DISTCC@
    270269HOST_FLAGS = @HOST_FLAGS@
    271270INSTALL = @INSTALL@
Note: See TracChangeset for help on using the changeset viewer.