diff options
author | Evgeniy Khramtsov <evgeniy@khramtsov.org> | 2021-10-09 15:37:45 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2021-10-30 02:45:34 +0000 |
commit | ffe546db80d95396051300a693d07acdcda457a3 (patch) | |
tree | de8bd0f16872508bf5eef3b13d487d1a7e7c57b4 | |
parent | 00e34776185e3272e8af411e5c54e0934dabac5b (diff) | |
download | ports-ffe546db80d95396051300a693d07acdcda457a3.tar.gz ports-ffe546db80d95396051300a693d07acdcda457a3.zip |
devel/basu: unbreak build with LLD 13 (devel/llvm13 or -CURRENT)
ld: error: undefined symbol: __start_BUS_ERROR_MAP
>>> referenced by bus-error.c
>>> libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
ld: error: undefined symbol: __stop_BUS_ERROR_MAP
>>> referenced by bus-error.c
>>> libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
>>> referenced by bus-error.c
>>> libsystemd_static.a.p/sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
PR: 258812
Obtained from: https://github.com/systemd/systemd/commit/945317a4b69d
-rw-r--r-- | devel/basu/files/patch-lld13 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/devel/basu/files/patch-lld13 b/devel/basu/files/patch-lld13 new file mode 100644 index 000000000000..fde89d2ea9ac --- /dev/null +++ b/devel/basu/files/patch-lld13 @@ -0,0 +1,23 @@ +https://lists.sr.ht/~emersion/public-inbox/%3CCANvPQf_5qOdfbe4Tk029yVB6BHipmYfQnuuCVoTUv3N%3D2f8jfw%40mail.gmail.com%3E +https://github.com/systemd/systemd/commit/945317a4b69d33752c9513bb8994fe8d5a786ea6 + +--- src/libsystemd/sd-bus/bus-error.h.orig 2021-01-06 13:56:51 UTC ++++ src/libsystemd/sd-bus/bus-error.h +@@ -28,11 +28,17 @@ int bus_error_set_errnofv(sd_bus_error *e, int error, + * the bus error table, and BUS_ERROR_MAP_ELF_USE has to be used at + * least once per compilation unit (i.e. per library), to ensure that + * the error map is really added to the final binary. ++ * ++ * In addition, set the retain attribute so that the section cannot be ++ * discarded by ld --gc-sections -z start-stop-gc. Older compilers would ++ * warn for the unknown attribute, so just disable -Wattributes. + */ + + #define BUS_ERROR_MAP_ELF_REGISTER \ ++ _Pragma("GCC diagnostic ignored \"-Wattributes\"") \ + __attribute__ ((__section__("BUS_ERROR_MAP"))) \ + __attribute__ ((__used__)) \ ++ __attribute__ ((retain)) \ + __attribute__ ((aligned(8))) + + #define BUS_ERROR_MAP_ELF_USE(errors) \ |