diff --git a/macros b/macros index 101b53e..48663be 100644 --- a/macros +++ b/macros @@ -125,11 +125,11 @@ print(result) # %_fix_broken_configure_for_lto \ for file in $(find . -type f -name configure -print); do \ - sed -r -i 's/^char \\(\\*f\\) \\(\\) = /__attribute__ ((used)) char (*f) () = /g' $file; \ - sed -r -i 's/^char \\(\\*f\\) \\(\\);/__attribute__ ((used)) char (*f) ();/g' $file; \ - sed -i ':a;N;\$\!ba;s/int x = 1;.\*int nan;/volatile int x = 1; volatile int y = 0; volatile int z, nan;/g' $file; \ - sed -i 's/^int nsigint;/volatile int nsigint;/' $file; \ - sed -i 's#^lt_cv_sys_global_symbol_to_cdecl=.*#lt_cv_sys_global_symbol_to_cdecl="sed -n -e '"'"'s/^T .* \\\\(.*\\\\)$/extern int \\\\1();/p'"'"' -e '"'"'s/^$symcode* .* \\\\(.*\\\\)$/extern char \\\\1;/p'"'"'"#' $file; \ + sed -r --in-place=.ORIG 's/^char \\(\\*f\\) \\(\\) = /__attribute__ ((used)) char (*f) () = /g' $file; \ + sed -r --in-place=.ORIG 's/^char \\(\\*f\\) \\(\\);/__attribute__ ((used)) char (*f) ();/g' $file; \ + sed --in-place=.ORIG ':a;N;\$\!ba;s/int x = 1;.\*int nan;/volatile int x = 1; volatile int y = 0; volatile int z, nan;/g' $file; \ + sed --in-place=.ORIG 's/^int nsigint;/volatile int nsigint;/' $file; \ + sed --in-place=.ORIG 's#^lt_cv_sys_global_symbol_to_cdecl=.*#lt_cv_sys_global_symbol_to_cdecl="sed -n -e '"'"'s/^T .* \\\\(.*\\\\)$/extern int \\\\1();/p'"'"' -e '"'"'s/^$symcode* .* \\\\(.*\\\\)$/extern char \\\\1;/p'"'"'"#' $file; \ done ; %configure \