clang support

This commit is contained in:
Carsten Larsen 2017-01-09 21:30:46 +01:00
parent cbb6c747f6
commit 2b786bef20
1 changed files with 46 additions and 38 deletions

84
configure vendored
View File

@ -179,14 +179,14 @@ if $VALID ; then
else else
ARCFLAG="" ARCFLAG=""
fi fi
if [ -n "$2" ]; if [ -n "$2" ];
then then
CROSSCOMPILE="$2" CROSSCOMPILE="$2"
else else
CROSSCOMPILE="" CROSSCOMPILE=""
fi fi
if [ -n "$3" ]; if [ -n "$3" ];
then then
CROSSCOMPILEFLAGS="$3 " CROSSCOMPILEFLAGS="$3 "
@ -203,7 +203,7 @@ if $VALID ; then
else else
gcclib="-lstdc++" gcclib="-lstdc++"
fi fi
if [ -n "$REGTEST" ]; if [ -n "$REGTEST" ];
then then
if [ "$REGTEST" = "n" ] || [ "$REGTEST" = "N" ]; if [ "$REGTEST" = "n" ] || [ "$REGTEST" = "N" ];
@ -227,29 +227,35 @@ if $VALID ; then
libop="-O3" libop="-O3"
exestrip="-s" exestrip="-s"
fi fi
# Use under certain circumstances when GCC is causing problems with FPU # Use under certain circumstances when GCC is causing problems with FPU
#nff="-fno-strict-aliasing -ffloat-store " #nff="-fno-strict-aliasing -ffloat-store "
nff=" " nff=" "
( (
echo "# Portable Makefile generated by configure" echo
echo echo "CC = ${CROSSCOMPILE}gcc"
echo "CXX = ${CROSSCOMPILE}g++"
# echo "CC = ${CROSSCOMPILE}clang"
# echo "CXX = ${CROSSCOMPILE}clang++"
echo "AR = ${CROSSCOMPILE}ar"
echo "RANLIB = ${CROSSCOMPILE}ranlib"
echo "CFLAGS = ${ARCFLAG}$options ${CROSSCOMPILEFLAGS}"
echo "CXXFLAGS = ${ARCFLAG}$options ${CROSSCOMPILEFLAGS}-I."
# echo "CXXFLAGS = -Wno-inline-new-delete ${ARCFLAG}$options ${CROSSCOMPILEFLAGS}-I."
echo "LFLAGS = $gcclib -lamathapp${outext} -lcamath${outext} -lcomplex${outext} -lamath${outext}"
echo
echo "FLXCAT = build/flexcat"
echo "MKDIR = mkdir"
echo "COPY = cp"
echo "DEL = rm -f"
echo "DELREC = rm -Rf"
echo
echo "all: libs app" echo "all: libs app"
echo echo
echo "CC = ${CROSSCOMPILE}gcc" echo "libs: libamath libcomplex libcamath libamathapp"
echo "AR = ${CROSSCOMPILE}ar" echo
echo "RANLIB = ${CROSSCOMPILE}ranlib"
echo "CFLAGS = ${ARCFLAG}$options ${CROSSCOMPILEFLAGS}-I. -Wall -Werror"
echo "LFLAGS = $gcclib -lamathapp${outext} -lcamath${outext} -lcomplex${outext} -lamath${outext}"
echo
echo "FLXCAT = build/flexcat"
echo "MKDIR = mkdir"
echo "COPY = cp"
echo "DEL = rm -f"
echo "DELREC = rm -Rf"
echo
i="" i=""
l="" l=""
for f in ${APPSRCS} for f in ${APPSRCS}
@ -261,7 +267,7 @@ if $VALID ; then
# p # p
# }' $f | sort -u` # }' $f | sort -u`
echo "${b}.o: ${f}" ${i} echo "${b}.o: ${f}" ${i}
echo " \${CC} ${appop} \${CFLAGS} -Ilib -Iapp -Wall -Werror -c ${f}" echo " \${CXX} ${appop} \${CXXFLAGS} -Ilib -Iapp -Wall -Werror -c ${f}"
echo echo
l="${l} ${b}.o" l="${l} ${b}.o"
done done
@ -271,37 +277,37 @@ if $VALID ; then
do do
b=`basename $f .cpp` b=`basename $f .cpp`
echo "${b}.o: ${f}" echo "${b}.o: ${f}"
echo " \${CC} ${appop} \${CFLAGS} -Ilib -Iapp -Wall -Werror -c ${f}" echo " \${CC} ${appop} \${CXXFLAGS} -Ilib -Iapp -Wall -Werror -c ${f}"
echo echo
libapp="${libapp} ${b}.o" libapp="${libapp} ${b}.o"
done done
libamath="" libamath=""
for f in ${LIBREALSRCS} for f in ${LIBREALSRCS}
do do
b=`basename $f .c` b=`basename $f .c`
echo "${b}.o: ${f}" echo "${b}.o: ${f}"
echo " \${CC} ${libop} -std=c9x ${ARCFLAG}-fno-builtin ${nff}-Wall -Werror -Ilib -Ilib/real -c ${f}" echo " \${CC} ${libop} -std=c9x \${CLAGS} ${ARCFLAG}-fno-builtin ${nff}-Wall -Werror -Ilib -Ilib/real -c ${f}"
echo echo
libamath="${libamath} ${b}.o" libamath="${libamath} ${b}.o"
done done
libcomplex="" libcomplex=""
for f in ${LIBCPLEXSRCS} for f in ${LIBCPLEXSRCS}
do do
b=`basename $f .c` b=`basename $f .c`
echo "${b}.o: ${f}" echo "${b}.o: ${f}"
echo " \${CC} ${libop} -std=c9x ${ARCFLAG}-fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c ${f}" echo " \${CC} ${libop} -std=c9x \${CFLAGS} ${ARCFLAG}-fno-builtin -Wall -Werror -Ilib -Ilib/cplex -c ${f}"
echo echo
libcomplex="${libcomplex} ${b}.o" libcomplex="${libcomplex} ${b}.o"
done done
libc="" libc=""
for f in ${LIBC1SRCS} for f in ${LIBC1SRCS}
do do
b=`basename $f .c` b=`basename $f .c`
echo "${b}.o: ${f}" echo "${b}.o: ${f}"
echo " \${CC} ${libop} -std=c9x ${ARCFLAG}${ansicon}-fno-builtin -Wall -Werror -Ilib -c ${f}" echo " \${CC} ${libop} -std=c9x \${CFLAGS} ${ARCFLAG}${ansicon}-fno-builtin -Wall -Werror -Ilib -c ${f}"
echo echo
libc="${libc} ${b}.o" libc="${libc} ${b}.o"
done done
@ -310,31 +316,29 @@ if $VALID ; then
do do
b=`basename $f .cpp` b=`basename $f .cpp`
echo "${b}.o: ${f}" echo "${b}.o: ${f}"
echo " \${CC} ${libop} ${ARCFLAG}-fno-builtin -Wall -Werror -Ilib -Ilib/dconv -c ${f}" echo " \${CXX} ${libop} \${CXXFLAGS} ${ARCFLAG}-fno-builtin -Wall -Werror -Ilib -Ilib/dconv -c ${f}"
echo echo
libc="${libc} ${b}.o" libc="${libc} ${b}.o"
done done
echo "libs: libamath libcomplex libcamath libamathapp" echo "catalogsa:" # Application catalogs
echo
echo "catalogsa: " # Application catalogs
echo " \${FLXCAT} text/keyword.cd app/localize/kword.h=text/keyword.sd" echo " \${FLXCAT} text/keyword.cd app/localize/kword.h=text/keyword.sd"
echo " \${FLXCAT} text/help.cd app/localize/help.h=text/help.sd" echo " \${FLXCAT} text/help.cd app/localize/help.h=text/help.sd"
echo " \${FLXCAT} text/ident.cd app/localize/ident.h=text/ident.sd" echo " \${FLXCAT} text/ident.cd app/localize/ident.h=text/ident.sd"
echo " \${FLXCAT} text/text.cd app/localize/text.h=text/text.sd" echo " \${FLXCAT} text/text.cd app/localize/text.h=text/text.sd"
echo echo
echo "catalogsu: " # Unix catalogs echo "catalogsu:" # Unix catalogs
echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-help.ct >utext/dk-help.dict" echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-help.ct >utext/dk-help.dict"
echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-ident.ct >utext/dk-ident.dict" echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-ident.ct >utext/dk-ident.dict"
echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-text.ct >utext/dk-text.dict" echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-text.ct >utext/dk-text.dict"
echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-keyword.ct >utext/dk-keyword.dict" echo " iconv -f ISO-8859-15 -t UTF-8 catalog/dansk/amath-keyword.ct >utext/dk-keyword.dict"
echo echo
echo "catalogsw: " # Windows catalogs echo "catalogsw:" # Windows catalogs
echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-help.ct >utext/dk-help.dict" echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-help.ct >utext/dk-help.dict"
echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-ident.ct >utext/dk-ident.dict" echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-ident.ct >utext/dk-ident.dict"
echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-text.ct >utext/dk-text.dict" echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-text.ct >utext/dk-text.dict"
echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-keyword.ct >utext/dk-keyword.dict" echo " iconv -f ISO-8859-15 -t CP850 catalog/dansk/amath-keyword.ct >utext/dk-keyword.dict"
echo echo
echo "libamathapp: ${libapp}" echo "libamathapp: ${libapp}"
echo " \${AR} rcs libamathapp${outext}.a ${libapp}" echo " \${AR} rcs libamathapp${outext}.a ${libapp}"
echo " \${RANLIB} libamathapp${outext}.a" echo " \${RANLIB} libamathapp${outext}.a"
@ -360,7 +364,7 @@ if $VALID ; then
echo " \${COPY} LICENSE dist/" echo " \${COPY} LICENSE dist/"
echo " \${COPY} COPYRIGHT dist/" echo " \${COPY} COPYRIGHT dist/"
echo echo
echo "amigacatalogs: " echo "amigacatalogs:"
# echo " \${MKDIR} dist" # echo " \${MKDIR} dist"
echo " \${MKDIR} dist/catalog" echo " \${MKDIR} dist/catalog"
echo " \${MKDIR} dist/catalog/english" echo " \${MKDIR} dist/catalog/english"
@ -385,4 +389,8 @@ if $VALID ; then
) > Makefile ) > Makefile
echo "Makefile generated${msg}" echo "Makefile generated${msg}"
# echo
# echo "Build with debug symbols in csh:"
# echo "DEBUG=\"Y\" make"
echo
fi fi