Modula-2, testsuite: Remove use of concatenated paths.
The original implementation for Modula-2 search paths allows things like '-I/path/a:/path/b'. Such paths are not compatible with the rest of the compiler (in particular, the preprocessor, which Modula-2 uses). In preparation for removing that idiom, this patch rewrites the cases in the testsuite and removes string processing where possible from lists of paths. TODO: There are some apparent discrepancies and/or extraneous insertions of partial include paths (especially in gm2_init_log, gm2_init_iso and gm2_init_pim) - to be handled in some future patch. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/testsuite/ChangeLog: * gm2/case/pass/case-pass.exp: Update for removal of concatenated paths. * gm2/complex/pass/complex-pass.exp: Likewise. * gm2/coroutines/pim/run/pass/coroutines-pim-run-pass.exp: Likewise. * gm2/iso/analysis/fail/iso-analysis-fail.exp: Likewise. * gm2/iso/check/fail/iso-check-fail.exp: Likewise. * gm2/iso/fail/iso-fail.exp: Likewise. * gm2/iso/pass/iso-pass.exp: Likewise. * gm2/isolib/run/pass/isolib-run-pass.exp: Likewise. * gm2/pim/fail/pim-fail.exp: Likewise. * gm2/pim/pass/pim-pass.exp: Likewise. * gm2/pimlib/logitech/run/pass/pimlib-logitech-run-pass.exp: Likewise. * gm2/pimlib/pass/pimlib-pass.exp: Likewise. * gm2/pimlib/run/pass/pimlib-run-pass.exp: Likewise. * gm2/projects/iso/run/pass/halma/projects-iso-run-pass-halma.exp: Likewise. * gm2/projects/iso/run/pass/hello/projects-iso-run-pass-hello.exp: Likewise. * gm2/projects/log/run/pass/hello/projects-log-run-pass-hello.exp: Likewise. * gm2/projects/pim/run/pass/hello/projects-pim-run-pass-hello.exp: Likewise. * gm2/recover/pass/recover-pass.exp: Likewise. * gm2/switches/makeall/fail/switches-makeall-fail.exp: Likewise. * gm2/switches/makeall/pass/switches-makeall-pass.exp: Likewise. * gm2/switches/none/run/pass/gm2-none.exp: Likewise. * gm2/switches/pim2/run/pass/switches-pim2-run-pass.exp: Likewise. * gm2/ulmlib/pass/ulmlib-pass.exp: Likewise. * gm2/ulmlib/std/pass/ulmlib-std-pass.exp: Likewise. * gm2/ulmlib/sys/pass/ulmlib-sys-pass.exp: Likewise. * lib/gm2.exp: Make the paths list a mandatory entry for each gm2_init_xxx function. Remove the use of concatenated include and library paths. Remove string processing where possible.
This commit is contained in:
parent
c517295940
commit
844eab81da
26 changed files with 198 additions and 174 deletions
|
@ -25,7 +25,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_pim ${srcdir}/gm2/case/pass;
|
||||
gm2_init_pim "${srcdir}/gm2/case/pass"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -25,7 +25,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_iso
|
||||
gm2_init_iso ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -28,7 +28,7 @@ load_lib timeout-dg.exp
|
|||
|
||||
set gm2src ${srcdir}/../gm2
|
||||
|
||||
gm2_init_cor
|
||||
gm2_init_cor ""
|
||||
|
||||
# We should be able to compile, link or run in 15 seconds.
|
||||
gm2_push_timeout 15
|
||||
|
|
|
@ -24,7 +24,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_iso ${srcdir}/gm2/iso/fail:${srcdir}/gm2/iso/pass "-fsoft-check-all -O2"
|
||||
gm2_init_iso "${srcdir}/gm2/iso/fail:${srcdir}/gm2/iso/pass" "-fsoft-check-all -O2"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -44,7 +44,7 @@ set TORTURE_OPTIONS [list \
|
|||
{ -O3 -fsoft-check-all } \
|
||||
{ -O3 -g -fsoft-check-all } ]
|
||||
|
||||
gm2_init_iso ${srcdir}/gm2/iso/check/fail
|
||||
gm2_init_iso "${srcdir}/gm2/iso/check/fail"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -24,7 +24,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_iso ${srcdir}/gm2/iso/fail:${srcdir}/gm2/iso/pass
|
||||
gm2_init_iso "${srcdir}/gm2/iso/fail ${srcdir}/gm2/iso/pass"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -24,7 +24,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_iso ${srcdir}/gm2/iso/pass -fcpp;
|
||||
gm2_init_iso "${srcdir}/gm2/iso/pass" -fcpp
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -27,7 +27,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../gm2
|
||||
|
||||
gm2_init_iso "-I${srcdir}/gm2/iso/run/pass"
|
||||
gm2_init_iso "${srcdir}/gm2/iso/run/pass"
|
||||
|
||||
set cmd [exec cp $srcdir/$subdir/testinput .]
|
||||
set cmd [exec cp $srcdir/$subdir/testnumber .]
|
||||
|
|
|
@ -24,7 +24,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_pim "${srcdir}/gm2/pim/fail:${srcdir}/gm2/pim/pass"
|
||||
gm2_init_pim "${srcdir}/gm2/pim/fail ${srcdir}/gm2/pim/pass"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -26,7 +26,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_log "${srcdir}/gm2/pim/pass:${gm2src}/gm2-compiler:${gm2src}/gm2-gcc"
|
||||
gm2_init_log "${srcdir}/gm2/pim/pass ${gm2src}/gm2-compiler ${gm2src}/gm2-gcc"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -27,7 +27,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_log
|
||||
gm2_init_log ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -25,7 +25,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_log
|
||||
gm2_init_log ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/../gm2/gm2-libs-pim/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -27,7 +27,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_log
|
||||
gm2_init_log ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -27,7 +27,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_iso
|
||||
gm2_init_iso ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -27,7 +27,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_iso
|
||||
gm2_init_iso ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -27,8 +27,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
# gm2_link_lib "m2log m2pim m2iso"
|
||||
gm2_init_log
|
||||
gm2_init_log ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -27,7 +27,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_pim
|
||||
gm2_init_pim ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -25,7 +25,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_log
|
||||
gm2_init_log ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/../gm2/gm2-libs-pim/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -29,7 +29,7 @@ load_lib gm2-torture.exp
|
|||
# attempts to use gm2 -fmakeall to build a syntactally incorrect program.
|
||||
#
|
||||
|
||||
gm2_init "-I$srcdir/../gm2/gm2-libs:$srcdir/gm2/switches/makeall/fail -fmakeall"
|
||||
gm2_init "$srcdir/../gm2/gm2-libs $srcdir/gm2/switches/makeall/fail" -fmakeall
|
||||
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
|
|
|
@ -24,7 +24,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init "-I${srcdir}/gm2/switches/makeall/pass" -fmakeall
|
||||
gm2_init "${srcdir}/gm2/switches/makeall/pass" -fmakeall
|
||||
gm2_init_pim4 "${srcdir}/gm2/switches/makeall/pass"
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
|
|
|
@ -26,7 +26,7 @@ load_lib gm2-simple.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_pim
|
||||
gm2_init_pim ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -27,7 +27,7 @@ load_lib gm2-torture.exp
|
|||
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
gm2_init_pim2
|
||||
gm2_init_pim2 ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -25,7 +25,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_ulm
|
||||
gm2_init_ulm ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/../gm2/ulm-lib-gm2/sys/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -25,7 +25,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_ulm
|
||||
gm2_init_ulm ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/../gm2/ulm-lib-gm2/std/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -25,7 +25,7 @@ if $tracelevel then {
|
|||
# load support procs
|
||||
load_lib gm2-torture.exp
|
||||
|
||||
gm2_init_ulm
|
||||
gm2_init_ulm ""
|
||||
|
||||
foreach testcase [lsort [glob -nocomplain $srcdir/../gm2/ulm-lib-gm2/sys/*.mod]] {
|
||||
# If we're only testing specific files and this isn't one of them, skip it.
|
||||
|
|
|
@ -65,22 +65,22 @@ proc gm2_pop_timeout { } {
|
|||
proc default_gcc_version { } {
|
||||
global GCC_UNDER_TEST
|
||||
|
||||
gm2_init;
|
||||
gm2_init
|
||||
|
||||
# ignore any arguments after the command
|
||||
set compiler [lindex $GCC_UNDER_TEST 0]
|
||||
|
||||
if ![is_remote host] {
|
||||
set compiler_name [which $compiler];
|
||||
set compiler_name [which $compiler]
|
||||
} else {
|
||||
set compiler_name $compiler;
|
||||
set compiler_name $compiler
|
||||
}
|
||||
|
||||
# verify that the compiler exists
|
||||
if { $compiler_name != 0 } then {
|
||||
set tmp [remote_exec host "$compiler --version"]
|
||||
set status [lindex $tmp 0];
|
||||
set output [lindex $tmp 1];
|
||||
set status [lindex $tmp 0]
|
||||
set output [lindex $tmp 1]
|
||||
regexp "version.*$" $output version
|
||||
if { $status == 0 && [info exists version] } then {
|
||||
clone_output "$compiler_name $version\n"
|
||||
|
@ -98,7 +98,7 @@ proc default_gcc_version { } {
|
|||
#
|
||||
|
||||
proc gcc_version { } {
|
||||
default_gcc_version;
|
||||
default_gcc_version
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -108,64 +108,64 @@ proc gcc_version { } {
|
|||
# make some enhancements without having to go back and rewrite the scripts.
|
||||
#
|
||||
|
||||
set gm2_initialized 0;
|
||||
set gm2_compile_method "default";
|
||||
set gm2_link_path "";
|
||||
set gm2_link_libraries "m2pim m2iso";
|
||||
set gm2_link_objects "";
|
||||
set gm2_initialized 0
|
||||
set gm2_compile_method "default"
|
||||
set gm2_link_path ""
|
||||
set gm2_link_libraries "m2pim m2iso"
|
||||
set gm2_link_objects ""
|
||||
|
||||
proc gm2_set_compile_method { arg } {
|
||||
global gm2_compile_method;
|
||||
global gm2_compile_method
|
||||
|
||||
send_log "********************************************\n"
|
||||
send_log "**** setting gm2_compile_method to $arg ****\n"
|
||||
send_log "********************************************\n"
|
||||
set gm2_compile_method $arg;
|
||||
set gm2_compile_method $arg
|
||||
}
|
||||
|
||||
|
||||
proc gm2_init { args } {
|
||||
global tmpdir;
|
||||
global objdir;
|
||||
global rootme;
|
||||
global base_dir;
|
||||
global tool_root_dir;
|
||||
global gluefile wrap_flags;
|
||||
global gm2_initialized;
|
||||
global GCC_UNDER_TEST;
|
||||
global TOOL_EXECUTABLE;
|
||||
global gm2_link_libraries;
|
||||
global gm2_link_objects;
|
||||
global gm2_link_path;
|
||||
global HAVE_LIBSTDCXX_V3;
|
||||
global tmpdir
|
||||
global objdir
|
||||
global rootme
|
||||
global base_dir
|
||||
global tool_root_dir
|
||||
global gluefile wrap_flags
|
||||
global gm2_initialized
|
||||
global GCC_UNDER_TEST
|
||||
global TOOL_EXECUTABLE
|
||||
global gm2_link_libraries
|
||||
global gm2_link_objects
|
||||
global gm2_link_path
|
||||
global HAVE_LIBSTDCXX_V3
|
||||
|
||||
if { $gm2_initialized == 1 } { return; }
|
||||
if { $gm2_initialized == 1 } { return }
|
||||
|
||||
set gm2_link_objects "";
|
||||
set GCC_UNDER_TEST [lookfor_file $rootme gm2];
|
||||
append GCC_UNDER_TEST " " -B[file dirname $rootme]/gcc " " ${args};
|
||||
set gm2_link_objects ""
|
||||
set GCC_UNDER_TEST [lookfor_file $rootme gm2]
|
||||
append GCC_UNDER_TEST " " -B[file dirname $rootme]/gcc " " ${args}
|
||||
append GCC_UNDER_TEST " " -fno-diagnostics-show-caret
|
||||
append GCC_UNDER_TEST " " -fno-diagnostics-show-line-numbers
|
||||
append GCC_UNDER_TEST " " -fdiagnostics-color=never
|
||||
send_log "GCC_UNDER_TEST is ${GCC_UNDER_TEST}\n"
|
||||
|
||||
if ![info exists tmpdir] then {
|
||||
set tmpdir /tmp;
|
||||
set tmpdir /tmp
|
||||
}
|
||||
if {[target_info needs_status_wrapper] != "" && \
|
||||
[target_info needs_status_wrapper] != "0" && \
|
||||
![info exists gluefile]} {
|
||||
set gluefile ${tmpdir}/gcc-testglue.o;
|
||||
set result [build_wrapper $gluefile];
|
||||
set gluefile ${tmpdir}/gcc-testglue.o
|
||||
set result [build_wrapper $gluefile]
|
||||
if { $result != "" } {
|
||||
set gluefile [lindex $result 0];
|
||||
set wrap_flags [lindex $result 1];
|
||||
set gluefile [lindex $result 0]
|
||||
set wrap_flags [lindex $result 1]
|
||||
} else {
|
||||
unset gluefile
|
||||
}
|
||||
}
|
||||
|
||||
set gm2_link_path "[gm2_link_flags [get_multilibs]]";
|
||||
set gm2_link_path "[gm2_link_flags [get_multilibs]]"
|
||||
verbose $gm2_link_path 1
|
||||
|
||||
# Set the default timeout value, larger tests can override
|
||||
|
@ -231,7 +231,7 @@ proc gm2_target_compile_default { source dest type options } {
|
|||
#
|
||||
|
||||
proc gm2_target_compile { source dest type options } {
|
||||
global gm2_compile_method;
|
||||
global gm2_compile_method
|
||||
|
||||
return [gm2_target_compile_${gm2_compile_method} $source $dest $type $options]
|
||||
}
|
||||
|
@ -242,9 +242,9 @@ proc gm2_target_compile { source dest type options } {
|
|||
#
|
||||
|
||||
proc gm2_link_lib { libraries } {
|
||||
global gm2_link_libraries;
|
||||
global gm2_link_libraries
|
||||
|
||||
set gm2_link_libraries $libraries;
|
||||
set gm2_link_libraries $libraries
|
||||
}
|
||||
|
||||
|
||||
|
@ -253,9 +253,9 @@ proc gm2_link_lib { libraries } {
|
|||
#
|
||||
|
||||
proc gm2_link_obj { objects } {
|
||||
global gm2_link_objects;
|
||||
global gm2_link_objects
|
||||
|
||||
set gm2_link_objects $objects;
|
||||
set gm2_link_objects $objects
|
||||
}
|
||||
|
||||
|
||||
|
@ -264,10 +264,10 @@ proc gm2_link_obj { objects } {
|
|||
#
|
||||
|
||||
proc gm2_link_flags { paths } {
|
||||
global srcdir;
|
||||
global ld_library_path;
|
||||
global gccpath;
|
||||
global gm2_link_libraries;
|
||||
global srcdir
|
||||
global ld_library_path
|
||||
global gccpath
|
||||
global gm2_link_libraries
|
||||
|
||||
set gccpath ${paths}
|
||||
set libio_dir ""
|
||||
|
@ -329,31 +329,37 @@ proc gm2_link_flags { paths } {
|
|||
#
|
||||
#
|
||||
|
||||
proc gm2_init_pimx { dialect {path ""} args } {
|
||||
global srcdir;
|
||||
global gccpath;
|
||||
proc gm2_init_pimx { dialect paths args } {
|
||||
global srcdir
|
||||
global gccpath
|
||||
|
||||
set gm2src ${srcdir}/../m2;
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
|
||||
send_log "srcdir is $srcdir\n"
|
||||
send_log "gccpath is $gccpath\n"
|
||||
send_log "gm2src is $gm2src\n"
|
||||
|
||||
set pimIpath "${gccpath}/libgm2/libm2pim:${gm2src}/gm2-libs";
|
||||
set pimLpath "${gccpath}/libgm2/libm2pim/.libs";
|
||||
set theIpath -I${gccpath}/libgm2/libm2pim
|
||||
lappend theIpath -I${gm2src}/gm2-libs-pim
|
||||
|
||||
set isoIpath "${gccpath}/libgm2/libm2iso:${gm2src}/gm2-libs-iso";
|
||||
set isoLpath "${gccpath}/libgm2/libm2iso/.libs";
|
||||
# NOTE:
|
||||
lappend theIpath -I${gm2src}/gm2-libs
|
||||
|
||||
set theLpath -L${gccpath}/libgm2/libm2pim/.libs
|
||||
|
||||
set theIpath "-I${pimIpath} -I${isoIpath}";
|
||||
set theLpath "-L${pimLpath} -L${isoLpath}";
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2iso
|
||||
lappend theIpath -I${gm2src}/gm2-libs-iso
|
||||
|
||||
if { $path != "" } then {
|
||||
append theIpath " -I"
|
||||
append theIpath ${path}
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2iso/.libs
|
||||
|
||||
foreach p $paths {
|
||||
lappend theIpath -I$p
|
||||
}
|
||||
|
||||
gm2_link_lib "m2pim m2iso"
|
||||
gm2_init {*}${theIpath} {*}${dialect} {*}${theLpath} {*}${args};
|
||||
lappend args -fno-libs=-
|
||||
gm2_init {*}${theIpath} {*}${dialect} {*}${theLpath} {*}${args}
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -361,8 +367,8 @@ proc gm2_init_pimx { dialect {path ""} args } {
|
|||
#
|
||||
#
|
||||
|
||||
proc gm2_init_pim { {path ""} args } {
|
||||
gm2_init_pimx -fpim {*}${path} {*}${args};
|
||||
proc gm2_init_pim { paths args } {
|
||||
gm2_init_pimx -fpim $paths {*}${args}
|
||||
}
|
||||
|
||||
|
||||
|
@ -371,8 +377,8 @@ proc gm2_init_pim { {path ""} args } {
|
|||
# It uses the PIM2 dialect.
|
||||
#
|
||||
|
||||
proc gm2_init_pim2 { {path ""} args } {
|
||||
gm2_init_pimx -fpim2 {*}${path} {*}${args};
|
||||
proc gm2_init_pim2 { paths args } {
|
||||
gm2_init_pimx -fpim2 $paths {*}${args}
|
||||
}
|
||||
|
||||
|
||||
|
@ -381,8 +387,8 @@ proc gm2_init_pim2 { {path ""} args } {
|
|||
# It uses the PIM3 dialect.
|
||||
#
|
||||
|
||||
proc gm2_init_pim3 { {path ""} args } {
|
||||
gm2_init_pimx -fpim3 {*}${path} {*}${args};
|
||||
proc gm2_init_pim3 { paths args } {
|
||||
gm2_init_pimx -fpim3 $paths {*}${args}
|
||||
}
|
||||
|
||||
|
||||
|
@ -391,8 +397,8 @@ proc gm2_init_pim3 { {path ""} args } {
|
|||
# It uses the PIM4 dialect.
|
||||
#
|
||||
|
||||
proc gm2_init_pim4 { {path ""} args } {
|
||||
gm2_init_pimx -fpim4 {*}${path} {*}${args};
|
||||
proc gm2_init_pim4 { paths args } {
|
||||
gm2_init_pimx -fpim4 $paths {*}${args}
|
||||
}
|
||||
|
||||
|
||||
|
@ -400,60 +406,70 @@ proc gm2_init_pim4 { {path ""} args } {
|
|||
# gm2_init_iso - set the default libraries to choose ISO and then PIM.
|
||||
#
|
||||
|
||||
proc gm2_init_iso { {path ""} args } {
|
||||
global srcdir;
|
||||
global gccpath;
|
||||
proc gm2_init_iso { paths args } {
|
||||
global srcdir
|
||||
global gccpath
|
||||
|
||||
set gm2src ${srcdir}/../m2;
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
set isoIpath "${gccpath}/libgm2/libm2iso:${gm2src}/gm2-libs-iso";
|
||||
set pimIpath "${gccpath}/libgm2/libm2pim:${gm2src}/gm2-libs";
|
||||
set theIpath -I${gccpath}/libgm2/libm2iso
|
||||
lappend theIpath -I${gm2src}/gm2-libs-iso
|
||||
|
||||
set isoLpath "${gccpath}/libgm2/libm2iso/.libs";
|
||||
set pimLpath "${gccpath}/libgm2/libm2pim/.libs";
|
||||
set theLpath -L${gccpath}/libgm2/libm2iso/.libs
|
||||
|
||||
set corIpath "${gccpath}/libgm2/libm2cor:${gm2src}/gm2-libs-coroutines";
|
||||
set corLpath "${gccpath}/libgm2/libm2cor/.libs";
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2pim
|
||||
lappend theIpath -I${gm2src}/gm2-libs-pim
|
||||
|
||||
set theIpath "-I${isoIpath} -I${corIpath} -I${pimIpath}";
|
||||
set theLpath "-L${isoLpath} -L${corLpath} -L${pimLpath}";
|
||||
# NOTE:
|
||||
lappend theIpath -I${gm2src}/gm2-libs
|
||||
|
||||
if { $path != "" } then {
|
||||
append theIpath " -I"
|
||||
append theIpath ${path}
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2pim/.libs
|
||||
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2cor
|
||||
lappend theIpath -I${gm2src}/gm2-libs-coroutines
|
||||
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2cor/.libs
|
||||
|
||||
foreach p $paths {
|
||||
lappend theIpath -I$p
|
||||
}
|
||||
|
||||
gm2_link_lib "m2iso m2pim m2cor"
|
||||
gm2_init {*}${theIpath} -fiso {*}${theLpath} {*}${args};
|
||||
lappend args -fno-libs=-
|
||||
gm2_init {*}${theIpath} -fiso {*}${theLpath} {*}${args}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# gm2_init_ulm - set the default libraries to choose the ULM and PIM libraries.
|
||||
#
|
||||
|
||||
proc gm2_init_ulm { {path ""} args } {
|
||||
global srcdir;
|
||||
global gccpath;
|
||||
proc gm2_init_ulm { paths args } {
|
||||
global srcdir
|
||||
global gccpath
|
||||
|
||||
set gm2src ${srcdir}/../m2;
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
set ulmIpath "${gccpath}/libgm2/libm2ulm:${gm2src}/ulm-lib-gm2/std:${gm2src}/ulm-lib-gm2/sys";
|
||||
set ulmLpath "${gccpath}/libgm2/libm2ulm/.libs";
|
||||
set theIpath -I${gccpath}/libgm2/libm2ulm
|
||||
lappend theIpath -I${gm2src}/ulm-lib-gm2/std
|
||||
lappend theIpath -I${gm2src}/ulm-lib-gm2/sys
|
||||
|
||||
set pimIpath "${gccpath}/libgm2/libm2pim:${gm2src}/gm2-libs";
|
||||
set pimLpath "${gccpath}/libgm2/libm2pim/.libs";
|
||||
set theLpath -L${gccpath}/libgm2/libm2ulm/.libs
|
||||
|
||||
set theIpath "-I${ulmIpath} -I${pimIpath}";
|
||||
set theLpath "-L${ulmLpath} -L${pimLpath}";
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2pim
|
||||
lappend theIpath -I${gm2src}/gm2-libs-pim
|
||||
|
||||
if { $path != "" } then {
|
||||
append theIpath " -I"
|
||||
append theIpath ${path}
|
||||
# NOTE:
|
||||
lappend theIpath -I${gm2src}/gm2-libs
|
||||
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2pim/.libs
|
||||
|
||||
foreach p $paths {
|
||||
lappend theIpath -I$p
|
||||
}
|
||||
|
||||
gm2_link_lib "m2ulm m2pim"
|
||||
gm2_init {*}${theIpath} -fpim {*}${theLpath} {*}${args};
|
||||
lappend args -fno-libs=-
|
||||
gm2_init {*}${theIpath} -fpim {*}${theLpath} {*}${args}
|
||||
}
|
||||
|
||||
|
||||
|
@ -462,35 +478,40 @@ proc gm2_init_ulm { {path ""} args } {
|
|||
#
|
||||
#
|
||||
|
||||
proc gm2_init_log { {path ""} args } {
|
||||
global srcdir;
|
||||
global gccpath;
|
||||
proc gm2_init_log { paths args } {
|
||||
global srcdir
|
||||
global gccpath
|
||||
|
||||
set gm2src ${srcdir}/../m2;
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
send_log "srcdir is $srcdir\n"
|
||||
send_log "gccpath is $gccpath\n"
|
||||
send_log "gm2src is $gm2src\n"
|
||||
|
||||
set logIpath "${gccpath}/libgm2/libm2log:${gm2src}/gm2-libs-pim";
|
||||
set logLpath "${gccpath}/libgm2/libm2log/.libs";
|
||||
# FIXME: this seems to interleave the library defs.
|
||||
set theIpath -I${gccpath}/libgm2/libm2log
|
||||
lappend theIpath -I${gm2src}/gm2-libs-pim
|
||||
|
||||
set theLpath -L${gccpath}/libgm2/libm2log/.libs
|
||||
|
||||
set pimIpath "${gccpath}/libgm2/libm2pim:${gm2src}/gm2-libs";
|
||||
set pimLpath "${gccpath}/libgm2/libm2pim/.libs";
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2pim
|
||||
lappend theIpath -I${gm2src}/gm2-libs
|
||||
|
||||
set isoIpath "${gccpath}/libgm2/libm2iso:${gm2src}/gm2-libs-iso";
|
||||
set pimIpath "${gccpath}/libgm2/libm2pim:${gm2src}/gm2-libs";
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2pim/.libs
|
||||
|
||||
set theIpath "-I${logIpath} -I${pimIpath} -I${isoIpath}";
|
||||
set theLpath "-L${logLpath} -L${pimLpath}";
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2iso
|
||||
lappend theIpath -I${gm2src}/gm2-libs-iso
|
||||
# ??? lappend theIpath -I${gm2src}/gm2-libs
|
||||
|
||||
if { $path != "" } then {
|
||||
append theIpath " -I"
|
||||
append theIpath ${path}
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2iso/.libs
|
||||
|
||||
foreach p $paths {
|
||||
lappend theIpath -I$p
|
||||
}
|
||||
|
||||
gm2_link_lib "m2log m2pim m2iso"
|
||||
gm2_init {*}${theIpath} -fpim {*}${theLpath} {*}${args};
|
||||
lappend args -fno-libs=-
|
||||
gm2_init {*}${theIpath} -fpim {*}${theLpath} {*}${args}
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -498,39 +519,44 @@ proc gm2_init_log { {path ""} args } {
|
|||
#
|
||||
#
|
||||
|
||||
proc gm2_init_cor { {path ""} args } {
|
||||
global srcdir;
|
||||
global gccpath;
|
||||
global gm2_link_libraries;
|
||||
proc gm2_init_cor { paths args } {
|
||||
global srcdir
|
||||
global gccpath
|
||||
global gm2_link_libraries
|
||||
|
||||
set gm2src ${srcdir}/../m2;
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
send_log "srcdir is $srcdir\n"
|
||||
send_log "gccpath is $gccpath\n"
|
||||
send_log "gm2src is $gm2src\n"
|
||||
|
||||
set corIpath "${gccpath}/libgm2/libm2cor:${gm2src}/gm2-libs-coroutines";
|
||||
set corLpath "${gccpath}/libgm2/libm2cor/.libs";
|
||||
set theIpath -I${gccpath}/libgm2/libm2cor
|
||||
lappend theIpath -I${gm2src}/gm2-libs-coroutines
|
||||
|
||||
set pimIpath "${gccpath}/libgm2/libm2pim:${gm2src}/gm2-libs";
|
||||
set pimLpath "${gccpath}/libgm2/libm2pim/.libs";
|
||||
set theLpath -L${gccpath}/libgm2/libm2cor/.libs
|
||||
|
||||
set isoIpath "${gccpath}/libgm2/libm2iso:${gm2src}/gm2-libs-iso";
|
||||
set isoLpath "${gccpath}/libgm2/libm2iso/.libs";
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2pim
|
||||
lappend theIpath -I${gm2src}/gm2-libs-pim
|
||||
|
||||
set logIpath "${gccpath}/libgm2/libm2log:${gm2src}/gm2-libs-pim";
|
||||
set logLpath "${gccpath}/libgm2/libm2log/.libs";
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2pim/.libs
|
||||
|
||||
set theIpath "-I${corIpath} -I${pimIpath} -I${logIpath} -I${isoIpath}";
|
||||
set theLpath "-L${corLpath} -L${pimLpath} -L${logLpath} -L${isoLpath}";
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2log
|
||||
lappend theIpath -I${gm2src}/gm2-libs
|
||||
|
||||
if { $path != "" } then {
|
||||
append theIpath " -I"
|
||||
append theIpath ${path}
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2log/.libs
|
||||
|
||||
lappend theIpath -I${gccpath}/libgm2/libm2iso
|
||||
lappend theIpath -I${gm2src}/gm2-libs-iso
|
||||
|
||||
lappend theLpath -L${gccpath}/libgm2/libm2iso/.libs
|
||||
|
||||
foreach p $paths {
|
||||
lappend theIpath -I$p
|
||||
}
|
||||
|
||||
gm2_link_lib "m2cor m2pim m2iso"
|
||||
gm2_init {*}${theIpath} -fpim {*}${theLpath} {*}${args};
|
||||
gm2_link_lib "m2cor m2pim m2log m2iso"
|
||||
append args " -fno-libs=- "
|
||||
gm2_init {*}${theIpath} -fpim {*}${theLpath} {*}${args}
|
||||
}
|
||||
|
||||
|
||||
|
@ -540,28 +566,27 @@ proc gm2_init_cor { {path ""} args } {
|
|||
#
|
||||
#
|
||||
|
||||
proc gm2_init_minx { dialect {path ""} args } {
|
||||
global srcdir;
|
||||
global gccpath;
|
||||
set gm2src ${srcdir}/../m2;
|
||||
proc gm2_init_minx { dialect paths args } {
|
||||
global srcdir
|
||||
global gccpath
|
||||
set gm2src ${srcdir}/../m2
|
||||
|
||||
send_log "srcdir is $srcdir\n"
|
||||
send_log "gccpath is $gccpath\n"
|
||||
send_log "gm2src is $gm2src\n"
|
||||
|
||||
set theIpath " -I${gccpath}/libgm2/libm2min"
|
||||
append theIpath " -I${gm2src}/gm2-libs-min"
|
||||
set theIpath -I${gccpath}/libgm2/libm2min
|
||||
lappend theIpath -I${gm2src}/gm2-libs-min
|
||||
|
||||
set theLpath " -L${gccpath}/libgm2/libm2min/.libs";
|
||||
set theLpath -L${gccpath}/libgm2/libm2min/.libs
|
||||
|
||||
if { $path != "" } then {
|
||||
append theIpath " -I"
|
||||
append theIpath ${path}
|
||||
foreach p $paths {
|
||||
lappend theIpath -I$p
|
||||
}
|
||||
|
||||
gm2_link_lib "m2min"
|
||||
append args " -fno-exceptions "
|
||||
append args " -fno-libs=- "
|
||||
lappend args -fno-exceptions
|
||||
lappend args -fno-libs=-
|
||||
gm2_init {*}${theIpath} {*}${dialect} {*}${theLpath} {*}${args}
|
||||
}
|
||||
|
||||
|
@ -570,6 +595,6 @@ proc gm2_init_minx { dialect {path ""} args } {
|
|||
# and pim dialect.
|
||||
#
|
||||
|
||||
proc gm2_init_min { {path ""} args } {
|
||||
gm2_init_minx -fpim {*}${path} {*}${args}
|
||||
proc gm2_init_min { paths args } {
|
||||
gm2_init_minx -fpim $paths {*}${args}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue