]> pd.if.org Git - pdclib/blobdiff - Jamrules
Different text for static_assert()s
[pdclib] / Jamrules
index cf84e69a5df9ae038d46b932180adefb775e65db..5e739353b9546a286bbcf061ec090772e8bd8a4b 100644 (file)
--- a/Jamrules
+++ b/Jamrules
@@ -31,15 +31,11 @@ if $(PDCLIB_TOOLCHAIN) = "" {
 }
 
 if $(PDCLIB_TOOLCHAIN) = "gcc" {
-    # No -Wcast-align      : spurious warnings when using char* to do pointer 
-    #                        arithmetic
-    # No -Winline          : when compiling with e.g. -Os causes spurious 
-    #                        warnings that call is unlikely/code size would grow
-    # No -Wredundant-decls : some functions must be multiply defined
     PDCLIB_WARNINGS ?= 
       -Wall -Wextra -pedantic -Wno-unused-parameter -Wshadow 
       -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wno-long-long 
-      -Wuninitialized 
+      -Wuninitialized -Wno-deprecated-declarations -Wredundant-decls -Winline
+      -Wcast-align -Wno-format
       ;
     PDCLIB_CCWARNINGS ?= 
       -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes ;
@@ -48,6 +44,8 @@ if $(PDCLIB_TOOLCHAIN) = "gcc" {
       #-nostdinc 
       -std=c11 
       -g 
+      -ffunction-sections
+      -fdata-sections
       -D_PDCLIB_BUILD
       $(PDCLIB_WARNINGS) ;
     PDCLIB_C++FLAGS =
@@ -55,6 +53,8 @@ if $(PDCLIB_TOOLCHAIN) = "gcc" {
       #-nostdinc
       -std=c++11
       -g
+      -ffunction-sections
+      -fdata-sections
       -D_PDCLIB_BUILD
       $(PDCLIB_WARNINGS) ;
 
@@ -67,6 +67,7 @@ if $(PDCLIB_TOOLCHAIN) = "gcc" {
         #    $(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
         #}
     } else {
+        PDCLIB_TEST_LINKFLAGS += -Wl,--gc-sections ;
         actions Link bind NEEDLIBS
         {
             $(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) -Wl,--start-group $(NEEDLIBS) $(LINKLIBS) -Wl,--end-group
@@ -198,4 +199,4 @@ rule MakeLocate
         Depends $(<) : $(_dir:G=dir) ;
         MkDir $(_dir:G=dir) ;
     }
-}
\ No newline at end of file
+}