Changeset 158b026
- Timestamp:
- Sep 20, 2019, 9:21:51 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 679363c
- Parents:
- 34e1494
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified Makefile.in ¶
r34e1494 r158b026 264 264 CCDEPMODE = @CCDEPMODE@ 265 265 CFACC = @CFACC@ 266 CFACC_INSTALL = @CFACC_INSTALL@ 266 267 CFACPP = @CFACPP@ 267 268 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
TabularUnified benchmark/Makefile.in ¶
r34e1494 r158b026 214 214 CCDEPMODE = @CCDEPMODE@ 215 215 CFACC = @CFACC@ 216 CFACC_INSTALL = @CFACC_INSTALL@ 216 217 CFACPP = @CFACPP@ 217 218 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
TabularUnified configure ¶
r34e1494 r158b026 715 715 BUILD_IN_TREE_FLAGS 716 716 CFACPP 717 CFACC_INSTALL 717 718 CFACC 718 719 DRIVER_DIR … … 3303 3304 DRIVER_DIR=${TOP_BUILDDIR}driver/ 3304 3305 CFACC=${DRIVER_DIR}cfa 3306 CFACC_INSTALL=${CFA_BINDIR}${CFA_NAME} 3305 3307 CFACPP=${DRIVER_DIR}cfa-cpp 3308 3306 3309 3307 3310 -
TabularUnified configure.ac ¶
r34e1494 r158b026 93 93 DRIVER_DIR=${TOP_BUILDDIR}driver/ 94 94 CFACC=${DRIVER_DIR}cfa 95 CFACC_INSTALL=${CFA_BINDIR}${CFA_NAME} 95 96 CFACPP=${DRIVER_DIR}cfa-cpp 96 97 AC_SUBST(DRIVER_DIR) 97 98 AC_SUBST(CFACC) 99 AC_SUBST(CFACC_INSTALL) 98 100 AC_SUBST(CFACPP) 99 101 -
TabularUnified driver/Makefile.in ¶
r34e1494 r158b026 201 201 CCDEPMODE = @CCDEPMODE@ 202 202 CFACC = @CFACC@ 203 CFACC_INSTALL = @CFACC_INSTALL@ 203 204 CFACPP = @CFACPP@ 204 205 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
TabularUnified driver/cfa.cc ¶
r34e1494 r158b026 15 15 16 16 #include <iostream> 17 #include <cstdio> // perror 18 #include <cstdlib> // putenv, exit 19 #include <unistd.h> // execvp 20 #include <string> // STL version 21 #include <string.h> // strcmp 22 #include <algorithm> // find 17 #include <cstdio> // perror 18 #include <cstdlib> // putenv, exit 19 #include <climits> // PATH_MAX 20 #include <unistd.h> // execvp 21 #include <string> // STL version 22 #include <string.h> // strcmp 23 #include <algorithm> // find 23 24 24 25 #include <sys/types.h> … … 35 36 // #define __DEBUG_H__ 36 37 37 static string __CFA_FLAGPREFIX__( "__CFA_FLAG" ); // "N__=" suffix 38 // "N__=" suffix 39 static string __CFA_FLAGPREFIX__( "__CFA_FLAG" ); 38 40 39 41 void Putenv( char * argv[], string arg ) { … … 57 59 } 58 60 59 bool suffix( const string & arg ) { // check if string has suffix 61 // check if string has suffix 62 bool suffix( const string & arg ) { 60 63 enum { NumSuffixes = 3 }; 61 64 static const string suffixes[NumSuffixes] = { "cfa", "hfa", "ifa" }; … … 76 79 static inline string dir(const string & path) { 77 80 return path.substr(0, path.find_last_of('/')); 81 } 82 83 // Different path modes 84 enum PathMode { 85 Installed, // cfa is installed, use prefix 86 BuildTree, // cfa is in the tree, use source and build tree 87 Distributed // cfa is distributed, use build tree for includes and executable directory for .cfs 88 }; 89 90 // Get path mode from /proc 91 PathMode FromProc() { 92 std::string abspath; 93 abspath.resize(PATH_MAX); 94 95 // get executable path from /proc/self/exe 96 ssize_t size = readlink("/proc/self/exe", const_cast<char*>(abspath.c_str()), abspath.size()); 97 if(size <= 0) { 98 std::cerr << "Error could not evaluate absolute path from /proc/self/exe" << std::endl; 99 std::cerr << "Failed with " << std::strerror(errno) << std::endl; 100 std::exit(1); 101 } 102 103 // Trim extra characters 104 abspath.resize(size); 105 106 // Are we installed 107 if(abspath.rfind(CFA_BINDIR , 0) == 0) { return Installed; } 108 109 // Is this the build tree 110 if(abspath.rfind(TOP_BUILDDIR, 0) == 0) { return BuildTree; } 111 112 // Does this look like distcc 113 if(abspath.find("/.cfadistcc/") != std::string::npos) { return Distributed; } 114 115 // None of the above? Give up since we don't know where the prelude or include directories are 116 std::cerr << "Cannot find required files from excutable path " << abspath << std::endl; 117 std::exit(1); 78 118 } 79 119 … … 113 153 bool m32 = false; // -m32 flag 114 154 bool m64 = false; // -m64 flag 115 bool intree = false; // build in tree116 155 bool compiling_libs = false; 117 bool disttree = false;118 156 int o_file = 0; // -o filename position 157 158 PathMode path = FromProc(); 119 159 120 160 const char *args[argc + 100]; // cfa command line values, plus some space for additional flags … … 171 211 } else if ( arg == "-no-include-stdhdr" ) { 172 212 noincstd_flag = true; // strip the no-include-stdhdr flag 173 } else if ( arg == "-in-tree" ) {174 intree = true;175 } else if ( arg == "-dist-tree" ) {176 disttree = true;177 213 } else if ( arg == "-cfalib") { 178 214 compiling_libs = true; … … 283 319 284 320 // add the CFA include-library paths, which allow direct access to header files without directory qualification 285 if ( ! intree ) { 321 string libbase; 322 switch(path) { 323 case Installed: 286 324 args[nargs++] = "-I" CFA_INCDIR; 287 if ( ! noincstd_flag ) { // do not use during build 325 // do not use during build 326 if ( ! noincstd_flag ) { 288 327 args[nargs++] = "-I" CFA_INCDIR "stdhdr"; 289 328 } // if 290 329 args[nargs++] = "-I" CFA_INCDIR "concurrency"; 291 330 args[nargs++] = "-I" CFA_INCDIR "containers"; 292 } else { 331 libbase = CFA_LIBDIR; 332 break; 333 case BuildTree: 334 case Distributed: 293 335 args[nargs++] = "-I" TOP_SRCDIR "libcfa/src"; 294 if ( ! noincstd_flag ) { // do not use during build 336 // do not use during build 337 if ( ! noincstd_flag ) { 295 338 args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/stdhdr"; 296 339 } // if 297 340 args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/concurrency"; 298 341 args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/containers"; 342 343 libbase = TOP_BUILDDIR "libcfa/"; 344 345 break; 299 346 } // if 300 347 … … 302 349 args[nargs++] = "-imacros"; 303 350 args[nargs++] = "stdbool.h"; 304 305 string libbase;306 if ( ! intree ) {307 libbase = CFA_LIBDIR;308 } else {309 libbase = TOP_BUILDDIR "libcfa/";310 } // if311 351 312 352 if( compiling_libs ) { … … 326 366 string libdir = libbase + arch + "-" + config; 327 367 328 if ( !disttree) {368 if (path != Distributed) { 329 369 if ( ! nolib && ! dirExists( libdir ) ) { 330 370 cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl; … … 344 384 } // if 345 385 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 ); 386 switch(path) { 387 case Installed : Putenv( argv, "--prelude-dir=" + libdir ); break; 388 case BuildTree : Putenv( argv, "--prelude-dir=" + libdir + "/prelude" ); break; 389 case Distributed : Putenv( argv, "--prelude-dir=" + dir(argv[0]) ); break; 352 390 } 353 391 … … 365 403 366 404 // include the cfa library in case it is needed 367 args[nargs++] = ( *new string( string("-L" ) + libdir + ( intree? "/src/.libs" : "")) ).c_str();368 args[nargs++] = ( *new string( string("-Wl,-rpath," ) + libdir + ( intree? "/src/.libs" : "")) ).c_str();405 args[nargs++] = ( *new string( string("-L" ) + libdir + (path != Installed ? "/src/.libs" : "")) ).c_str(); 406 args[nargs++] = ( *new string( string("-Wl,-rpath," ) + libdir + (path != Installed ? "/src/.libs" : "")) ).c_str(); 369 407 args[nargs++] = "-Wl,--push-state,--as-needed"; 370 408 args[nargs++] = "-lcfathread"; … … 410 448 411 449 if ( bprefix.length() == 0 ) { 412 if(disttree) { 413 bprefix = dir(argv[0]); 414 } else if(intree) { 415 bprefix = srcdriverdir; 416 } else { 417 bprefix = installlibdir; 450 switch(path) { 451 case Installed : bprefix = installlibdir; break; 452 case BuildTree : bprefix = srcdriverdir ; break; 453 case Distributed : bprefix = dir(argv[0]) ; break; 418 454 } 419 455 if ( bprefix[bprefix.length() - 1] != '/' ) bprefix += '/'; -
TabularUnified libcfa/Makefile.in ¶
r34e1494 r158b026 296 296 PACKAGE_VERSION = @PACKAGE_VERSION@ 297 297 PATH_SEPARATOR = @PATH_SEPARATOR@ 298 PRELUDEFLAG = @PRELUDEFLAG@299 298 RANLIB = @RANLIB@ 300 299 SED = @SED@ -
TabularUnified libcfa/configure ¶
r34e1494 r158b026 707 707 CONFIG_CFLAGS 708 708 ARCH_FLAGS 709 PRELUDEFLAG710 709 CFADIR_HASH 711 710 LOCAL_CC1 … … 2960 2959 if test x$enable_distcc = xno; then 2961 2960 CFACC=${DRIVER_DIR}cfa 2962 PRELUDEFLAG='-in-tree'2963 2961 echo "no" 2964 2962 else … … 2968 2966 CFADIR_HASH=$($tools/distcc_hash $config) 2969 2967 CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa" 2970 PRELUDEFLAG='-dist-tree'2971 2968 echo "yes (hash=${CFADIR_HASH})" 2972 2969 fi … … 2982 2979 ENABLE_DISTCC_FALSE= 2983 2980 fi 2984 2985 2981 2986 2982 -
TabularUnified libcfa/configure.ac ¶
r34e1494 r158b026 34 34 if test x$enable_distcc = xno; then 35 35 CFACC=${DRIVER_DIR}cfa 36 PRELUDEFLAG='-in-tree'37 36 echo "no" 38 37 else … … 42 41 CFADIR_HASH=$($tools/distcc_hash $config) 43 42 CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa" 44 PRELUDEFLAG='-dist-tree'45 43 echo "yes (hash=${CFADIR_HASH})" 46 44 fi … … 57 55 AC_SUBST(CFADIR_HASH) 58 56 AC_SUBST(CFA_VERSION) 59 AC_SUBST(PRELUDEFLAG)60 57 61 58 #============================================================================== -
TabularUnified libcfa/prelude/Makefile.in ¶
r34e1494 r158b026 239 239 PACKAGE_VERSION = @PACKAGE_VERSION@ 240 240 PATH_SEPARATOR = @PATH_SEPARATOR@ 241 PRELUDEFLAG = @PRELUDEFLAG@242 241 RANLIB = @RANLIB@ 243 242 SED = @SED@ -
TabularUnified libcfa/src/Makefile.am ¶
r34e1494 r158b026 32 32 # use -no-include-stdhdr to prevent rebuild cycles 33 33 # 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@34 AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@ 35 35 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 36 36 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ … … 96 96 97 97 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 98 ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}98 ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@} 99 99 100 100 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 101 101 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 102 $(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}102 $(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@} 103 103 104 104 #---------------------------------------------------------------------------------------------------------------- -
TabularUnified libcfa/src/Makefile.in ¶
r34e1494 r158b026 349 349 PACKAGE_VERSION = @PACKAGE_VERSION@ 350 350 PATH_SEPARATOR = @PATH_SEPARATOR@ 351 PRELUDEFLAG = @PRELUDEFLAG@352 351 RANLIB = @RANLIB@ 353 352 SED = @SED@ … … 445 444 # use -no-include-stdhdr to prevent rebuild cycles 446 445 # The built sources must not depend on the installed headers 447 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@-I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@446 AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@ 448 447 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 449 448 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ … … 954 953 955 954 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 956 ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}955 ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@} 957 956 958 957 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 959 958 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 960 $(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}959 $(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@} 961 960 962 961 #---------------------------------------------------------------------------------------------------------------- -
TabularUnified longrun_tests/Makefile.in ¶
r34e1494 r158b026 348 348 CCDEPMODE = @CCDEPMODE@ 349 349 CFACC = @CFACC@ 350 CFACC_INSTALL = @CFACC_INSTALL@ 350 351 CFACPP = @CFACPP@ 351 352 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
TabularUnified src/Makefile.in ¶
r34e1494 r158b026 411 411 CCDEPMODE = @CCDEPMODE@ 412 412 CFACC = @CFACC@ 413 CFACC_INSTALL = @CFACC_INSTALL@ 413 414 CFACPP = @CFACPP@ 414 415 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
TabularUnified tests/Makefile.am ¶
r34e1494 r158b026 24 24 archiveerrors= 25 25 26 INSTALL_FLAGS=-in-tree27 26 DEBUG_FLAGS=-debug -O0 28 27 … … 43 42 -DIN_DIR="${abs_srcdir}/.in/" 44 43 44 # get the desired cfa to test 45 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@) 46 45 47 # adjust CC to current flags 46 CC = $(if $( DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})48 CC = $(if $(ifeq $(DISTCC_CFA_PATH),yes),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 47 49 CFACC = $(CC) 48 50 … … 51 53 52 54 # adjusted CC but without the actual distcc call 53 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})55 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 54 56 55 57 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && -
TabularUnified tests/Makefile.in ¶
r34e1494 r158b026 214 214 215 215 # adjust CC to current flags 216 CC = $(if $( DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})216 CC = $(if $(ifeq $(DISTCC_CFA_PATH),yes),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 217 217 CCAS = @CCAS@ 218 218 CCASDEPMODE = @CCASDEPMODE@ … … 220 220 CCDEPMODE = @CCDEPMODE@ 221 221 CFACC = $(CC) 222 CFACC_INSTALL = @CFACC_INSTALL@ 222 223 CFACPP = @CFACPP@ 223 224 CFA_BACKEND_CC = @CFA_BACKEND_CC@ … … 381 382 installed = no 382 383 archiveerrors = 383 INSTALL_FLAGS = -in-tree384 384 DEBUG_FLAGS = -debug -O0 385 385 quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes … … 398 398 399 399 400 # get the desired cfa to test 401 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@) 402 400 403 # get local binary for depedencies 401 404 CFACCBIN = @CFACC@ 402 405 403 406 # adjusted CC but without the actual distcc call 404 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})407 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 405 408 PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && 406 409 avl_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 -
TabularUnified tests/pybin/settings.py ¶
r34e1494 r158b026 97 97 98 98 self.string = "installed" if value else "in-tree" 99 self.flags = """ INSTALL_FLAGS=%s""" % ("" if value else "-in-tree")99 self.flags = """installed=%s""" % ("yes" if value else "no") 100 100 101 101 class Timeouts: -
TabularUnified tools/Makefile.in ¶
r34e1494 r158b026 208 208 CCDEPMODE = @CCDEPMODE@ 209 209 CFACC = @CFACC@ 210 CFACC_INSTALL = @CFACC_INSTALL@ 210 211 CFACPP = @CFACPP@ 211 212 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
TabularUnified tools/prettyprinter/Makefile.in ¶
r34e1494 r158b026 237 237 CCDEPMODE = @CCDEPMODE@ 238 238 CFACC = @CFACC@ 239 CFACC_INSTALL = @CFACC_INSTALL@ 239 240 CFACPP = @CFACPP@ 240 241 CFA_BACKEND_CC = @CFA_BACKEND_CC@
Note: See TracChangeset
for help on using the changeset viewer.