Skip to content

Commit

Permalink
Merge branch 'master' into cmm
Browse files Browse the repository at this point in the history
  • Loading branch information
atzedijkstra committed Mar 4, 2014
2 parents 2a5a7d3 + aade7de commit 7122957
Show file tree
Hide file tree
Showing 13 changed files with 284 additions and 178 deletions.
20 changes: 20 additions & 0 deletions EHC/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
autom4te.cache

*.hi
*.core
*.grin

*.exp*
*.reg*

www/

.DS_Store

config.*

install*/
build*/
t/
doc/
klad*
182 changes: 109 additions & 73 deletions EHC/configure
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,6 @@ llvmOpt
LLVM_AS_CMD
llvmAs
CPP_CMD
cppCmd
CC_STD_FLAG
OBJEXT
EXEEXT
Expand Down Expand Up @@ -725,6 +724,7 @@ AR_CMD
arCmd
RANLIB_CMD
ranlibCmd
cppCmd
ENABLE_TAUPHI
ENABLE_CORESYSF
ENABLE_TYCORE
Expand Down Expand Up @@ -812,6 +812,7 @@ enable_clr
enable_tycore
enable_coresysf
enable_tauphi
with_cpp
with_build_suffix
with_gcc_ehc_options
with_cpp_ehc_options
Expand All @@ -828,7 +829,6 @@ with_haddock
with_uuagc
with_shuffle
with_gcc
with_cpp
with_llvm_as
with_opt
with_llc
Expand Down Expand Up @@ -1470,14 +1470,17 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-cpp=<cpp preprocessor>
Use a command different from 'cpp' to compile with
CPP.
--with-build-suffix=<suffix for build locations>
Suffix for build locations and library names of
globally visible cabal managed libraries.
--with-gcc-ehc-options=<gcc compiler options for compiling runtime and ehc's gcc invocation>
Additional options to pass to GCC when compiling
with EHC.
--with-cpp-ehc-options=<cpp preprocessor options for ehc's cpp invocation>
Additional options to pass to GCC when compiling
Additional options to pass to CPP when compiling
with EHC.
--with-shuffle-ehc-options=<shuffle options for compiling ehc>
Additional options to pass to SHUFFLE when compiling
Expand Down Expand Up @@ -1517,9 +1520,6 @@ Optional Packages:
--with-gcc=<gcc compiler>
Use a command different from 'gcc' to compile with
GCC.
--with-cpp=<cpp preprocessor>
Use a command different from 'cpp' to compile with
CPP.
--with-llvm-as=<LLVM Assembler>
Path to the LLVM Assembler
--with-llvm-opt=<LLVM bitcode optimizer>
Expand Down Expand Up @@ -2752,6 +2752,20 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
HostPlatform=`/bin/sh $srcdir/config.sub $host` || exit 1
### check whether we are indeed in the toplevel dir, otherwise copy required stuff to the current dir first
if test "${srcdir}" != "." -a "${srcdir}" != ""
then
# copy all the relevant stuff
echo "copying from: ${srcdir}"
for stuff in Makefile LICENSE VERSION mk test bin ehclib extlibs src
do
echo "copying into builddir: ${stuff}"
d=`dirname ${stuff}`
rsync --archive --update --exclude='.*' ${srcdir}/${stuff} ${d}
done
fi
### Version info, extract from file VERSION
# big change
EH_VERSION_MAJOR=`awk -F . '{print $1}' VERSION`
Expand Down Expand Up @@ -3132,6 +3146,79 @@ fi
ENABLE_TAUPHI=$enableTauPhi
### cpp
# Check whether --with-cpp was given.
if test "${with_cpp+set}" = set; then :
withval=$with_cpp; cppCmd="$withval"
else
if test "$CPP" = ""; then
# Extract the first word of "cpp", so it can be a program name with args.
set dummy cpp; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_cppCmd+:} false; then :
$as_echo_n "(cached) " >&6
else
case $cppCmd in
[\\/]* | ?:[\\/]*)
ac_cv_path_cppCmd="$cppCmd" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_cppCmd="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
cppCmd=$ac_cv_path_cppCmd
if test -n "$cppCmd"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cppCmd" >&5
$as_echo "$cppCmd" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
else
cppCmd=$CPP
fi
fi
if test "$cppCmd" != "no" -a -x "$cppCmd"; then
cppExists="yes"
cppVersion=`$cppCmd --version`
else
cppCmd=""
cppExists="no"
fi
### cpp clang specific check, turning of some options
cppVersionHasClang=`echo ${cppVersion} | grep clang`
if test "${cppVersionHasClang}" = ""; then
cppClangEhcOptions=""
gccClangEhcOptions=""
else
cppClangEhcOptions="-Wno-invalid-pp-token"
gccClangEhcOptions="-Wno-array-bounds"
fi
### ranlib
# Extract the first word of "ranlib", so it can be a program name with args.
Expand Down Expand Up @@ -3405,9 +3492,11 @@ fi
# additional platform dependend options for gcc when compiling C from within ehc
case $HostPlatform in
i*86-pc-linux-gnu )
#gccEhcOptions="$gccEhcOptions -D__USE_BSD -D__USE_POSIX"
#gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions -D__USE_BSD -D__USE_POSIX"
gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions"
;;
*)
gccEhcOptions="${gccClangEhcOptions} $gccEhcOptions"
;;
esac
Expand All @@ -3425,14 +3514,15 @@ fi
# additional platform dependend options for cpp when compiling C from within ehc
case $HostPlatform in
i*86-pc-linux-gnu )
cppEhcOptions="$cppEhcOptions -D__STDC__"
cppEhcOptions="${cppClangEhcOptions} $cppEhcOptions -D__STDC__"
#cppEhcOptions="$cppEhcOptions -D__USE_BSD -D__USE_POSIX -D__STDC__"
;;
x86_64-*-linux-gnu )
cppEhcOptions="$cppEhcOptions -D__STDC__"
cppEhcOptions="${cppClangEhcOptions} $cppEhcOptions -D__STDC__"
#cppEhcOptions="$cppEhcOptions -D__USE_BSD -D__USE_POSIX -D__STDC__"
;;
*)
cppEhcOptions="${cppClangEhcOptions}"
;;
esac
Expand Down Expand Up @@ -4897,69 +4987,6 @@ esac
CC_STD_FLAG=$cc_std_flag
# cpp
# Check whether --with-cpp was given.
if test "${with_cpp+set}" = set; then :
withval=$with_cpp; cppCmd="$withval"
else
if test "$CPP" = ""; then
# Extract the first word of "cpp", so it can be a program name with args.
set dummy cpp; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_cppCmd+:} false; then :
$as_echo_n "(cached) " >&6
else
case $cppCmd in
[\\/]* | ?:[\\/]*)
ac_cv_path_cppCmd="$cppCmd" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_cppCmd="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
cppCmd=$ac_cv_path_cppCmd
if test -n "$cppCmd"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cppCmd" >&5
$as_echo "$cppCmd" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
else
cppCmd=$CPP
fi
fi
if test "$cppCmd" != "no" -a -x "$cppCmd"; then
cppExists="yes"
cppVersion=`$cppCmd --version`
else
cppCmd=""
cppExists="no"
fi
# Now we have to deal with weird cygwin behaviour which allows /usr/bin to be used
# whereas in reality it is mapped onto /bin. Direct acccess to /usr/bin with a c:/cygwin prefix therefore does not work
# and has to be stripped of the /usr part.
Expand Down Expand Up @@ -10251,11 +10278,20 @@ echo " gcc is available? : $gccExists"
if test "x$gccExists" = "xyes" ;then
echo " version : $gccVersion"
echo " command for gcc : $gccCmd"
echo " command for cpp : $cppCmd"
echo " uhc options to gcc : $gccEhcOptions"
else
echo " **** ERROR **** : gcc must be installed, ask your OS guru"
fi
echo " cpp is available? : $cppExists"
if test "x$cppExists" = "xyes" ;then
echo " version : `echo $cppVersion`"
echo " command for cpp : $cppCmd"
echo " uhc options to cpp : $cppEhcOptions"
else
echo " **** ERROR **** : cpp must be installed, ask your OS guru"
fi
if test x$enableJava = xyes
then
echo " javac is available? : $javacExists"
Expand Down
Loading

0 comments on commit 7122957

Please sign in to comment.