Changeset 04c8bba


Ignore:
Timestamp:
Dec 13, 2016, 3:15:11 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
37efaf56
Parents:
58dd019 (diff), 0edebf8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • configure

    r58dd019 r04c8bba  
    658658CFA_INCDIR
    659659CFA_PREFIX
     660BUILD_NO_LIB_FALSE
     661BUILD_NO_LIB_TRUE
    660662BUILD_DEBUG_FALSE
    661663BUILD_DEBUG_TRUE
     
    31463148                                ;;
    31473149                        no)
    3148                                 as_fn_error $? "Must build target debug or release" "$LINENO" 5
    3149                                 exit 1;
     3150                                build_release="no"
     3151                                build_debug="no"
    31503152                                ;;
    31513153                        *)
     
    31873189  BUILD_DEBUG_TRUE='#'
    31883190  BUILD_DEBUG_FALSE=
     3191fi
     3192
     3193 if test "x$build_release$build_debug" = "xnono"; then
     3194  BUILD_NO_LIB_TRUE=
     3195  BUILD_NO_LIB_FALSE='#'
     3196else
     3197  BUILD_NO_LIB_TRUE='#'
     3198  BUILD_NO_LIB_FALSE=
    31893199fi
    31903200
     
    63046314if test -z "${BUILD_DEBUG_TRUE}" && test -z "${BUILD_DEBUG_FALSE}"; then
    63056315  as_fn_error $? "conditional \"BUILD_DEBUG\" was never defined.
     6316Usually this means the macro was only invoked conditionally." "$LINENO" 5
     6317fi
     6318if test -z "${BUILD_NO_LIB_TRUE}" && test -z "${BUILD_NO_LIB_FALSE}"; then
     6319  as_fn_error $? "conditional \"BUILD_NO_LIB\" was never defined.
    63066320Usually this means the macro was only invoked conditionally." "$LINENO" 5
    63076321fi
     
    76727686fi
    76737687else
     7688  if test -z "$BUILD_DEBUG_TRUE"; then :
    76747689  { $as_echo "$as_me:${as_lineno-$LINENO}: Building libcfa for target: debug" >&5
    76757690$as_echo "$as_me: Building libcfa for target: debug" >&6;}
     7691else
     7692  { $as_echo "$as_me:${as_lineno-$LINENO}: Running cfa without libcfa" >&5
     7693$as_echo "$as_me: Running cfa without libcfa" >&6;}
     7694fi
    76767695fi
    76777696
  • configure.ac

    r58dd019 r04c8bba  
    8282                                ;;
    8383                        no)
    84                                 AC_MSG_ERROR(Must build target debug or release)
    85                                 exit 1;
     84                                build_release="no"
     85                                build_debug="no"
    8686                                ;;
    8787                        *)
     
    111111AM_CONDITIONAL([BUILD_RELEASE], [test "x$build_release" = "xyes"])
    112112AM_CONDITIONAL([BUILD_DEBUG], [test "x$build_debug" = "xyes"])
     113AM_CONDITIONAL([BUILD_NO_LIB], [test "x$build_release$build_debug" = "xnono"])
    113114
    114115if test "x$prefix" = "xNONE"; then
     
    200201                [AC_MSG_NOTICE(Building libcfa for target: release & debug)],
    201202                [AC_MSG_NOTICE(Building libcfa for target: release)])],
    202         [AC_MSG_NOTICE(Building libcfa for target: debug)])
     203        [AM_COND_IF([BUILD_DEBUG],
     204                [AC_MSG_NOTICE(Building libcfa for target: debug)],
     205                [AC_MSG_NOTICE(Running cfa without libcfa)])])
    203206
    204207# Final text
  • src/driver/Makefile.am

    r58dd019 r04c8bba  
    1717# applies to both programs
    1818AM_CXXFLAGS = -Wall -O2
     19if BUILD_NO_LIB
     20else
     21AM_CXXFLAGS += -DHAVE_LIBCFA
     22endif
     23if BUILD_DEBUG
     24AM_CXXFLAGS += -DHAVE_LIBCFA_DEBUG
     25endif
     26if BUILD_RELEASE
     27AM_CXXFLAGS += -DHAVE_LIBCFA_RELEASE
     28endif
    1929
    2030bin_PROGRAMS = cfa
  • src/driver/Makefile.in

    r58dd019 r04c8bba  
    3838build_triplet = @build@
    3939host_triplet = @host@
     40@BUILD_NO_LIB_FALSE@am__append_1 = -DHAVE_LIBCFA
     41@BUILD_DEBUG_TRUE@am__append_2 = -DHAVE_LIBCFA_DEBUG
     42@BUILD_RELEASE_TRUE@am__append_3 = -DHAVE_LIBCFA_RELEASE
    4043bin_PROGRAMS = cfa$(EXEEXT)
    4144cc1lib_PROGRAMS = cc1$(EXEEXT)
     
    204207
    205208# applies to both programs
    206 AM_CXXFLAGS = -Wall -O2
     209AM_CXXFLAGS = -Wall -O2 $(am__append_1) $(am__append_2) \
     210        $(am__append_3)
    207211cfa_SOURCES = cfa.cc
    208212
  • src/driver/cfa.cc

    r58dd019 r04c8bba  
    231231        } // if
    232232
    233         string d;
    234         if ( debug ) {
    235                 d = "-d";
    236         } // if
    237 
    238233        // add the CFA include-library paths, which allow direct access to header files without directory qualification
    239 
    240234        args[nargs] = "-I" CFA_INCDIR;
    241235        nargs += 1;
     
    249243        nargs += 1;
    250244
     245#ifdef HAVE_LIBCFA
    251246        if ( link ) {
     247                #if ! defined(HAVE_LIBCFA_RELEASE)
     248                        if( !debug ) {
     249                                cerr << "error: Option -nodebug is not available, libcfa was not installed." << endl;
     250                                exit( EXIT_FAILURE );
     251                                }
     252                #endif
     253                #if ! defined(HAVE_LIBCFA_DEBUG)
     254                        if( debug ) {
     255                                cerr << "error: Option -debug is not available, libcfa-d was not installed." << endl;
     256                                exit( EXIT_FAILURE );
     257                                }
     258                #endif
     259
    252260                // include the cfa library in case it's needed
    253261                args[nargs] = "-L" CFA_LIBDIR;
    254262                nargs += 1;
    255                 args[nargs] = "-lcfa";
    256                 nargs += 1;
    257         } // if
     263                if( debug ) {
     264                        args[nargs] = "-lcfa-d";
     265                } else {
     266                        args[nargs] = "-lcfa";
     267                }
     268                nargs += 1;
     269        } // if
     270#endif //HAVE_LIBCFA
    258271
    259272        // add the correct set of flags based on the type of compile this is
  • src/libcfa/Makefile.am

    r58dd019 r04c8bba  
    1818AUTOMAKE_OPTIONS = subdir-objects
    1919
    20 lib_LIBRARIES = libcfa.a
     20lib_LIBRARIES =
     21
     22if BUILD_RELEASE
     23lib_LIBRARIES += libcfa.a
     24endif
     25
     26if BUILD_DEBUG
     27lib_LIBRARIES += libcfa-d.a
     28endif
    2129
    2230# put into lib for now
     
    7886${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
    7987
    80 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
     88libsrc = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
     89
     90libcfa_a_SOURCES = ${libsrc}
     91
     92libcfa_d_a_SOURCES = ${libsrc}
    8193
    8294stdhdr = ${shell echo stdhdr/*}
  • src/libcfa/Makefile.in

    r58dd019 r04c8bba  
    4040build_triplet = @build@
    4141host_triplet = @host@
     42@BUILD_RELEASE_TRUE@am__append_1 = libcfa.a
     43@BUILD_DEBUG_TRUE@am__append_2 = libcfa-d.a
    4244subdir = src/libcfa
    4345DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \
     
    8991am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
    9092am__v_at_0 = @
    91 libcfa_a_AR = $(AR) $(ARFLAGS)
    92 libcfa_a_LIBADD =
     93libcfa_d_a_AR = $(AR) $(ARFLAGS)
     94libcfa_d_a_LIBADD =
    9395am__dirstamp = $(am__leading_dot)dirstamp
    9496am__objects_1 = limits.$(OBJEXT) stdlib.$(OBJEXT) math.$(OBJEXT) \
     
    9698        rational.$(OBJEXT) assert.$(OBJEXT) \
    9799        containers/vector.$(OBJEXT) concurrency/threads.$(OBJEXT)
    98 am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) $(am__objects_1) \
     100am__objects_2 = libcfa-prelude.$(OBJEXT) $(am__objects_1) \
    99101        concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT) \
    100102        concurrency/invoke.$(OBJEXT)
     103am_libcfa_d_a_OBJECTS = $(am__objects_2)
     104libcfa_d_a_OBJECTS = $(am_libcfa_d_a_OBJECTS)
     105libcfa_a_AR = $(AR) $(ARFLAGS)
     106libcfa_a_LIBADD =
     107am_libcfa_a_OBJECTS = $(am__objects_2)
    101108libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
    102109DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
     
    122129am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
    123130am__v_GEN_0 = @echo "  GEN   " $@;
    124 SOURCES = $(libcfa_a_SOURCES)
    125 DIST_SOURCES = $(libcfa_a_SOURCES)
     131SOURCES = $(libcfa_d_a_SOURCES) $(libcfa_a_SOURCES)
     132DIST_SOURCES = $(libcfa_d_a_SOURCES) $(libcfa_a_SOURCES)
    126133DATA = $(cfalib_DATA)
    127134HEADERS = $(nobase_include_HEADERS)
     
    250257# create object files in directory with source files
    251258AUTOMAKE_OPTIONS = subdir-objects
    252 lib_LIBRARIES = libcfa.a
     259lib_LIBRARIES = $(am__append_1) $(am__append_2)
    253260
    254261# put into lib for now
     
    268275runtimehdrs = concurrency
    269276libobjs = ${headers:=.o}
    270 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
     277libsrc = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
     278libcfa_a_SOURCES = ${libsrc}
     279libcfa_d_a_SOURCES = ${libsrc}
    271280stdhdr = ${shell echo stdhdr/*}
    272281nobase_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
     
    357366concurrency/invoke.$(OBJEXT): concurrency/$(am__dirstamp) \
    358367        concurrency/$(DEPDIR)/$(am__dirstamp)
     368libcfa-d.a: $(libcfa_d_a_OBJECTS) $(libcfa_d_a_DEPENDENCIES) $(EXTRA_libcfa_d_a_DEPENDENCIES)
     369        $(AM_V_at)-rm -f libcfa-d.a
     370        $(AM_V_AR)$(libcfa_d_a_AR) libcfa-d.a $(libcfa_d_a_OBJECTS) $(libcfa_d_a_LIBADD)
     371        $(AM_V_at)$(RANLIB) libcfa-d.a
    359372libcfa.a: $(libcfa_a_OBJECTS) $(libcfa_a_DEPENDENCIES) $(EXTRA_libcfa_a_DEPENDENCIES)
    360373        $(AM_V_at)-rm -f libcfa.a
Note: See TracChangeset for help on using the changeset viewer.