common.mak: Pass -fexceptions to clang and clang++.
authorwhitequark <whitequark@whitequark.org>
Sun, 26 Jul 2015 00:30:21 +0000 (03:30 +0300)
committerwhitequark <whitequark@whitequark.org>
Sun, 26 Jul 2015 00:30:21 +0000 (03:30 +0300)
This results in generation of .eh_frame sections. These sections
can be discarded during final linking, or included if exception
handling is desired. For exception handling to work, all sources
must be built with -fexceptions.

software/common.mak

index bed8305d1e5e7ceceb243283d748867033596f8c..154e028a1317812f30c254a2627dd0e1a7637d2b 100644 (file)
@@ -36,8 +36,8 @@ endif
 #
 INCLUDES = -I$(MSCDIR)/software/include/base -I$(MSCDIR)/software/include -I$(MSCDIR)/common
 COMMONFLAGS = -Os $(CPUFLAGS) -Wall -fno-builtin -nostdinc -DMSC_GIT_ID=$(MSC_GIT_ID) $(INCLUDES)
-CFLAGS = $(COMMONFLAGS) -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-CXXFLAGS = $(COMMONFLAGS) -fno-exceptions -ffreestanding
+CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
+CXXFLAGS = $(COMMONFLAGS) -fexceptions -fno-rtti -ffreestanding
 LDFLAGS = -nostdlib -nodefaultlibs -L$(MSCDIR)/software/include
 
 # compile and generate dependencies, based on