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
2
3
4










5
6
7
8
9
10
11
1
2


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


-
-
+
+
+
+
+
+
+
+
+
+







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

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

83
84
85
86
87
88
89



















90
91
92
93
94
95
96
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+








if test "$tcc4tcl_cv_compiler_wno_unused_result" = 'yes'; then
	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=';'
		;;
	*)