Bugzilla – Attachment 698 Details for
Bug 1433
LTO miscompiles libsigrok
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
conditional no_reorder linker flag application
file_1433.txt (text/plain), 2.00 KB, created by
Gerhard Sittig
on 2020-11-03 18:34:22 CET
(
hide
)
Description:
conditional no_reorder linker flag application
Filename:
MIME Type:
Creator:
Gerhard Sittig
Created:
2020-11-03 18:34:22 CET
Size:
2.00 KB
patch
obsolete
> src/driver_list_start.c | 1 + > src/driver_list_stop.c | 1 + > src/libsigrok-internal.h | 10 ++++++++++ > 3 files changed, 12 insertions(+) > >diff --git a/src/driver_list_start.c b/src/driver_list_start.c >index 7b6c7755c65f..535e33122bc6 100644 >--- a/src/driver_list_start.c >+++ b/src/driver_list_start.c >@@ -28,6 +28,7 @@ > */ > > SR_PRIV const struct sr_dev_driver *sr_driver_list__start[] >+ SR_DRIVER_LIST_NOREORDER > __attribute__((section (SR_DRIVER_LIST_SECTION), > used, aligned(sizeof(struct sr_dev_driver *)))) > = { NULL /* Dummy item, as zero length arrays are not allowed by C99 */ }; >diff --git a/src/driver_list_stop.c b/src/driver_list_stop.c >index ff2c51de16e3..eefda05595ea 100644 >--- a/src/driver_list_stop.c >+++ b/src/driver_list_stop.c >@@ -28,6 +28,7 @@ > */ > > SR_PRIV const struct sr_dev_driver *sr_driver_list__stop[] >+ SR_DRIVER_LIST_NOREORDER > __attribute__((section (SR_DRIVER_LIST_SECTION), > used, aligned(sizeof(struct sr_dev_driver *)))) > = { NULL /* Dummy item, as zero length arrays are not allowed by C99 */ }; >diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h >index 98d1631e2f4a..6db384c4a206 100644 >--- a/src/libsigrok-internal.h >+++ b/src/libsigrok-internal.h >@@ -967,6 +967,15 @@ static inline void write_dblle_inc(uint8_t **p, double x) > #define SR_DRIVER_LIST_SECTION "__sr_driver_list" > #endif > >+#if defined __has_attribute >+# if __has_attribute(no_reorder) >+# define SR_DRIVER_LIST_NOREORDER __attribute__((no_reorder)) >+# endif >+#endif >+#if !defined SR_DRIVER_LIST_NOREORDER >+# define SR_DRIVER_LIST_NOREORDER /* EMPTY */ >+#endif >+ > /** > * Register a list of hardware drivers. > * >@@ -996,6 +1005,7 @@ static inline void write_dblle_inc(uint8_t **p, double x) > */ > #define SR_REGISTER_DEV_DRIVER_LIST(name, ...) \ > static const struct sr_dev_driver *name[] \ >+ SR_DRIVER_LIST_NOREORDER \ > __attribute__((section (SR_DRIVER_LIST_SECTION), used, \ > aligned(sizeof(struct sr_dev_driver *)))) \ > = { \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1433
:
556
|
697
| 698