Changeset 575a6e5


Ignore:
Timestamp:
Aug 9, 2018, 11:07:05 AM (6 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
7a7ab42
Parents:
a5121bf
Message:

Cross compilation appears to be working

Files:
16 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    ra5121bf r575a6e5  
    2323SUBDIRS = driver src . @LIBCFA_TARGET_DIRS@
    2424
    25 @LIBCFA_TARGET_MAKEFILES@ : Makefile
     25@LIBCFA_TARGET_MAKEFILES@ : Makefile $(srcdir)/libcfa/configure
    2626        @$(eval config_file = $(dir $@)config.data)
    2727        @ls $(config_file) || (echo "Missing config.data, re-run configure script again" && false)
  • Makefile.in

    ra5121bf r575a6e5  
    893893 # order important
    894894
    895 @LIBCFA_TARGET_MAKEFILES@ : Makefile
     895@LIBCFA_TARGET_MAKEFILES@ : Makefile $(srcdir)/libcfa/configure
    896896        @$(eval config_file = $(dir $@)config.data)
    897897        @ls $(config_file) || (echo "Missing config.data, re-run configure script again" && false)
  • configure

    ra5121bf r575a6e5  
    24882488  yes) AM_DEFAULT_VERBOSITY=0;;
    24892489   no) AM_DEFAULT_VERBOSITY=1;;
    2490     *) AM_DEFAULT_VERBOSITY=1;;
     2490    *) AM_DEFAULT_VERBOSITY=0;;
    24912491esac
    24922492am_make=${MAKE-make}
     
    25262526
    25272527
     2528
     2529# don't use the default CFLAGS as they unconditonnaly add -O2
     2530: ${CFLAGS=""}
    25282531
    25292532am__api_version='1.15'
  • configure.ac

    ra5121bf r575a6e5  
    77#AC_CONFIG_SRCDIR([src/main.cc])
    88AC_CONFIG_HEADERS([config.h:src/config.h.in])
    9 AM_SILENT_RULES([no])
     9AM_SILENT_RULES([yes])
    1010
    1111m4_include([automake/cfa.m4])
     12
     13# don't use the default CFLAGS as they unconditonnaly add -O2
     14: ${CFLAGS=""}
    1215
    1316AM_INIT_AUTOMAKE([subdir-objects])
  • libcfa/Makefile.in

    ra5121bf r575a6e5  
    229229CFLAGS = @CFLAGS@
    230230CONFIGURATION = @CONFIGURATION@
     231CONFIG_CFAFLAGS = @CONFIG_CFAFLAGS@
     232CONFIG_CFLAGS = @CONFIG_CFLAGS@
    231233CPPFLAGS = @CPPFLAGS@
    232234CXX = @CXX@
  • libcfa/configure

    ra5121bf r575a6e5  
    623623CFA_PREFIX
    624624CFA_NAME
     625CONFIG_CFAFLAGS
     626CONFIG_CFLAGS
    625627ARCH_FLAGS
    626628CFACPP
     
    629631CONFIGURATION
    630632ARCHITECTURE
    631 AM_BACKSLASH
    632 AM_DEFAULT_VERBOSITY
    633 AM_DEFAULT_V
    634 AM_V
    635633am__untar
    636634am__tar
     
    656654INSTALL_SCRIPT
    657655INSTALL_PROGRAM
     656AM_BACKSLASH
     657AM_DEFAULT_VERBOSITY
     658AM_DEFAULT_V
     659AM_V
    658660target_alias
    659661host_alias
     
    19101912
    19111913
     1914# Check whether --enable-silent-rules was given.
     1915if test "${enable_silent_rules+set}" = set; then :
     1916  enableval=$enable_silent_rules;
     1917fi
     1918
     1919case $enable_silent_rules in # (((
     1920  yes) AM_DEFAULT_VERBOSITY=0;;
     1921   no) AM_DEFAULT_VERBOSITY=1;;
     1922    *) AM_DEFAULT_VERBOSITY=0;;
     1923esac
     1924am_make=${MAKE-make}
     1925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
     1926$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
     1927if ${am_cv_make_support_nested_variables+:} false; then :
     1928  $as_echo_n "(cached) " >&6
     1929else
     1930  if $as_echo 'TRUE=$(BAR$(V))
     1931BAR0=false
     1932BAR1=true
     1933V=1
     1934am__doit:
     1935        @$(TRUE)
     1936.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
     1937  am_cv_make_support_nested_variables=yes
     1938else
     1939  am_cv_make_support_nested_variables=no
     1940fi
     1941fi
     1942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
     1943$as_echo "$am_cv_make_support_nested_variables" >&6; }
     1944if test $am_cv_make_support_nested_variables = yes; then
     1945    AM_V='$(V)'
     1946  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
     1947else
     1948  AM_V=$AM_DEFAULT_VERBOSITY
     1949  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
     1950fi
     1951AM_BACKSLASH='\'
     1952
    19121953
    19131954
     
    23432384rmdir .tst 2>/dev/null
    23442385
    2345 # Check whether --enable-silent-rules was given.
    2346 if test "${enable_silent_rules+set}" = set; then :
    2347   enableval=$enable_silent_rules;
    2348 fi
    2349 
    2350 case $enable_silent_rules in # (((
    2351   yes) AM_DEFAULT_VERBOSITY=0;;
    2352    no) AM_DEFAULT_VERBOSITY=1;;
    2353     *) AM_DEFAULT_VERBOSITY=1;;
    2354 esac
    2355 am_make=${MAKE-make}
    2356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
    2357 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
    2358 if ${am_cv_make_support_nested_variables+:} false; then :
    2359   $as_echo_n "(cached) " >&6
    2360 else
    2361   if $as_echo 'TRUE=$(BAR$(V))
    2362 BAR0=false
    2363 BAR1=true
    2364 V=1
    2365 am__doit:
    2366         @$(TRUE)
    2367 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
    2368   am_cv_make_support_nested_variables=yes
    2369 else
    2370   am_cv_make_support_nested_variables=no
    2371 fi
    2372 fi
    2373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
    2374 $as_echo "$am_cv_make_support_nested_variables" >&6; }
    2375 if test $am_cv_make_support_nested_variables = yes; then
    2376     AM_V='$(V)'
    2377   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
    2378 else
    2379   AM_V=$AM_DEFAULT_VERBOSITY
    2380   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
    2381 fi
    2382 AM_BACKSLASH='\'
    2383 
    23842386if test "`cd $srcdir && pwd`" != "`pwd`"; then
    23852387  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
     
    24982500
    24992501
     2502# don't use the default CFLAGS as they unconditonnaly add -O2
     2503: ${CFLAGS=""}
     2504
    25002505# Allow program name tansformation
    25012506# will fill program_transform_name with appropriate sed regex
     
    25112516
    25122517
     2518#==============================================================================
     2519#Handle specific flags
    25132520case $ARCHITECTURE in
    25142521        "x64"        ) ARCH_FLAGS="-m64";;
     
    25162523        "arm"        ) ARCH_FLAGS="";;
    25172524esac
     2525
     2526
     2527
     2528case $CONFIGURATION in
     2529        "debug"   )
     2530                CONFIG_CFLAGS="-O0 -g"
     2531                CONFIG_CFAFLAGS="-debug"
     2532        ;;
     2533        "nodebug" )
     2534                CONFIG_CFLAGS="-O2 -s"
     2535                CONFIG_CFAFLAGS="-nodebug"
     2536        ;;
     2537        "nolib"   )
     2538                CONFIG_CFLAGS=""
     2539                CONFIG_CFAFLAGS=""
     2540        ;;
     2541esac
     2542
    25182543
    25192544
  • libcfa/configure.ac

    ra5121bf r575a6e5  
    55AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca])
    66AC_CONFIG_AUX_DIR([./automake])
     7AM_SILENT_RULES([yes])
    78
    89m4_include([../automake/cfa.m4])
    910
    1011AM_INIT_AUTOMAKE([subdir-objects])
     12
     13# don't use the default CFLAGS as they unconditonnaly add -O2
     14: ${CFLAGS=""}
    1115
    1216# Allow program name tansformation
     
    2327AC_SUBST(CFACPP)
    2428
     29#==============================================================================
     30#Handle specific flags
    2531case $ARCHITECTURE in
    2632        "x64"        ) ARCH_FLAGS="-m64";;
     
    3036
    3137AC_SUBST(ARCH_FLAGS)
     38
     39case $CONFIGURATION in
     40        "debug"   )
     41                CONFIG_CFLAGS="-O0 -g"
     42                CONFIG_CFAFLAGS="-debug"
     43        ;;
     44        "nodebug" )
     45                CONFIG_CFLAGS="-O2 -s"
     46                CONFIG_CFAFLAGS="-nodebug"
     47        ;;
     48        "nolib"   )
     49                CONFIG_CFLAGS=""
     50                CONFIG_CFAFLAGS=""
     51        ;;
     52esac
     53
     54AC_SUBST(CONFIG_CFLAGS)
     55AC_SUBST(CONFIG_CFAFLAGS)
    3256
    3357#==============================================================================
  • libcfa/prelude/Makefile.am

    ra5121bf r575a6e5  
    2424
    2525CC = @CFACC@
    26 AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@
     26AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     27AM_CFAFLAGS = @CONFIG_CFAFLAGS@
    2728
    2829$(DEPDIR) :
  • libcfa/prelude/Makefile.in

    ra5121bf r575a6e5  
    174174CFLAGS = @CFLAGS@
    175175CONFIGURATION = @CONFIGURATION@
     176CONFIG_CFAFLAGS = @CONFIG_CFAFLAGS@
     177CONFIG_CFLAGS = @CONFIG_CFLAGS@
    176178CPPFLAGS = @CPPFLAGS@
    177179CXX = @CXX@
     
    263265cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c
    264266noinst_DATA = ../src/prelude.c
    265 AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@
     267AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     268AM_CFAFLAGS = @CONFIG_CFAFLAGS@
    266269MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cf
    267270MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
  • libcfa/src/Makefile.am

    ra5121bf r575a6e5  
    2828# use -no-include-stdhdr to prevent rebuild cycles
    2929# The built sources must not depend on the installed headers
    30 AM_CFAFLAGS = -quiet -in-tree -imacros prelude.c -I$(srcdir)/stdhdr
    31 AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@
    32 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@
     30AM_CFAFLAGS = -quiet -in-tree -imacros prelude.c -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
     31AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     32AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3333CFACC = @CFACC@
    3434
  • libcfa/src/Makefile.in

    ra5121bf r575a6e5  
    243243CFLAGS = @CFLAGS@
    244244CONFIGURATION = @CONFIGURATION@
     245CONFIG_CFAFLAGS = @CONFIG_CFAFLAGS@
     246CONFIG_CFLAGS = @CONFIG_CFLAGS@
    245247CPPFLAGS = @CPPFLAGS@
    246248CXX = @CXX@
     
    339341# use -no-include-stdhdr to prevent rebuild cycles
    340342# The built sources must not depend on the installed headers
    341 AM_CFAFLAGS = -quiet -in-tree -imacros prelude.c -I$(srcdir)/stdhdr
    342 AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@
    343 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@
     343AM_CFAFLAGS = -quiet -in-tree -imacros prelude.c -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@
     344AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     345AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
    344346
    345347#----------------------------------------------------------------------------------------------------------------
  • tests/Makefile.am

    ra5121bf r575a6e5  
    3333        -DIN_DIR="${srcdir}/.in/"
    3434
    35 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS}
     35AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
    3636
    3737CC = @CFACC@
     
    5959
    6060.validate: .validate.c
    61         @$(COMPILE) .validate.c -fsyntax-only
     61        $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror
    6262
    6363.validate.c:
  • tests/Makefile.in

    ra5121bf r575a6e5  
    304304AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \
    305305        -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" ${DEBUG_FLAGS} \
    306         ${INSTALL_FLAGS}
     306        ${INSTALL_FLAGS} ${ARCH_FLAGS}
    307307fstream_test_SOURCES = fstream_test.c
    308308avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
     
    625625
    626626.validate: .validate.c
    627         @$(COMPILE) .validate.c -fsyntax-only
     627        $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror
    628628
    629629.validate.c:
  • tests/pybin/settings.py

    ra5121bf r575a6e5  
    2929        }
    3030
     31        CrossCompileFlags = {
     32                'x64' : 'ARCH_FLAGS=-m64',
     33                'x86' : 'ARCH_FLAGS=-m32',
     34        }
     35
    3136        def __init__(self, arch):
     37                try:
     38                        canonical_host = Architecture.makeCanonical( config.HOSTARCH )
     39                except KeyError:
     40                        print("Unkown host architecture %s" % config.HOSTARCH, file=sys.stderr)
     41                        sys.exit(1)
     42
    3243                if arch:
     44                        try:
     45                                arch = Architecture.makeCanonical( arch )
     46                        except KeyError:
     47                                print("Unkown architecture %s" % arch, file=sys.stderr)
     48                                sys.exit(1)
     49
     50                if arch and arch != canonical_host:
     51                        self.target = arch
    3352                        self.cross_compile = True
    34                         try:
    35                                 self.target = Architecture.makeCanonical( arch )
     53                        try :
     54                                self.flags = Architecture.CrossCompileFlags[arch]
    3655                        except KeyError:
    37                                 print("Unkown architecture %s" % arch)
     56                                print("Cross compilation not available for architecture %s" % arch, file=sys.stderr)
    3857                                sys.exit(1)
     58
    3959                else:
     60                        self.target = canonical_host
    4061                        self.cross_compile = False
    41                         try:
    42                                 arch = config.HOSTARCH
    43                                 self.target = Architecture.makeCanonical( arch )
    44                         except KeyError:
    45                                 print("Running on unkown architecture %s" % arch)
    46                                 sys.exit(1)
     62                        self.flags = ""
    4763
    4864                self.string = self.target
     
    6581        def __init__(self, value):
    6682                self.string = "debug" if value else "no debug"
    67                 self.flags  = """DEBUG_FLAGS="%s" """ % ("-debug" if value else "-nodebug")
     83                self.flags  = """DEBUG_FLAGS="%s" """ % ("-debug -O0" if value else "-nodebug -O2")
    6884
    6985class Install:
     
    98114                with open (".validate.err", "r") as myfile:
    99115                        error=myfile.read()
    100                 print('ERROR: Invalid configuration', file=sys.stderr)
     116                print("ERROR: Invalid configuration %s:%s" % (arch.string, debug.string), file=sys.stderr)
    101117                print("       verify returned : \n%s" % error, file=sys.stderr)
    102118                tools.rm("%s/.validate.err" % BUILDDIR)
  • tests/pybin/tools.py

    ra5121bf r575a6e5  
    101101                '-s' if silent else '',
    102102                test_param,
     103                settings.arch.flags,
    103104                settings.debug.flags,
    104105                settings.install.flags,
  • tests/test.py

    ra5121bf r575a6e5  
    9898        parser.add_argument('tests', metavar='test', type=str, nargs='*', help='a list of tests to run')
    9999
    100         options =  parser.parse_args()
     100        try:
     101                options =  parser.parse_args()
     102        except:
     103                print('ERROR: invalid arguments', file=sys.stderr)
     104                parser.print_help(sys.stderr)
     105                sys.exit(1)
    101106
    102107        # script must have at least some tests to run or be listing
Note: See TracChangeset for help on using the changeset viewer.