[sr #108559] libtool binary wrappers fall prey to aggressive optimizations

2024-01-16 Thread Mike Frysinger
Update of sr#108559 (group libtool):

 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[sr #108559] libtool binary wrappers fall prey to aggressive optimizations

2015-03-15 Thread LRN
Follow-up Comment #4, sr #108559 (project libtool):

Care to close this bug?

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
https://lists.gnu.org/mailman/listinfo/libtool


[sr #108559] libtool binary wrappers fall prey to aggressive optimizations

2014-05-02 Thread Peter Rosin
Update of sr #108559 (project libtool):

  Status:None => Done   

___

Follow-up Comment #3:

I have now pushed this change, thanks for testing!

Cheers,
Peter


___

Reply to this item at:

  

___
  Meddelandet skickades via/av Savannah
  http://savannah.gnu.org/


___
https://lists.gnu.org/mailman/listinfo/libtool


[sr #108559] libtool binary wrappers fall prey to aggressive optimizations

2014-05-02 Thread LRN
Follow-up Comment #2, sr #108559 (project libtool):

Yeah, that worked

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
https://lists.gnu.org/mailman/listinfo/libtool


[sr #108559] libtool binary wrappers fall prey to aggressive optimizations

2014-05-02 Thread Peter Rosin
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:

  

___
  Meddelandet skickades via/av Savannah
  http://savannah.gnu.org/


___
https://lists.gnu.org/mailman/listinfo/libtool


[sr #108559] libtool binary wrappers fall prey to aggressive optimizations

2014-05-01 Thread LRN
URL:
  

 Summary: libtool binary wrappers fall prey to aggressive
optimizations
 Project: GNU Libtool
Submitted by: lrn
Submitted on: Fri 02 May 2014 05:16:44 AM GMT
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
Operating System: None

___

Details:

When building binary wrappers (say, for W32), libtool puts a MAGIC constant
string into them. Later on libtool greps the program for this string to see
whether this is a wrapper or a real program.

However, MAGIC string is not used in the program in any way, and gcc may
remove it. This does happen when building with -flto.

My proposal would be to make use of the string somehow to fool gcc into
leaving it alone. For example, this call:

   lt_fatal (__FILE__, __LINE__,
"unrecognized %s option: '%s'",
ltwrapper_option_prefix, argv[i]);

can be changed like this:

   lt_fatal (__FILE__, __LINE__,
"unrecognized %s option: '%s'\0%s",
ltwrapper_option_prefix, argv[i], MAGIC_EXE);





___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
https://lists.gnu.org/mailman/listinfo/libtool