Check-in [92bed145cf]
Overview
Comment:Support compiling TCC with -gz=none if the compiler supports it
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1: 92bed145cf7bbecbc193b172cf9f757bbd5bce62
User & Date: rkeene on 2019-09-05 02:24:46
Other Links: manifest | tags
Context
2019-09-05
02:24
Support compiling TCC with -gz=none if the compiler supports it Leaf check-in: 92bed145cf user: rkeene tags: trunk
02:24
Updated autoconf macros check-in: 47f89c20cb user: rkeene tags: trunk
Changes

Modified build/tcc-patches/0.9.26/tcc-0.9.26-fixmakefile.diff from [59f2a002dd] to [067d80dee4].

     1      1   diff -uNr tcc-0.9.26.orig/Makefile tcc-0.9.26-fixmakefile/Makefile
     2      2   --- tcc-0.9.26.orig/Makefile	2013-02-15 08:24:00.000000000 -0600
     3         -+++ tcc-0.9.26-fixmakefile/Makefile	2016-12-08 23:20:32.856086001 -0600
     4         -@@ -16,7 +16,7 @@
            3  ++++ tcc-0.9.26-fixmakefile/Makefile	2019-09-04 21:17:50.621717363 -0500
            4  +@@ -7,6 +7,7 @@
            5  + VPATH = $(top_srcdir)
            6  + 
            7  + CPPFLAGS = -I$(TOP) # for config.h
            8  ++CFLAGS+=@TCC_GZ_NONE@
            9  + 
           10  + ifeq (-$(findstring gcc,$(CC))-,-gcc-)
           11  + ifeq (-$(findstring $(GCC_MAJOR),01)-,--)
           12  +@@ -16,7 +17,7 @@
     5     13    ifeq (-$(GCC_MAJOR)-$(findstring $(GCC_MINOR),56789)-,-4--)
     6     14    CFLAGS+=-D_FORTIFY_SOURCE=0
     7     15    else
     8     16   -CFLAGS+=-Wno-unused-result
     9     17   +CFLAGS+=@TCC_WNO_UNUSED_RESULT@
    10     18    endif
    11     19    endif
    12     20    endif

Modified configure.ac from [23793a9225] to [ed45904bf5].

    83     83   
    84     84   if test "$tcc4tcl_cv_compiler_wno_unused_result" = 'yes'; then
    85     85   	TCC_WNO_UNUSED_RESULT='-Wno-unused-result'
    86     86   else
    87     87   	TCC_WNO_UNUSED_RESULT=''
    88     88   fi
    89     89   AC_SUBST(TCC_WNO_UNUSED_RESULT)
           90  +
           91  +dnl Determine if the compiler supports -gz=none
           92  +AC_CACHE_CHECK([if compiler supports -gz=none], [tcc4tcl_cv_compiler_gz_none], [
           93  +	SAVE_CFLAGS="${CFLAGS}"
           94  +	CFLAGS="${SAVE_CFLAGS} -gz=none"
           95  +	AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [
           96  +		tcc4tcl_cv_compiler_gz_none='yes'
           97  +	], [
           98  +		tcc4tcl_cv_compiler_gz_none='no'
           99  +	])
          100  +	CFLAGS="${SAVE_CFLAGS}"
          101  +])
          102  +
          103  +if test "$tcc4tcl_cv_compiler_gz_none" = 'yes'; then
          104  +	TCC_GZ_NONE='-gz=none'
          105  +else
          106  +	TCC_GZ_NONE=''
          107  +fi
          108  +AC_SUBST(TCC_GZ_NONE)
    90    109   
    91    110   dnl Determine HOST_PATH_SEPERATOR
    92    111   case $host_os in
    93    112   	*mingw*)
    94    113   		HOST_PATH_SEPARATOR=';'
    95    114   		;;
    96    115   	*)