public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* About 329338 - Declaration conflict for basename
@ 2022-07-14  6:41 Vladimir Mezentsev
  2022-07-14  7:35 ` Alan Modra
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Mezentsev @ 2022-07-14  6:41 UTC (permalink / raw)
  To: Binutils

Hi team,

I am evaluating 29338 - Declaration conflict for basename 
<https://sourceware.org/bugzilla/show_bug.cgi?id=29338>
and I see a regression in the efbecf1e953 commit.

% git log --pretty=format:"%h - %an, %ar --> %s" --graph --name-status*
...
  efbecf1e953 - Nick Clifton, 6 days ago --> Update version number|
| M     bfd/configure
| M     bfd/po/bfd.pot
| M     bfd/version.m4
| M     binutils/configure
| M     binutils/po/binutils.pot
| M     gas/configure
| M     gas/po/gas.pot
| M     gold/po/gold.pot
| M     gprof/configure
| M     gprof/po/gprof.pot
| M     gprofng/common/config.h.in       <---------------- This update 
is wrong.
| M     gprofng/configure
| M     gprofng/libcollector/configure
| M     ld/configure
| M     ld/po/ld.pot
| M     opcodes/configure
| M     opcodes/po/opcodes.pot
| M     zlib/Makefile.in
| M     zlib/aclocal.m4
| M     zlib/configure


But the real problem is in our configure.ac scripts.

% grep -n AC_CONFIG_HEADERS gprofng/configure.ac
220:AC_CONFIG_HEADERS([config.h:common/config.h.in])
   This config.h is used in all our sources.

% grep -n AC_CONFIG_HEADERS gprofng/libcollector/configure.ac
65:AC_CONFIG_HEADERS([lib-config.h:../common/config.h.in])

  autoreconf updates ../common/config.h.in, which is not what we wanted.
  lib-config.h is not used. In build time, we use config.h from the ../ 
directory.
  We use AC_CONFIG_HEADERS() in gprofng/libcollector/configure.ac to 
pass -DHAVE_CONFIG_H for compilation.



I can make the following fix:
% git diff gprofng/libcollector/configure.ac
diff --git a/gprofng/libcollector/configure.ac 
b/gprofng/libcollector/configure.ac
index d3c6bd5588d..2e2185a11a3 100644
--- a/gprofng/libcollector/configure.ac
+++ b/gprofng/libcollector/configure.ac
@@ -62,6 +62,6 @@ ACX_PROG_CC_WARNING_OPTS([-Wno-nonnull-compare], 
[GPROFNG_NO_NONNULL_COMPARE_CFL
  AC_SUBST(GPROFNG_NO_NONNULL_COMPARE_CFLAGS)

  AC_CONFIG_FILES([Makefile])
-AC_CONFIG_HEADERS([lib-config.h:../common/config.h.in])
+AC_CONFIG_HEADERS([lib-config.h])
  AC_OUTPUT

% ( cd gprofng && autoreconf )


This will fix build.
But gprofng/libcollector/lib-config.h.in will be created.
% git status
On branch vmezents/2_39
Changes not staged for commit:
   (use "git add <file>..." to update what will be committed)
   (use "git restore <file>..." to discard changes in working directory)
     modified:   gprofng/common/config.h.in
     modified:   gprofng/libcollector/Makefile.in
     modified:   gprofng/libcollector/configure
     modified:   gprofng/libcollector/configure.ac

Untracked files:
   (use "git add <file>..." to include in what will be committed)
* gprofng/libcollector/lib-config.h.in*


Maybe there is another way to fix this.
We need a fake AC_CONFIG_HEADERS that will pass -DHAVE_CONFIG_H for 
compilation but will not generate lib-config.h and lib-config.h.in.


Thank you,
-Vladimir



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-14  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14  6:41 About 329338 - Declaration conflict for basename Vladimir Mezentsev
2022-07-14  7:35 ` Alan Modra
2022-07-14  8:39   ` Vladimir Mezentsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).