Index: build/tcc-patches/0.9.26/tcc-0.9.26-fixmakefile.diff ================================================================== --- build/tcc-patches/0.9.26/tcc-0.9.26-fixmakefile.diff +++ build/tcc-patches/0.9.26/tcc-0.9.26-fixmakefile.diff @@ -1,12 +1,20 @@ diff -uNr tcc-0.9.26.orig/Makefile tcc-0.9.26-fixmakefile/Makefile --- tcc-0.9.26.orig/Makefile 2013-02-15 08:24:00.000000000 -0600 -+++ tcc-0.9.26-fixmakefile/Makefile 2016-12-08 23:20:32.856086001 -0600 -@@ -16,7 +16,7 @@ ++++ tcc-0.9.26-fixmakefile/Makefile 2019-09-04 21:17:50.621717363 -0500 +@@ -7,6 +7,7 @@ + VPATH = $(top_srcdir) + + CPPFLAGS = -I$(TOP) # for config.h ++CFLAGS+=@TCC_GZ_NONE@ + + ifeq (-$(findstring gcc,$(CC))-,-gcc-) + ifeq (-$(findstring $(GCC_MAJOR),01)-,--) +@@ -16,7 +17,7 @@ ifeq (-$(GCC_MAJOR)-$(findstring $(GCC_MINOR),56789)-,-4--) CFLAGS+=-D_FORTIFY_SOURCE=0 else -CFLAGS+=-Wno-unused-result +CFLAGS+=@TCC_WNO_UNUSED_RESULT@ endif endif endif Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -85,10 +85,29 @@ TCC_WNO_UNUSED_RESULT='-Wno-unused-result' else TCC_WNO_UNUSED_RESULT='' fi AC_SUBST(TCC_WNO_UNUSED_RESULT) + +dnl Determine if the compiler supports -gz=none +AC_CACHE_CHECK([if compiler supports -gz=none], [tcc4tcl_cv_compiler_gz_none], [ + SAVE_CFLAGS="${CFLAGS}" + CFLAGS="${SAVE_CFLAGS} -gz=none" + AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [ + tcc4tcl_cv_compiler_gz_none='yes' + ], [ + tcc4tcl_cv_compiler_gz_none='no' + ]) + CFLAGS="${SAVE_CFLAGS}" +]) + +if test "$tcc4tcl_cv_compiler_gz_none" = 'yes'; then + TCC_GZ_NONE='-gz=none' +else + TCC_GZ_NONE='' +fi +AC_SUBST(TCC_GZ_NONE) dnl Determine HOST_PATH_SEPERATOR case $host_os in *mingw*) HOST_PATH_SEPARATOR=';'