gcc-plugin: Fix typo in configure.ac

This commit is contained in:
Nick Clifton 2022-05-11 14:35:10 +01:00
parent 6a039d67f0
commit 1f57bcbc2c
3 changed files with 6 additions and 91 deletions

View File

@ -1,85 +0,0 @@
--- annobin.orig/tests/fortify-test 2022-01-10 09:50:07.005146672 +0000
+++ annobin-10.45/tests/fortify-test 2022-01-10 10:23:56.827404265 +0000
@@ -37,30 +37,37 @@ fi
# Now add in our newly built plugin.
OPTS+=" -fplugin=$PLUGIN"
+# For debugging purposes, generate a linker map as well.
+OPTS+=" -Wl,-Map,fortify-test.map"
+
start_test
-$GCC $OPTS -Wp,-U_FORTIFY_SOURCE -fno-lto $srcdir/main.c -o main.exe
+# Use atexit.c rather than main.c as it is bigger.
+COMMAND="$GCC $OPTS -Wp,-U_FORTIFY_SOURCE -fno-lto $srcdir/atexit.c -o fortify-test.exe"
+$COMMAND
if [ $? != 0 ];
then
echo " $TEST_NAME: FAIL: unable to compile test file"
- echo " $TEST_NAME: compile command: $GCC $OPTS -Wp,-U_FORTIFY_SOURCE -fno-lto $srcdir/main.c -o main.exe"
+ echo " $TEST_NAME: command: $COMMAND"
end_test
exit 1
fi
# Run annocheck
-SKIPS="--skip-cf-protection --skip-property-note --skip-stack-realign --skip-entry --skip-dynamic-tags --skip-lto --skip-warnings --skip-dynamic-tags --skip-not-dynamic-tags --skip-branch-protection --skip-not-branch-protection"
-$ANNOCHECK main.exe $SKIPS > main.out
-grep -e "Overall: FAIL" main.out
+SKIPS="--skip-all --test-fortify"
+A_COMMAND="$ANNOCHECK fortify-test.exe $SKIPS"
+$A_COMMAND > fortify-test.out
+grep -e "Overall: FAIL" fortify-test.out
if [ $? != 0 ];
then
echo " $TEST_NAME: FAIL: compiling with -D_FORTIFY_SOURCE=2 still produces an executable that passes annocheck"
- echo " $TEST_NAME: compile command: $GCC $OPTS -Wp,-U_FORTIFY_SOURCE -fno-lto $srcdir/main.c -o main.exe"
- echo " $TEST_NAME: annocheck command: $ANNOCHECK main.exe $SKIPS"
+ echo " $TEST_NAME: compile command: $COMMAND"
+ echo " $TEST_NAME: annocheck command: $A_COMMAND"
echo " $TEST_NAME: annocheck output (with verbose enabled):"
- $ANNOCHECK main.exe $SKIPS --verbose
- uuencode main.exe main.exe
+ $A_COMMAND --verbose
+ uuencode fortify-test.exe fortify-test.exe
+ uuencode fortify-test.map fortify-test.map
end_test
exit 1
fi
--- annobin.orig/gcc-plugin/annobin.cc 2022-01-10 09:50:06.991146761 +0000
+++ annobin-10.45/gcc-plugin/annobin.cc 2022-01-10 11:31:49.507826587 +0000
@@ -1,5 +1,5 @@
/* annobin - a gcc plugin for annotating binary files.
- Copyright (c) 2017 - 2021 Red Hat.
+ Copyright (c) 2017 - 2022 Red Hat.
Created by Nick Clifton.
This is free software; you can redistribute it and/or modify it
@@ -2485,6 +2485,7 @@ annobin_emit_end_symbol (const char * su
fprintf (asm_out_file, "\t.size %s%s, 0\n", annobin_current_endname, suffix);
annobin_inform (INFORM_VERBOSE, "Create symbol %s%s", annobin_current_endname, suffix);
+#if 0
/* If there is a bias to the start symbol, we can end up with the case where
the start symbol is after the end symbol. (If the section is empty).
Catch that and adjust the start symbol. This also pacifies eu-elflint
@@ -2509,7 +2510,8 @@ annobin_emit_end_symbol (const char * su
annobin_current_endname, suffix);
fprintf (asm_out_file, "\t.endif\n");
}
-
+#endif
+
fprintf (asm_out_file, "\t.popsection\n");
}
@@ -2774,7 +2776,7 @@ plugin_init (struct plugin_name_args *
solution is needed. */
annobin_attach_type = group;
#if GCCPLUGIN_VERSION_MAJOR >= 11
- if (target_start_sym_bias == 0)
+ /* if (target_start_sym_bias == 0)*/
annobin_attach_type = link_order;
#endif
}

View File

@ -1,7 +1,7 @@
Name: annobin Name: annobin
Summary: Annotate and examine compiled binary files Summary: Annotate and examine compiled binary files
Version: 10.70 Version: 10.71
Release: 1%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
URL: https://sourceware.org/annobin/ URL: https://sourceware.org/annobin/
@ -67,9 +67,6 @@ Source: https://nickc.fedorapeople.org/%{annobin_sources}
# Insert patches here, if needed. Eg: # Insert patches here, if needed. Eg:
# Patch01: annobin-foo.patch # Patch01: annobin-foo.patch
# Patch01: 0001-Compatibility-patch-for-llvm14.patch
Patch01: annobin-add-riscv-support.patch
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@ -486,7 +483,10 @@ fi
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%changelog %changelog
* Thu May 10 2022 Nianqing Yao <imbearchild@outlook.com> - 10.70-2 * Wed May 11 2022 Nick Clifton <nickc@redhat.com> - 10.71-1
- gcc-plugin: Fix typo in configure.ac.
* Tue May 10 2022 Nianqing Yao <imbearchild@outlook.com> - 10.70-2
- Add support for RISC-V. - Add support for RISC-V.
* Mon May 09 2022 Nick Clifton <nickc@redhat.com> - 10.70-1 * Mon May 09 2022 Nick Clifton <nickc@redhat.com> - 10.70-1

View File

@ -1 +1 @@
SHA512 (annobin-10.70.tar.xz) = 6b723f1c988c6afad6a7c51fde376b49affc4c9f999290b68046afe7d72c694788b75708c4252444ea1138f92e069cec0e6201f2cf919cf23ffbbc59539b1b44 SHA512 (annobin-10.71.tar.xz) = 2f02dbcb251418bf478a07428ee7b8b2bdbb3193596d132b2a96116be9aeab44a825416edfde8a9f059938d44351a78440eb57bce03e01171430e42ac61e756a