[bug#72225] [PATCH] _AM_PROG_CC_C_O: clean up after .dSYM directories properly [PING]
Eric Gallager via Patches for Automake <[email protected]> Tue, 3 Sep 2024 14:22:55 -0400
| Newsgroups | gmane.comp.sysutils.automake.patches |
|---|---|
| Message-ID | <CAMfHzOvfpgPohCSvGtV+mp0jsErV2Oo4iTLsCkmDorhD2KbjqQ@mail.gmail.com> |
On Sat, Aug 10, 2024 at 2:38 AM Eric Gallager <[email protected]> wrote: > > On Sun, Jul 21, 2024 at 10:16 AM Zack Weinberg <[email protected]> wrote: > > > > On Sun, Jul 21, 2024, at 5:20 AM, Eric Gallager via Patches for Automake wrote: > > > On darwin, the compiler will generate .dSYM directories (for debug > > > info) alongside executables when invoked, leading to messages like the > > > following in configure output: > > > > > > checking whether /usr/local/bin/gcc understands -c and -o together... > > > rm: conftest.dSYM: is a directory > > > yes > > > > > > The attached patch ought to fix this by passing the -r flag to the rm > > > invocation that's meant to clean up the conftests. One concern, > > > though, is that in the same invocation, it also tries to remove > > > anything called "core", so I worry what might happen with this change > > > if "core" happens to be a directory... should I handle that > > > separately? > > > > Tests generated by autoconf proper use this formula for cleaning up after > > link tests: > > > > rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.o conftest.obj conftest.dSYM > > > > I'd suggest that _AM_PROG_CC_C_O should be aligned with this - which means > > *not* deleting anything named 'core'. You may or may not have $ac_ext available; > > ac_ext is used just a few lines above in the call to AM_RUN_LOG on line 26. > > > even if you don't I'd suggest that you also make the 'conftest*' glob more > > specific (without having looked at the rest of am-prog-cc-c-o.m4, something > > like 'conftest.c conftest.o conftest.obj conftest.dSYM' is probably close). > > > > zw > > Attached is a new patch that removes 'core' from the list of files to > be deleted, and adds some of your suggestions instead. Hi, I'd just like to ping this patch from earlier: https://lists.gnu.org/archive/html/automake-patches/2024-08/msg00003.html
patch-m4_prog-cc-c-o.m4.diff
(application/octet-stream, 534 B)
diff --git a/m4/prog-cc-c-o.m4 b/m4/prog-cc-c-o.m4
index a31a4a414..bb60b39a9 100644
--- a/m4/prog-cc-c-o.m4
+++ b/m4/prog-cc-c-o.m4
@@ -31,7 +31,9 @@ AC_CACHE_CHECK(
break
fi
done
- rm -f core conftest*
+ rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
+ conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
+ conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.