Changeset 8e5724e


Ignore:
Timestamp:
Nov 29, 2016, 4:47:15 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
148f7290
Parents:
1f44196
Message:

Added the CFA_DEBUG flag and the libhdr folder to libcfa compilation.
Compilation now has an assambly compiler.
Added first assembly file to compiler.

Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    r1f44196 r8e5724e  
    124124BACKEND_CC = @BACKEND_CC@               # C compiler used to compile Cforall programs, versus C++ compiler used to build cfa command
    125125CC = @CC@
     126CCAS = @CCAS@
     127CCASDEPMODE = @CCASDEPMODE@
     128CCASFLAGS = @CCASFLAGS@
    126129CCDEPMODE = @CCDEPMODE@
    127130CFA_BACKEND_CC = @CFA_BACKEND_CC@
  • aclocal.m4

    r1f44196 r8e5724e  
    5959  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
    6060_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
     61
     62# Figure out how to run the assembler.                      -*- Autoconf -*-
     63
     64# Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
     65#
     66# This file is free software; the Free Software Foundation
     67# gives unlimited permission to copy and/or distribute it,
     68# with or without modifications, as long as this notice is preserved.
     69
     70# serial 5
     71
     72# AM_PROG_AS
     73# ----------
     74AC_DEFUN([AM_PROG_AS],
     75[# By default we simply use the C compiler to build assembly code.
     76AC_REQUIRE([AC_PROG_CC])
     77test "${CCAS+set}" = set || CCAS=$CC
     78test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
     79AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
     80AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
     81_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
     82])
    6183
    6284# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
  • configure

    r1f44196 r8e5724e  
    616616YFLAGS
    617617YACC
     618am__fastdepCCAS_FALSE
     619am__fastdepCCAS_TRUE
     620CCASDEPMODE
     621CCASFLAGS
     622CCAS
    618623am__fastdepCC_FALSE
    619624am__fastdepCC_TRUE
     
    733738CC
    734739CFLAGS
     740CCAS
     741CCASFLAGS
    735742YACC
    736743YFLAGS
     
    13741381  CC          C compiler command
    13751382  CFLAGS      C compiler flags
     1383  CCAS        assembler compiler command (defaults to CC)
     1384  CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
    13761385  YACC        The `Yet Another Compiler Compiler' implementation to use.
    13771386              Defaults to the first program found out of: `bison -y', `byacc',
     
    45034512  am__fastdepCC_TRUE='#'
    45044513  am__fastdepCC_FALSE=
     4514fi
     4515
     4516
     4517# By default we simply use the C compiler to build assembly code.
     4518
     4519test "${CCAS+set}" = set || CCAS=$CC
     4520test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
     4521
     4522
     4523
     4524depcc="$CCAS"   am_compiler_list=
     4525
     4526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
     4527$as_echo_n "checking dependency style of $depcc... " >&6; }
     4528if ${am_cv_CCAS_dependencies_compiler_type+:} false; then :
     4529  $as_echo_n "(cached) " >&6
     4530else
     4531  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
     4532  # We make a subdir and do the tests there.  Otherwise we can end up
     4533  # making bogus files that we don't know about and never remove.  For
     4534  # instance it was reported that on HP-UX the gcc test will end up
     4535  # making a dummy file named `D' -- because `-MD' means `put the output
     4536  # in D'.
     4537  rm -rf conftest.dir
     4538  mkdir conftest.dir
     4539  # Copy depcomp to subdir because otherwise we won't find it if we're
     4540  # using a relative directory.
     4541  cp "$am_depcomp" conftest.dir
     4542  cd conftest.dir
     4543  # We will build objects and dependencies in a subdirectory because
     4544  # it helps to detect inapplicable dependency modes.  For instance
     4545  # both Tru64's cc and ICC support -MD to output dependencies as a
     4546  # side effect of compilation, but ICC will put the dependencies in
     4547  # the current directory while Tru64 will put them in the object
     4548  # directory.
     4549  mkdir sub
     4550
     4551  am_cv_CCAS_dependencies_compiler_type=none
     4552  if test "$am_compiler_list" = ""; then
     4553     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
     4554  fi
     4555  am__universal=false
     4556
     4557
     4558  for depmode in $am_compiler_list; do
     4559    # Setup a source with many dependencies, because some compilers
     4560    # like to wrap large dependency lists on column 80 (with \), and
     4561    # we should not choose a depcomp mode which is confused by this.
     4562    #
     4563    # We need to recreate these files for each test, as the compiler may
     4564    # overwrite some of them when testing with obscure command lines.
     4565    # This happens at least with the AIX C compiler.
     4566    : > sub/conftest.c
     4567    for i in 1 2 3 4 5 6; do
     4568      echo '#include "conftst'$i'.h"' >> sub/conftest.c
     4569      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
     4570      # Solaris 8's {/usr,}/bin/sh.
     4571      touch sub/conftst$i.h
     4572    done
     4573    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
     4574
     4575    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     4576    # mode.  It turns out that the SunPro C++ compiler does not properly
     4577    # handle `-M -o', and we need to detect this.  Also, some Intel
     4578    # versions had trouble with output in subdirs
     4579    am__obj=sub/conftest.${OBJEXT-o}
     4580    am__minus_obj="-o $am__obj"
     4581    case $depmode in
     4582    gcc)
     4583      # This depmode causes a compiler race in universal mode.
     4584      test "$am__universal" = false || continue
     4585      ;;
     4586    nosideeffect)
     4587      # after this tag, mechanisms are not by side-effect, so they'll
     4588      # only be used when explicitly requested
     4589      if test "x$enable_dependency_tracking" = xyes; then
     4590        continue
     4591      else
     4592        break
     4593      fi
     4594      ;;
     4595    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
     4596      # This compiler won't grok `-c -o', but also, the minuso test has
     4597      # not run yet.  These depmodes are late enough in the game, and
     4598      # so weak that their functioning should not be impacted.
     4599      am__obj=conftest.${OBJEXT-o}
     4600      am__minus_obj=
     4601      ;;
     4602    none) break ;;
     4603    esac
     4604    if depmode=$depmode \
     4605       source=sub/conftest.c object=$am__obj \
     4606       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
     4607       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
     4608         >/dev/null 2>conftest.err &&
     4609       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
     4610       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
     4611       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
     4612       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
     4613      # icc doesn't choke on unknown options, it will just issue warnings
     4614      # or remarks (even with -Werror).  So we grep stderr for any message
     4615      # that says an option was ignored or not supported.
     4616      # When given -MP, icc 7.0 and 7.1 complain thusly:
     4617      #   icc: Command line warning: ignoring option '-M'; no argument required
     4618      # The diagnosis changed in icc 8.0:
     4619      #   icc: Command line remark: option '-MP' not supported
     4620      if (grep 'ignoring option' conftest.err ||
     4621          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
     4622        am_cv_CCAS_dependencies_compiler_type=$depmode
     4623        break
     4624      fi
     4625    fi
     4626  done
     4627
     4628  cd ..
     4629  rm -rf conftest.dir
     4630else
     4631  am_cv_CCAS_dependencies_compiler_type=none
     4632fi
     4633
     4634fi
     4635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
     4636$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
     4637CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
     4638
     4639 if
     4640  test "x$enable_dependency_tracking" != xno \
     4641  && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
     4642  am__fastdepCCAS_TRUE=
     4643  am__fastdepCCAS_FALSE='#'
     4644else
     4645  am__fastdepCCAS_TRUE='#'
     4646  am__fastdepCCAS_FALSE=
    45054647fi
    45064648
     
    59906132if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
    59916133  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
     6134Usually this means the macro was only invoked conditionally." "$LINENO" 5
     6135fi
     6136if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
     6137  as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
    59926138Usually this means the macro was only invoked conditionally." "$LINENO" 5
    59936139fi
  • configure.ac

    r1f44196 r8e5724e  
    9191AC_PROG_CXX
    9292AC_PROG_CC
     93AM_PROG_AS
    9394AM_PROG_CC_C_O  # deprecated
    9495# These are often not installed and people miss seeing the "no", so stop the configure.
  • src/Makefile.in

    r1f44196 r8e5724e  
    259259BACKEND_CC = @BACKEND_CC@
    260260CC = @CC@
     261CCAS = @CCAS@
     262CCASDEPMODE = @CCASDEPMODE@
     263CCASFLAGS = @CCASFLAGS@
    261264CCDEPMODE = @CCDEPMODE@
    262265CFA_BACKEND_CC = @CFA_BACKEND_CC@
  • src/driver/Makefile.in

    r1f44196 r8e5724e  
    9292BACKEND_CC = @BACKEND_CC@
    9393CC = @CC@
     94CCAS = @CCAS@
     95CCASDEPMODE = @CCASDEPMODE@
     96CCASFLAGS = @CCASFLAGS@
    9497CCDEPMODE = @CCDEPMODE@
    9598CFA_BACKEND_CC = @CFA_BACKEND_CC@
  • src/examples/Makefile.in

    r1f44196 r8e5724e  
    101101BACKEND_CC = @BACKEND_CC@
    102102CC = @CFA_BINDIR@/cfa
     103CCAS = @CCAS@
     104CCASDEPMODE = @CCASDEPMODE@
     105CCASFLAGS = @CCASFLAGS@
    103106CCDEPMODE = @CCDEPMODE@
    104107CFA_BACKEND_CC = @CFA_BACKEND_CC@
  • src/libcfa/Makefile.am

    r1f44196 r8e5724e  
    5353         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $<
    5454
    55 CFLAGS = -quiet -no-include-stdhdr -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2
     55CFLAGS = \
     56        -quiet \
     57        -no-include-stdhdr \
     58        -g \
     59        -Wall \
     60        -Wno-unused-function \
     61        @CFA_FLAGS@ \
     62        -B${abs_top_srcdir}/src/driver \
     63        -XCFA \
     64        -t \
     65        -D__CFA_DEBUG__ \
     66        -I${abs_top_srcdir}/src/libcfa/libhdr \
     67        # TEMPORARY: does not build with -O2
    5668CC = ${abs_top_srcdir}/src/driver/cfa
    5769
     
    6678${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
    6779
    68 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c}
     80libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-x86_64.S
    6981
    7082stdhdr = ${shell echo stdhdr/*}
  • src/libcfa/Makefile.in

    r1f44196 r8e5724e  
    9494        rational.$(OBJEXT) assert.$(OBJEXT) \
    9595        containers/vector.$(OBJEXT) concurrency/threads.$(OBJEXT)
    96 am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) $(am__objects_1)
     96am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) $(am__objects_1) \
     97        concurrency/CtxSwitch-x86_64.$(OBJEXT)
    9798libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
    9899DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
     
    100101am__depfiles_maybe = depfiles
    101102am__mv = mv -f
     103CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     104        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
     105AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
     106am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
     107am__v_CPPAS_0 = @echo "  CPPAS " $@;
    102108COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    103109        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
     
    130136BACKEND_CC = @BACKEND_CC@
    131137CC = ${abs_top_srcdir}/src/driver/cfa
     138CCAS = @CCAS@
     139CCASDEPMODE = @CCASDEPMODE@
     140CCASFLAGS = @CCASFLAGS@
    132141CCDEPMODE = @CCDEPMODE@
    133142CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    137146CFA_LIBDIR = @CFA_LIBDIR@
    138147CFA_PREFIX = @CFA_PREFIX@
    139 CFLAGS = -quiet -no-include-stdhdr -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2
     148CFLAGS = \
     149        -quiet \
     150        -no-include-stdhdr \
     151        -g \
     152        -Wall \
     153        -Wno-unused-function \
     154        @CFA_FLAGS@ \
     155        -B${abs_top_srcdir}/src/driver \
     156        -XCFA \
     157        -t \
     158        -D__CFA_DEBUG__ \
     159        -I${abs_top_srcdir}/src/libcfa/libhdr \
     160        # TEMPORARY: does not build with -O2
     161
    140162CPP = @CPP@
    141163CPPFLAGS = @CPPFLAGS@
     
    238260runtimehdrs = concurrency
    239261libobjs = ${headers:=.o}
    240 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c}
     262libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-x86_64.S
    241263stdhdr = ${shell echo stdhdr/*}
    242264nobase_include_HEADERS = ${headers} ${stdhdr}
     
    245267
    246268.SUFFIXES:
    247 .SUFFIXES: .c .o .obj
     269.SUFFIXES: .S .c .o .obj
    248270$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
    249271        @for dep in $?; do \
     
    322344concurrency/threads.$(OBJEXT): concurrency/$(am__dirstamp) \
    323345        concurrency/$(DEPDIR)/$(am__dirstamp)
     346concurrency/CtxSwitch-x86_64.$(OBJEXT): concurrency/$(am__dirstamp) \
     347        concurrency/$(DEPDIR)/$(am__dirstamp)
    324348libcfa.a: $(libcfa_a_OBJECTS) $(libcfa_a_DEPENDENCIES) $(EXTRA_libcfa_a_DEPENDENCIES)
    325349        $(AM_V_at)-rm -f libcfa.a
     
    329353mostlyclean-compile:
    330354        -rm -f *.$(OBJEXT)
     355        -rm -f concurrency/CtxSwitch-x86_64.$(OBJEXT)
    331356        -rm -f concurrency/threads.$(OBJEXT)
    332357        -rm -f containers/vector.$(OBJEXT)
     
    344369@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rational.Po@am__quote@
    345370@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdlib.Po@am__quote@
     371@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/CtxSwitch-x86_64.Po@am__quote@
    346372@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/threads.Po@am__quote@
    347373@AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/vector.Po@am__quote@
     374
     375.S.o:
     376@am__fastdepCCAS_TRUE@  $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
     377@am__fastdepCCAS_TRUE@  $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
     378@am__fastdepCCAS_TRUE@  $(am__mv) $$depbase.Tpo $$depbase.Po
     379@AMDEP_TRUE@@am__fastdepCCAS_FALSE@     $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     380@AMDEP_TRUE@@am__fastdepCCAS_FALSE@     DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     381@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
     382
     383.S.obj:
     384@am__fastdepCCAS_TRUE@  $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
     385@am__fastdepCCAS_TRUE@  $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
     386@am__fastdepCCAS_TRUE@  $(am__mv) $$depbase.Tpo $$depbase.Po
     387@AMDEP_TRUE@@am__fastdepCCAS_FALSE@     $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     388@AMDEP_TRUE@@am__fastdepCCAS_FALSE@     DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     389@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    348390
    349391.c.o:
  • src/tests/Makefile.in

    r1f44196 r8e5724e  
    111111BACKEND_CC = @BACKEND_CC@
    112112CC = @CFA_BINDIR@/cfa
     113CCAS = @CCAS@
     114CCASDEPMODE = @CCASDEPMODE@
     115CCASFLAGS = @CCASFLAGS@
    113116CCDEPMODE = @CCDEPMODE@
    114117CFA_BACKEND_CC = @CFA_BACKEND_CC@
Note: See TracChangeset for help on using the changeset viewer.