diff --git a/0001-Compatibility-patch-for-llvm14.patch b/0001-Compatibility-patch-for-llvm14.patch deleted file mode 100644 index c4d260e..0000000 --- a/0001-Compatibility-patch-for-llvm14.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f278b500124ee9d49cb990f6a0333b28794fddb1 Mon Sep 17 00:00:00 2001 -From: sergesanspaille -Date: Wed, 30 Mar 2022 16:07:17 +0200 -Subject: [PATCH] Compatibility patch for llvm14 - ---- - llvm-plugin/annobin.cpp | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/llvm-plugin/annobin.cpp b/llvm-plugin/annobin.cpp -index a119ab9..6a43580 100644 ---- a/llvm-plugin/annobin.cpp -+++ b/llvm-plugin/annobin.cpp -@@ -484,9 +484,14 @@ namespace - - struct AnnobinModulePass : llvm::PassInfoMixin - { -- llvm::PassBuilder::OptimizationLevel OptLevel; -+#if __clang_major__ > 13 -+ using OptimizationLevel = llvm::OptimizationLevel; -+#else -+ using OptimizationLevel = llvm::PassBuilder::OptimizationLevel; -+#endif -+ OptimizationLevel OptLevel; - -- AnnobinModulePass(llvm::PassBuilder::OptimizationLevel OptLevel) : OptLevel(OptLevel) {} -+ AnnobinModulePass(OptimizationLevel OptLevel) : OptLevel(OptLevel) {} - llvm::PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM) - { - AnnobinModule Annobin; -@@ -505,7 +510,7 @@ llvm::PassPluginLibraryInfo getAnnobinLLVMPluginInfo () - { - PB.registerPipelineStartEPCallback - ([](llvm::ModulePassManager &PM, -- llvm::PassBuilder::OptimizationLevel Level) -+ AnnobinModulePass::OptimizationLevel Level) - { - PM.addPass(AnnobinModulePass(Level)); - }); --- -1.8.3.1 - diff --git a/annobin.fortify-test.patch b/annobin.fortify-test.patch deleted file mode 100644 index 4d419ac..0000000 --- a/annobin.fortify-test.patch +++ /dev/null @@ -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 - }