Follow-up Comment #1, sr #108559 (project libtool):
Isn't this a more direct approach, not affected by new and even
more aggressive optimizations?
-volatile const char * MAGIC_EXE = "$magic_exe";
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
Does the above work for you?
Cheers,
Peter
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/support/?108559>
_______________________________________________
Meddelandet skickades via/av Savannah
http://savannah.gnu.org/
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool