- don't use GCC_MAJOR to see if we're not using gcc as GCC_MAJOR might be set
authorUrs Janssen <urs@hq.tin.org>
Thu, 14 Feb 2013 23:53:33 +0000 (15 00:53 +0100)
committerUrs Janssen <urs@hq.tin.org>
Thu, 14 Feb 2013 23:53:33 +0000 (15 00:53 +0100)
  during configure even with --cc=notgcc as long as gcc is installed.

Makefile
libtcc.c

index 0879247..59a3ed7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ VPATH = $(top_srcdir)
 
 CPPFLAGS = -I$(TOP) # for config.h
 
+ifeq (-$(findstring clang,$(CC))-,-gcc-)
 ifeq (-$(findstring $(GCC_MAJOR),01)-,--)
 CFLAGS+=-fno-strict-aliasing
 ifeq (-$(findstring $(GCC_MAJOR),23)-,--)
@@ -18,6 +19,7 @@ else
 CFLAGS+=-Wno-unused-result
 endif
 endif
+endif
 else # not GCC
 ifeq (-$(findstring clang,$(CC))-,-clang-)
 # make clang accept gnuisms in libtcc1.c
index 3bcc5d5..af0fb7f 100644 (file)
--- a/libtcc.c
+++ b/libtcc.c
@@ -1643,7 +1643,7 @@ enum {
     TCC_OPTION_MD,
     TCC_OPTION_MF,
     TCC_OPTION_x,
-    TCC_OPTION_dumpversion
+    TCC_OPTION_dumpversion,
 };
 
 #define TCC_OPTION_HAS_ARG 0x0001