[PATCH] Use automake (v3)

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Nov 30 10:47:18 GMT 2020


On Nov 30 11:25, Corinna Vinschen wrote:
> Hi Jon,
> 
> On Nov 24 13:37, Jon Turney wrote:
> > For ease of reviewing, this patch doesn't contain changes to generated
> > files which would be made by running ./autogen.sh.
> > 
> > v2:
> > * Include tzmap.h in BUILT_SOURCES
> > * Make per-file flags appear after user-supplied CXXFLAGS, so they can
> > override optimization level.
> > * Correct .o files used to define symbols exported by libm.a
> > * Drop gcrt0.o mistakenly incuded in libgmon.a
> > * Add missing line continuations in GMON_FILES value
> > 
> > v3:
> > * use per-file flags for .c compilation
> > * override C{XX,}FLAGS, as they are set on the command line by top-level make
> 
> Running autogen.sh shows a couple of warnings:
> 
> configure.ac:45: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
> configure.ac:45: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
> configure.ac:45: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
> configure.ac:45: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
> configure.ac:45: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
> testsuite/cygrun/Makefile.am:16: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
> configure.ac:45: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
> automake: warning: redefinition of 'ps' ...
> /usr/share/automake-1.16/am/program.am: ... 'ps$(EXEEXT)' previously defined here
> utils/Makefile.am:15:   while processing program 'ps'
> utils/mingw/Makefile.am:14: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
> 
> Something to worry about?

Also, after applying the patch and autogen-ing, a full build from
top-level fails with some warnings and a final undefined symbol:

make[5]: Entering directory '[...]/x86_64-pc-cygwin/winsup/utils/mingw'
  CXX      ../bloda.o
  CXX      ../cygcheck.o
  CXX      ../dump_setup.o
  CXX      ../ldh.o
  CXX      ../path.o
  CXX      ../cygwin-console-helper.o
  CXX      ../path_testsuite-path.o
  CXX      ../strace.o
  CXX      ../path_testsuite-testsuite.o
[...]/winsup/utils/mingw/../testsuite.cc:18: warning: "TESTSUITE" redefined
   18 | #define TESTSUITE
      | 
<command-line>: note: this is the location of the previous definition
  CXXLD    cygwin-console-helper.exe
  CXXLD    ldh.exe
In file included from [...]/winsup/utils/mingw/../path.cc:263:
[...]/winsup/utils/mingw/../testsuite.h:22:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   22 | #define TESTSUITE_ROOT "X:\\xyzroot"
      |                        ^~~~~~~~~~~~~
[...]/winsup/utils/mingw/../testsuite.h:22:24: note: in definition of macro 'TESTSUITE_ROOT'
   22 | #define TESTSUITE_ROOT "X:\\xyzroot"
      |                        ^~~~~~~~~~~~~
[...]/winsup/utils/mingw/../testsuite.h:34:4: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   34 |  { "O:\\other",           (char*)"/otherdir",        MOUNT_SYSTEM},
      |    ^~~~~~~~~~~
[...]/winsup/utils/mingw/../testsuite.h:35:4: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   35 |  { "S:\\some\\dir",       (char*)"/somedir",         MOUNT_SYSTEM},
      |    ^~~~~~~~~~~~~~~
[...]/winsup/utils/mingw/../testsuite.h:22:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   22 | #define TESTSUITE_ROOT "X:\\xyzroot"
      |                        ^
[...]/winsup/utils/mingw/../testsuite.h:22:24: note: in definition of macro 'TESTSUITE_ROOT'
   22 | #define TESTSUITE_ROOT "X:\\xyzroot"
      |                        ^~~~~~~~~~~~~
[...]/winsup/utils/mingw/../testsuite.h:22:24: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   22 | #define TESTSUITE_ROOT "X:\\xyzroot"
      |                        ^
[...]/winsup/utils/mingw/../testsuite.h:22:24: note: in definition of macro 'TESTSUITE_ROOT'
   22 | #define TESTSUITE_ROOT "X:\\xyzroot"
      |                        ^~~~~~~~~~~~~
[...]/winsup/utils/mingw/../testsuite.h:38:4: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   38 |  { ".",                   (char*)TESTSUITE_CYGDRIVE, MOUNT_SYSTEM | MOUNT_CYGDRIVE},
      |    ^~~
[...]/winsup/utils/mingw/../path.cc:563:1: warning: 'int mnt_sort(const void*, const void*)' defined but not used [-Wunused-function]
  563 | mnt_sort (const void *a, const void *b)
      | ^~~~~~~~
  CXXLD    path-testsuite.exe
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: ../path_testsuite-path.o:path.cc:(.rdata$.refptr.max_mount_entry[.refptr.max_mount_entry]+0x0): undefined reference to `max_mount_entry'


Corinna


More information about the Cygwin-patches mailing list