diff --git a/install.sh b/install.sh index e2836ce..7efb09b 100755 --- a/install.sh +++ b/install.sh @@ -31,9 +31,9 @@ cd ${CANONICAL_SOURCE%/*} # Environment variables # -export CC_TYPE=${CC_TYPE:-gcc} -export CC=${CC:-$CC_TYPE} -export CXX=${CXX:-g++} +# export CC_TYPE=${CC_TYPE:-gcc} +# export CC=${CC:-$CC_TYPE} +# export CXX=${CXX:-g++} export LIBERTY_HOME=$(pwd) export TARGET=${TARGET:-$LIBERTY_HOME/target} export TMPDIR=${TMPDIR:-$TARGET/tmp} @@ -77,7 +77,7 @@ int main() { exit(0); } EOF - gcc -lgc $TMPDIR/check_libgc.c -o $TMPDIR/check_libgc >/dev/null 2>&1 || return 1 + ${CC} -lgc $TMPDIR/check_libgc.c -o $TMPDIR/check_libgc >/dev/null 2>&1 || return 1 if $TMPDIR/check_libgc; then return 0 else @@ -148,15 +148,10 @@ bootstrap() { bin: $TARGET/bin sys: $LIBERTY_HOME/sys short: $LIBERTY_HOME/resources/short -os: UNIX -flavor: $(if grep -qi '^cygwin' /proc/version; then - echo Cygwin -else - echo Linux -fi -) +os: ${OS} +flavor: ${flavor} tag: 3 -jobs: $((1 + $(grep '^processor' /proc/cpuinfo|wc -l))) +jobs: ${jobs} [Environment] path_liberty: $LIBERTY_HOME/ @@ -200,98 +195,98 @@ x_int: extract_internals -- smarteiffel_options: -no_strip c_compiler_type: $CC_TYPE c_compiler_path: $CC -c_compiler_options: -pipe -O2 -fno-gcse +c_compiler_options: -pipe -O2 ${CFLAGS} c_linker_path: $CC -c_linker_options: -Xlinker -${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_path: $CXX -cpp_compiler_options: -pipe -O2 -fno-gcse +cpp_compiler_options: -pipe -O2 ${CXXFLAGS} cpp_linker_path: $CC -cpp_linker_options: -Xlinker -${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [no_check] c_compiler_type: $CC_TYPE c_compiler_path: $CC -c_compiler_options: -pipe -O1 +c_compiler_options: -pipe -O1 c_linker_path: $CC -c_linker_options: -Xlinker -${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_path: $CXX cpp_compiler_options: -pipe -O1 cpp_linker_path: $CC -cpp_linker_options: -Xlinker -${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [require_check] c_compiler_type: $CC_TYPE c_compiler_path: $CC c_compiler_options: -pipe c_linker_path: $CC -c_linker_options: -Xlinker -${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_path: $CXX cpp_compiler_options: -pipe cpp_linker_path: $CC -cpp_linker_options: -Xlinker -${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [ensure_check] c_compiler_type: $CC_TYPE c_compiler_path: $CC c_compiler_options: -pipe c_linker_path: $CC -c_linker_options: -Xlinker -${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_path: $CXX cpp_compiler_options: -pipe cpp_linker_path: $CC -cpp_linker_options: -Xlinker -${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [invariant_check] c_compiler_type: $CC_TYPE c_compiler_path: $CC c_compiler_options: -pipe c_linker_path: $CC -c_linker_options: -Xlinker -${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_path: $CXX cpp_compiler_options: -pipe cpp_linker_path: $CC -cpp_linker_options: -Xlinker -${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [loop_check] c_compiler_type: $CC_TYPE c_compiler_path: $CC c_compiler_options: -pipe c_linker_path: $CC -c_linker_options: -Xlinker -${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_path: $CXX cpp_compiler_options: -pipe cpp_linker_path: $CC -cpp_linker_options: -Xlinker -${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [all_check] c_compiler_type: $CC_TYPE c_compiler_path: $CC c_compiler_options: -pipe c_linker_path: $CC -c_linker_options: -Xlinker -${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_path: $CXX cpp_compiler_options: -pipe cpp_linker_path: $CC -cpp_linker_options: -Xlinker -${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [debug_check] c_compiler_type: $CC_TYPE c_compiler_path: $CC c_compiler_options: -pipe -g c_linker_path: $CC -c_linker_options: -Xlinker -${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_path: $CXX cpp_compiler_options: -pipe -g cpp_linker_path: $CC -cpp_linker_options: -Xlinker -${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} smarteiffel_options: -no_strip EOF @@ -589,10 +584,10 @@ do_pkg_tools() { bin: /usr/lib/liberty-eiffel/bin sys: /usr/share/liberty-eiffel/sys short: /usr/share/liberty-eiffel/short -os: UNIX -flavor: Linux +os: ${OS} +flavor: ${flavor} tag: 3 -jobs: 2 +jobs: ${jobs} [Environment] hyphen: - @@ -615,68 +610,68 @@ wrap: wrappers_generator x_int: extract_internals [boost] -c_compiler_type: gcc -c_compiler_options: -pipe -O2 -fno-gcse -c_linker_options: -Xlinker -\${hyphen}no-as-needed -cpp_compiler_type: g++ -cpp_compiler_options: -pipe -O2 -fno-gcse -cpp_linker_options: -Xlinker -\${hyphen}no-as-needed +c_compiler_type: ${GCC_TYPE} +c_compiler_options: -pipe -O2 ${CFLAGS} +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} +cpp_compiler_options: -pipe -O2 ${CXXFLAGS} +cpp_linker_options: -Xlinker ${LDFLAGS} [no_check] -c_compiler_type: gcc +c_compiler_type: ${GCC_TYPE} c_compiler_options: -pipe -O1 -c_linker_options: -Xlinker -\${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_options: -pipe -O1 -cpp_linker_options: -Xlinker -\${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [require_check] -c_compiler_type: gcc +c_compiler_type: ${GCC_TYPE} c_compiler_options: -pipe -c_linker_options: -Xlinker -\${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_options: -pipe -cpp_linker_options: -Xlinker -\${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [ensure_check] -c_compiler_type: gcc +c_compiler_type: ${GCC_TYPE} c_compiler_options: -pipe -c_linker_options: -Xlinker -\${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_options: -pipe -cpp_linker_options: -Xlinker -\${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [invariant_check] -c_compiler_type: gcc +c_compiler_type: ${GCC_TYPE} c_compiler_options: -pipe -c_linker_options: -Xlinker -\${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_options: -pipe -cpp_linker_options: -Xlinker -\${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [loop_check] -c_compiler_type: gcc +c_compiler_type: ${GCC_TYPE} c_compiler_options: -pipe -c_linker_options: -Xlinker -\${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_options: -pipe -cpp_linker_options: -Xlinker -\${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [all_check] -c_compiler_type: gcc +c_compiler_type: ${GCC_TYPE} c_compiler_options: -pipe -c_linker_options: -Xlinker -\${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_options: -pipe -cpp_linker_options: -Xlinker -\${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} [debug_check] -c_compiler_type: gcc +c_compiler_type: ${GCC_TYPE} c_compiler_options: -pipe -g -c_linker_options: -Xlinker -\${hyphen}no-as-needed -cpp_compiler_type: g++ +c_linker_options: -Xlinker ${LDFLAGS} +cpp_compiler_type: ${CXX_TYPE} cpp_compiler_options: -pipe -g -cpp_linker_options: -Xlinker -\${hyphen}no-as-needed +cpp_linker_options: -Xlinker ${LDFLAGS} smarteiffel_options: -no_strip EOF diff --git a/resources/smarteiffel-germ/compile_to_c.make b/resources/smarteiffel-germ/compile_to_c.make index ad2cd05..d9c6a20 100644 --- a/resources/smarteiffel-germ/compile_to_c.make +++ b/resources/smarteiffel-germ/compile_to_c.make @@ -1,139 +1,139 @@ # Beginning of parallelizable section -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c135.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c134.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c133.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c132.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c131.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c130.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c129.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c128.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c127.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c126.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c125.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c124.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c123.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c122.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c121.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c120.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c119.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c118.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c117.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c116.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c115.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c114.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c113.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c112.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c111.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c110.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c109.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c108.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c107.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c106.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c105.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c104.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c103.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c102.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c101.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c100.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c99.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c98.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c97.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c96.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c95.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c94.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c93.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c92.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c91.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c90.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c89.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c88.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c87.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c86.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c85.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c84.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c83.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c82.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c81.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c80.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c79.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c78.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c77.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c76.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c75.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c74.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c73.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c72.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c71.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c70.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c69.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c68.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c67.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c66.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c65.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c64.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c63.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c62.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c61.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c60.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c59.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c58.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c57.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c56.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c55.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c54.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c53.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c52.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c51.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c50.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c49.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c48.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c47.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c46.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c45.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c44.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c43.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c42.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c41.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c40.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c39.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c38.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c37.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c36.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c35.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c34.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c33.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c32.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c31.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c30.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c29.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c28.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c27.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c26.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c25.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c24.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c23.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c22.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c21.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c20.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c19.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c18.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c17.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c16.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c15.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c14.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c13.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c12.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c11.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c10.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c9.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c8.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c7.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c6.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c5.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c4.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c3.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c2.c -gcc -pipe -O2 -fno-gcse -c -x c compile_to_c1.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c135.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c134.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c133.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c132.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c131.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c130.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c129.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c128.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c127.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c126.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c125.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c124.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c123.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c122.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c121.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c120.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c119.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c118.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c117.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c116.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c115.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c114.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c113.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c112.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c111.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c110.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c109.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c108.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c107.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c106.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c105.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c104.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c103.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c102.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c101.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c100.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c99.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c98.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c97.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c96.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c95.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c94.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c93.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c92.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c91.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c90.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c89.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c88.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c87.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c86.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c85.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c84.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c83.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c82.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c81.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c80.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c79.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c78.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c77.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c76.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c75.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c74.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c73.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c72.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c71.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c70.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c69.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c68.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c67.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c66.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c65.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c64.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c63.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c62.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c61.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c60.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c59.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c58.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c57.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c56.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c55.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c54.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c53.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c52.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c51.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c50.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c49.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c48.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c47.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c46.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c45.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c44.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c43.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c42.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c41.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c40.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c39.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c38.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c37.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c36.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c35.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c34.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c33.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c32.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c31.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c30.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c29.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c28.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c27.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c26.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c25.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c24.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c23.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c22.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c21.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c20.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c19.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c18.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c17.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c16.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c15.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c14.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c13.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c12.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c11.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c10.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c9.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c8.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c7.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c6.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c5.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c4.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c3.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c2.c +${CC} ${CFLAGS} -pipe -O2 -c -x c compile_to_c1.c # End of parallelizable section -gcc -Xlinker -no-as-needed compile_to_c1.o compile_to_c2.o compile_to_c3.o compile_to_c4.o compile_to_c5.o compile_to_c6.o compile_to_c7.o compile_to_c8.o compile_to_c9.o compile_to_c10.o compile_to_c11.o compile_to_c12.o compile_to_c13.o compile_to_c14.o compile_to_c15.o compile_to_c16.o compile_to_c17.o compile_to_c18.o compile_to_c19.o compile_to_c20.o compile_to_c21.o compile_to_c22.o compile_to_c23.o compile_to_c24.o compile_to_c25.o compile_to_c26.o compile_to_c27.o compile_to_c28.o compile_to_c29.o compile_to_c30.o compile_to_c31.o compile_to_c32.o compile_to_c33.o compile_to_c34.o compile_to_c35.o compile_to_c36.o compile_to_c37.o compile_to_c38.o compile_to_c39.o compile_to_c40.o compile_to_c41.o compile_to_c42.o compile_to_c43.o compile_to_c44.o compile_to_c45.o compile_to_c46.o compile_to_c47.o compile_to_c48.o compile_to_c49.o compile_to_c50.o compile_to_c51.o compile_to_c52.o compile_to_c53.o compile_to_c54.o compile_to_c55.o compile_to_c56.o compile_to_c57.o compile_to_c58.o compile_to_c59.o compile_to_c60.o compile_to_c61.o compile_to_c62.o compile_to_c63.o compile_to_c64.o compile_to_c65.o compile_to_c66.o compile_to_c67.o compile_to_c68.o compile_to_c69.o compile_to_c70.o compile_to_c71.o compile_to_c72.o compile_to_c73.o compile_to_c74.o compile_to_c75.o compile_to_c76.o compile_to_c77.o compile_to_c78.o compile_to_c79.o compile_to_c80.o compile_to_c81.o compile_to_c82.o compile_to_c83.o compile_to_c84.o compile_to_c85.o compile_to_c86.o compile_to_c87.o compile_to_c88.o compile_to_c89.o compile_to_c90.o compile_to_c91.o compile_to_c92.o compile_to_c93.o compile_to_c94.o compile_to_c95.o compile_to_c96.o compile_to_c97.o compile_to_c98.o compile_to_c99.o compile_to_c100.o compile_to_c101.o compile_to_c102.o compile_to_c103.o compile_to_c104.o compile_to_c105.o compile_to_c106.o compile_to_c107.o compile_to_c108.o compile_to_c109.o compile_to_c110.o compile_to_c111.o compile_to_c112.o compile_to_c113.o compile_to_c114.o compile_to_c115.o compile_to_c116.o compile_to_c117.o compile_to_c118.o compile_to_c119.o compile_to_c120.o compile_to_c121.o compile_to_c122.o compile_to_c123.o compile_to_c124.o compile_to_c125.o compile_to_c126.o compile_to_c127.o compile_to_c128.o compile_to_c129.o compile_to_c130.o compile_to_c131.o compile_to_c132.o compile_to_c133.o compile_to_c134.o compile_to_c135.o -x none +${CC} -Xlinker ${LDFLAGS} compile_to_c1.o compile_to_c2.o compile_to_c3.o compile_to_c4.o compile_to_c5.o compile_to_c6.o compile_to_c7.o compile_to_c8.o compile_to_c9.o compile_to_c10.o compile_to_c11.o compile_to_c12.o compile_to_c13.o compile_to_c14.o compile_to_c15.o compile_to_c16.o compile_to_c17.o compile_to_c18.o compile_to_c19.o compile_to_c20.o compile_to_c21.o compile_to_c22.o compile_to_c23.o compile_to_c24.o compile_to_c25.o compile_to_c26.o compile_to_c27.o compile_to_c28.o compile_to_c29.o compile_to_c30.o compile_to_c31.o compile_to_c32.o compile_to_c33.o compile_to_c34.o compile_to_c35.o compile_to_c36.o compile_to_c37.o compile_to_c38.o compile_to_c39.o compile_to_c40.o compile_to_c41.o compile_to_c42.o compile_to_c43.o compile_to_c44.o compile_to_c45.o compile_to_c46.o compile_to_c47.o compile_to_c48.o compile_to_c49.o compile_to_c50.o compile_to_c51.o compile_to_c52.o compile_to_c53.o compile_to_c54.o compile_to_c55.o compile_to_c56.o compile_to_c57.o compile_to_c58.o compile_to_c59.o compile_to_c60.o compile_to_c61.o compile_to_c62.o compile_to_c63.o compile_to_c64.o compile_to_c65.o compile_to_c66.o compile_to_c67.o compile_to_c68.o compile_to_c69.o compile_to_c70.o compile_to_c71.o compile_to_c72.o compile_to_c73.o compile_to_c74.o compile_to_c75.o compile_to_c76.o compile_to_c77.o compile_to_c78.o compile_to_c79.o compile_to_c80.o compile_to_c81.o compile_to_c82.o compile_to_c83.o compile_to_c84.o compile_to_c85.o compile_to_c86.o compile_to_c87.o compile_to_c88.o compile_to_c89.o compile_to_c90.o compile_to_c91.o compile_to_c92.o compile_to_c93.o compile_to_c94.o compile_to_c95.o compile_to_c96.o compile_to_c97.o compile_to_c98.o compile_to_c99.o compile_to_c100.o compile_to_c101.o compile_to_c102.o compile_to_c103.o compile_to_c104.o compile_to_c105.o compile_to_c106.o compile_to_c107.o compile_to_c108.o compile_to_c109.o compile_to_c110.o compile_to_c111.o compile_to_c112.o compile_to_c113.o compile_to_c114.o compile_to_c115.o compile_to_c116.o compile_to_c117.o compile_to_c118.o compile_to_c119.o compile_to_c120.o compile_to_c121.o compile_to_c122.o compile_to_c123.o compile_to_c124.o compile_to_c125.o compile_to_c126.o compile_to_c127.o compile_to_c128.o compile_to_c129.o compile_to_c130.o compile_to_c131.o compile_to_c132.o compile_to_c133.o compile_to_c134.o compile_to_c135.o -x none strip a.out diff --git a/src/smarteiffel/kernel/system_tools.e b/src/smarteiffel/kernel/system_tools.e index 24a83d9..ffde726 100644 --- a/src/smarteiffel/kernel/system_tools.e +++ b/src/smarteiffel/kernel/system_tools.e @@ -41,14 +41,14 @@ feature { SERC_FACTORY} compiler_list: FAST_ARRAY[STRING] once - Result := {FAST_ARRAY[STRING] << gcc, gpp, lcc_win32, cc, wcl386, bcc32, cl, sas_c, dice, vbcc, + Result := {FAST_ARRAY[STRING] << gcc, gpp, clang, lcc_win32, cc, wcl386, bcc32, cl, sas_c, dice, vbcc, ccc, vpcc, open_vms_cc, tcc, distcc >> } end c_plus_plus_compiler_list: FAST_ARRAY[STRING] -- Compilers (among `compiler_list') which can handle C++ once - Result := {FAST_ARRAY[STRING] << gpp, cc_pp, cl, bcc32, wcl386, vpcc, distcc, fz_none -- special no-C++ compiler + Result := {FAST_ARRAY[STRING] << gpp, clang, cc_pp, cl, bcc32, wcl386, vpcc, distcc, fz_none -- special no-C++ compiler >> } end @@ -177,7 +177,7 @@ feature {} add_lib_math_do_it_again do if beos_system = system_name then - elseif c_compiler = gcc or else c_compiler = gpp or else c_compiler = distcc then + elseif c_compiler = gcc or else c_compiler = gpp or else c_compiler = distcc or else c_compiler = clang then add_external_lib(libm) elseif c_compiler = bcc32 then -- add_external_lib(libm) @@ -507,7 +507,7 @@ feature {ANY} object_suffix: STRING -- Of object File produced by the C Compiler. once - if c_compiler = gcc or else c_compiler = gpp or else c_compiler = distcc then + if c_compiler = gcc or else c_compiler = gpp or else c_compiler = distcc or else c_compiler = clang then Result := o_suffix elseif c_compiler = lcc_win32 then Result := obj_suffix @@ -1139,7 +1139,7 @@ feature {C_PRETTY_PRINTER, C_SPLITTER} Result := once "...This is a local once buffer..." Result.clear_count check_c_plus_plus - if c_compiler = gcc or else c_compiler = gpp or else c_compiler = distcc then + if c_compiler = gcc or else c_compiler = gpp or else c_compiler = distcc or else c_compiler = clang then Result.append(c_compiler_path) append_token(Result, c_compiler_options) append_token(Result, c_plugin_compiler_options) @@ -1248,7 +1248,7 @@ feature {C_PRETTY_PRINTER, C_SPLITTER} Result := once "...This is a local once buffer..." Result.clear_count check_c_plus_plus - if c_compiler = gcc or else c_compiler = gpp or else c_compiler = distcc then + if c_compiler = gcc or else c_compiler = gpp or else c_compiler = distcc or else c_compiler = clang then Result.append(c_linker_path) append_token(Result, c_linker_options) add_executable_name(Result) @@ -1943,6 +1943,8 @@ feature {} do if compiler = gcc then Result := gcc + elseif compiler = clang then + Result := clang elseif compiler = gpp then Result := gpp elseif compiler = distcc then @@ -1995,6 +1997,8 @@ feature {} do if compiler = gcc then Result := gcc + elseif compiler = clang then + Result := clang elseif compiler = gpp then Result := gpp elseif compiler = distcc then diff --git a/work/tools.sh b/work/tools.sh index 0aff11d..9b91701 100755 --- a/work/tools.sh +++ b/work/tools.sh @@ -2,14 +2,48 @@ export EXE_SUFFIX='' export OS=UNIX -if test -x /usr/bin/cygpath.exe; then - # Cygwin specific - EXE_SUFFIX=".exe" - OS=Cygwin - flavor=generic -else - flavor=`uname -s` -fi + +case `uname -s` in + CYGWIN*) + flavor=generic + OS=Cygwin + EXE_SUFFIX=".exe" + CC_TYPE=${CC_TYPE:-gcc} + CC=${CC:-$CC_TYPE} + CFLAGS="-fno-gcse" + CXX_TYPE=${CXX_TYPE:-g++} + CXX=${CXX:-${CXX_TYPE}} + CXXFLAGS="-fno-gcse" + LDFLAGS="--no-as-needed" + ;; + Linux) + flavor=Linux + jobs=$((1 + $(grep '^processor' /proc/cpuinfo|wc -l))) + CC_TYPE=${CC_TYPE:-gcc} + CC=${CC:-$CC_TYPE} + CFLAGS="-fno-gcse" + CXX_TYPE=${CXX_TYPE:-g++} + CXX=${CXX:-${CXX_TYPE}} + CXXFLAGS="-fno-gcse" + LDFLAGS="--no-as-needed" + ;; + Darwin) + flavor=Darwin + jobs=$((1 + $(sysctl -n machdep.cpu.core_count))) + CC_TYPE=${CC_TYPE:-clang} + CC=${CC:-$CC_TYPE} + CFLAGS="" + CXX_TYPE=${CXX_TYPE:-clang++} + CXX=${CXX:-${CXX_TYPE}} + CXXFLAGS="" + LDFLAGS="" + ;; + *) + flavor=uknown + jobs=1 + ;; +esac + if [ x$plain == x ]; then plain=FALSE @@ -143,7 +177,7 @@ progress() { label="$4" echo '~~~~ '$label' ~~~~' >> $LOG if test $plain = TRUE; then - awk -vmax=$max -vcur=$current ' + awk -v max=$max -v cur=$current ' BEGIN { printf(" * %02d/%02d: %s\n", cur, max, "'"$label"'"); exit; @@ -155,7 +189,7 @@ progress() { # For perceived performance, use a non-minear progress bar # See http://blog.codinghorror.com/actual-performance-perceived-performance/ # (Linear is still available if $linear is non-zero) - awk -vmax=$max -vcur=$current -vsize=$size -vcol=$col -vlinear=0$linear ' + awk -v max=$max -v cur=$current -v size=$size -v col=$col -v linear=0$linear ' BEGIN { x = cur / max; if (linear) {