]> sourceware.org Git - annobin.git/commitdiff
plugins: Add more required build options
authorNick Clifton <nickc@redhat.com>
Wed, 6 Oct 2021 10:01:07 +0000 (11:01 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 6 Oct 2021 10:01:07 +0000 (11:01 +0100)
annobin-global.h
annocheck/hardened.c
clang-plugin/Makefile.in
llvm-plugin/Makefile.in

index 0fbb19233251755ced3cb12d29ca3ae1c3536226..3cc564857f3a97ef5a351d1e7bcdb3c73f4d318c 100644 (file)
@@ -19,7 +19,7 @@ extern "C" {
 /* The version of the package.
    NB/ This number is expected to be in the form "NNnn" where
    "NN" is major version number and "nn" is the minor version number.  */
-#define ANNOBIN_VERSION 1010
+#define ANNOBIN_VERSION 1011
 
 /* The version of the annotation specification supported.  */
 #define SPEC_VERSION  3
index c967680bc273c9999558c597832783649b27f445..24f710bc9441a0def30844d9156a2b9db180e608 100644 (file)
@@ -1037,6 +1037,24 @@ parse_dw_at_producer (annocheck_data * data, Dwarf_Attribute * attr)
       else
        info (data, TEST_WARNINGS, SOURCE_DW_AT_PRODUCER, "not found in string");
 
+      if (skip_test (TEST_GLIBCXX_ASSERTIONS))
+       ;
+      else if (strstr (string, "-D_GLIBCXX_ASSERTIONS")
+              || strstr (string, "-D _GLIBCXX_ASSERTIONS"))
+       pass (data, TEST_GLIBCXX_ASSERTIONS, SOURCE_DW_AT_PRODUCER, NULL);
+      else
+       info (data, TEST_GLIBCXX_ASSERTIONS, SOURCE_DW_AT_PRODUCER, "not found in string");
+
+      if (skip_test (TEST_FORTIFY))
+       ;
+      else if (strstr (string, "-D_FORTIFY_SOURCE=2")
+              || strstr (string, "-D _FORTIFY_SOURCE=2")
+              || strstr (string, "-D_FORTIFY_SOURCE=3")
+              || strstr (string, "-D _FORTIFY_SOURCE=3"))
+       pass (data, TEST_FORTIFY, SOURCE_DW_AT_PRODUCER, NULL);
+      else
+       info (data, TEST_FORTIFY, SOURCE_DW_AT_PRODUCER, "not found in string");
+
       if (is_x86 ())
        {
          if (skip_test (TEST_CF_PROTECTION))
@@ -4027,6 +4045,7 @@ check_for_gaps (annocheck_data * data)
                    {
                      einfo (VERBOSE2, "gap ignored - special symbol: %s", sym2);
                      /* See comment above.  */
+                     free ((char *) first_sym);
                      continue;
                    }
 
@@ -4052,6 +4071,7 @@ check_for_gaps (annocheck_data * data)
                    {
                      einfo (VERBOSE2, "gap ignored - special symbol: %s", sym2);
                      /* See comment above.  */
+                     free ((char *) first_sym);
                      continue;
                    }
 
@@ -4062,7 +4082,10 @@ check_for_gaps (annocheck_data * data)
 
          gap_found = true;
          if (! BE_VERBOSE)
-           break;
+           {
+             free ((char *) first_sym);
+             break;
+           }
 
          if (first_sym)
            {
index 77eee690e8198eaf7d8892c8e3c88155ce848d37..49733374fe5ab3a4c3e309e5a8099b271a218d34 100644 (file)
@@ -8,9 +8,14 @@ LLVM_OPTIONS = \
   -D__STDC_LIMIT_MACROS
 
 PLUGIN_OPTIONS = \
+   -D_FORTIFY_SOURCE=2 \
+   -D_GLIBCXX_ASSERTIONS \
   -shared \
   -fPIC \
-  -g \
+  -Wall \
+  -O2 \
+  -flto \
+  -g -grecord-gcc-switches \
   -Wl,-z,now
 
 INCDIR = @srcdir@/..
index c9544b9983c7a5b94adcd9fe02cfd88fc01d30ba..3fe6ede24586d89ab35692a83623720c430c26ad 100644 (file)
@@ -8,9 +8,14 @@ LLVM_OPTIONS = \
   -D__STDC_LIMIT_MACROS
 
 PLUGIN_OPTIONS = \
+   -D_FORTIFY_SOURCE=2 \
+   -D_GLIBCXX_ASSERTIONS \
   -shared \
   -fPIC \
-  -g \
+  -Wall \
+  -O2 \
+  -flto \
+  -g -grecord-gcc-switches \
   -Wl,-z,now
 
 INCDIR = @srcdir@/..
@@ -42,9 +47,11 @@ PLUGIN = @abs_builddir@/$(PLUGIN_NAME)
 
 PLUGIN_TEST_OPTIONS = \
    -D_FORTIFY_SOURCE=2 \
+   -D_GLIBCXX_ASSERTIONS \
    -O2 \
    -g -grecord-gcc-switches \
    -fPIE \
+   -Wall \
    -fstack-protector-strong \
    -fsanitize=safe-stack
 
This page took 0.151854 seconds and 5 git commands to generate.