From 95f2d1e9925c1fb119c312d9d0bf6ca198aea7b8 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 3 Aug 2022 01:15:53 +0200 Subject: [PATCH] WIP: Use abi-compatible directory for loading plugins --- Makefile | 1 + libr/include/r_userconf.h.acr | 6 +++--- libr/include/r_version.h.in | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1d4f95571e050..365574fa5dee3 100644 --- a/Makefile +++ b/Makefile @@ -81,6 +81,7 @@ libr/include/r_version.h: @echo '#define R_VERSION_H 1' >> $@.tmp @echo '#define R2_VERSION_COMMIT $(R2VC)' >> $@.tmp @echo '#define R2_VERSION "$(R2_VERSION)"' >> $@.tmp + @echo '#define R2_VERSION_ABI "$(R2_VERSION_MAJOR).$(R2_VERSION_MINOR).x"' >> $@.tmp @echo '#define R2_VERSION_MAJOR $(R2_VERSION_MAJOR)' >> $@.tmp @echo '#define R2_VERSION_MINOR $(R2_VERSION_MINOR)' >> $@.tmp @echo '#define R2_VERSION_PATCH $(R2_VERSION_PATCH)' >> $@.tmp diff --git a/libr/include/r_userconf.h.acr b/libr/include/r_userconf.h.acr index f41f7b77182df..ae20ec90770ad 100644 --- a/libr/include/r_userconf.h.acr +++ b/libr/include/r_userconf.h.acr @@ -77,9 +77,9 @@ extern "C" { #define R2_INCDIR "@INCLUDEDIR@/libr" #define R2_DATDIR "@DATADIR@" #define R2_WWWROOT R2_DATDIR "/radare2/" R2_VERSION "/www" -#define R2_PLUGINS "lib/radare2/" R2_VERSION -#define R2_EXTRAS "lib/radare2-extras/" R2_VERSION -#define R2_BINDINGS "lib/radare2-bindings/" R2_VERSION +#define R2_PLUGINS "lib/radare2/" R2_VERSION_ABI +#define R2_EXTRAS "lib/radare2-extras/" R2_VERSION_ABI +#define R2_BINDINGS "lib/radare2-bindings/" R2_VERSION_ABI #endif #define R2_DATDIR_R2 R_JOIN_2_PATHS ("share", "radare2") #define R2_SDB R_JOIN_3_PATHS ("share", "radare2", R2_VERSION) diff --git a/libr/include/r_version.h.in b/libr/include/r_version.h.in index 7508880117e2f..dcc0efc30f748 100644 --- a/libr/include/r_version.h.in +++ b/libr/include/r_version.h.in @@ -1,6 +1,7 @@ #ifndef R_VERSION_H #define R_VERSION_H 1 #define R_MESON_VERSION "@MESON_VERSION@" +#define R2_VERSION_ABI "@R2_VERSION_MAJOR@.@R2_VERSION_MINOR@.x" #define R2_VERSION_MAJOR @R2_VERSION_MAJOR@ #define R2_VERSION_MINOR @R2_VERSION_MINOR@ #define R2_VERSION_PATCH @R2_VERSION_PATCH@