Commit Graph

28 Commits

Author SHA1 Message Date
Jon Turney a1ee8a0f05
Cygwin: testsuite: Drop using DejaGnu to run tests
A more sophisticated (and modern) test harness would probably be useful,
but switching to Automake's built-in test harness gets us parallel test
execution, colourization of failures, simplifies matters, seems adequate
for the current testuite, and means we don't need to write any icky Tcl.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-22 17:16:37 +01:00
Jon Turney 1387ea9f98
Cygwin: dumper: also link with libzstd, as libbfd may require it
Also allow that linkage to be dynamic, as libzstd-devel doesn't
currently provide a static library.
2023-02-14 14:37:32 +00:00
Johannes Schindelin 89f930a964 dumper: avoid linker problem when `libbfd` depends on `libsframe`
A recent binutils version introduced `libsframe` and made it a
dependency of `libbfd`. This caused a linker problem in the MSYS2
project, and once Cygwin upgrades to that binutils version it would
cause the same problems there.

Let's preemptively detect the presence of `libsframe` and if detected,
link to it in addition to `libbfd`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2023-02-01 20:00:01 +01:00
Jon Turney daeeaa97b3
Cygwin: testsuite: Build testcases using automake
Build all the testcase executables directly using automake, rather than
passing the compiler information into DejaGnu to have it build them.

(This means you get build avoidance for these executables, so they only
get built once, rather than every time you run the test, and makes it
much easier to run them in isolatation against the installed Cygwin,
which is really nice to have when trying to fix broken tests...)

Rename the 'cygrun' subdirectory to 'mingw', and build all the testsuite
MinGW executables there.

Drop sample-miscompile.c (testing that compile failure is detected is
perhaps useful, but not here...)
2023-01-13 17:03:52 +00:00
Jon Turney 1b5fc91a1d
Cygwin: configure: Add option to disable building 'dumper'
Rather than guessing, based on just the presence of libbfd, add an
explicit configuration option, to build dumper or not, defaulting to
building it.

This might have some use when bootstrapping Cygwin for a new
architecture, or when building your own Cygwin-targetted cross-compiler,
rather than installing one from the copr, along with the dependencies of
libbfd.
2022-12-21 11:39:28 +00:00
Corinna Vinschen 3ba050dfcd Cygwin: fold common.din and x86_64.din into cygwin.din
We don't need a target-specific DEF file anymore

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-08-08 17:47:46 +02:00
Corinna Vinschen 0597c84b9b Cygwin: revamp TLS offsets computation
- convert gentls_offsets to a shell script, only running the target
  compiler and gawk.

- Simplify cygtls.h.  The new gentls_offsets script only requires two
  lines with the "public:" keyword as markers.  The comments are not
  used anymore, the output is a preprocesses file without comments.
  Align Makefile rules accordingly.

- Rather than generating perl variables and C #defines, just generate
  .ecu statements and .include the TLS offsets file right from the
  generated assembler file sigfe.s.  It's the only place we really
  need (some of) the offsets.

- Drop the target-specific name of the TLS offsets file and generate
  it on the fly in the build dir.  Fix configure and Makefile rules
  accordingly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13 14:11:58 +02:00
Corinna Vinschen c0d5bb262d Cygwin: configure: Define default valus for target specific variables
Define default values for DLL_ENTRY, DIN_FILE, and TLSOFFSETS_H
and drop them from the x86_64-specific branch.  Keep the mechanism
intact to allow other target CPUs if there ever will be.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13 14:00:52 +02:00
Corinna Vinschen e0df580bf9 Cygwin: configure: drop unused DEF_DLL_ENTRY variable
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13 13:42:54 +02:00
Corinna Vinschen fcb32b7374 Cygwin: configure: disable i686 builds
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-05-13 13:42:54 +02:00
Jon Turney 4a7461a07b
Cygwin: Fix configure help for --{en,dis}able-doc option
Report '--disable-doc' in 'configure --help', as enable is the default.
2022-01-19 13:00:42 +00:00
Jon Turney f4a26ececa
Cygwin: Conditionally build documentation
Add a configure option '--disable-doc' to disable building of the
documentation by the 'all' target.

Check for the required tools at configure time, and require them if
building documentation is enabled.

Even if building the documentation was diabled with '--disable-doc',
'make -C doc' at the top-level can still make the documentation, if the
documentation tools were found. If the tools were not found, 'missing'
is used to issue a warning about that.

Update instructions for building Cygwin appropriately.

(Building documentation remains the default to increase the chances of
noticing when building the documentation is broken.)
2021-12-17 22:28:16 +00:00
Jon Turney 90950758eb
Cygwin: Use AS_HELP_STRING for --enable-debugging
Use AS_HELP_STRING in AC_ARG_WITH for --enable-debugging to ensure
correct formatting in 'configure --help' output.
2021-12-13 17:47:54 +00:00
Jon Turney 366e43a30c
Cygwin: Update configure.ac to use AC_CONFIG_HEADERS
This avoids warning with autoconf >= 2.70:

  configure.ac:47: warning: The macro `AC_CONFIG_HEADER' is obsolete.

AC_CONFIG_HEADERS has been supported since before autconf 2.59, the
minimum version we can be using, controlled by AC_PREREQ.
2021-12-08 14:10:55 +00:00
Jon Turney 247ce0ca3a
Cygwin: Use automake (v5)
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 included 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

v4:
* Drop -Wno-error=write-strings from path_testsuite CXXFLAGS

v5:
* Update for changes in master
- Add -fno-threadsafe-statics to CXX flags
- Add hypotl.cc
- Remove fenv.cc (in favour of newlib), add fenv.c stub
- Add proc.5 manpage rules
2021-04-27 16:49:56 +01:00
Jon Turney dc93f7ef2d
Cygwin: Remove recursive configure
There's doesn't seem to be much use in independently distributing these
subdirectories, so allowing them to be independently configured seems
pointless and overcomplicated.

The order in which the subdirectories are built is still a little odd,
as cygwin is linked with libcygserver, and cygserver is then linked with
cygwin. So, we build the cygwin directory first, which invokes a build
of libcygserver in the cygserver directory, and then build in the
cygserver directory to build the cygserver executable.

Drop AC_CONFIGURE_ARGS, since we don't need to recursively call
configure with the same arguments anymore.

Slightly refine when we build utils: Previously we didn't build any
utils if MinGW compiler use was avoided, now we just avoid building
those utils which require that compiler.

Greatly simplify how winsup_srcdir and target_builddir are set, since
we're only configuring from one directory.  (These are still kept
absolute, since we don't adjust them where used for being used in a
subdirectory).

Remove configure.cygwin and put it's (greatly reduced) contents inline
in the one place it's used now.

Remove generated configure and aclocal.m4 in subdirectories.
2020-11-20 15:56:11 +00:00
Jon Turney a7cb126b14
Cygwin: Always configure in testsuite subdirectory
Doing this properly using AC_CONFIG_SUBDIRS is necessary to get the
correct paths in flags given to the compiler specified in CC/CXX.
2020-11-08 14:40:34 +00:00
Jon Turney 78bfd7dbb9
Cygwin: Remove --with-windows-{libs,headers} 2020-10-18 14:55:14 +01:00
Jon Turney 1996cb7e84
Cygwin: Remove autoconf variable INSTALL_LICENSE
Remove autoconf variable INSTALL_LICENSE, which has a constant value
which is only used once.
2020-10-14 15:04:22 +01:00
Jon Turney b21158bc4e
Cygwin: Remove AC_PROG_MAKE_SET
This is only needed if we are using an ancient make which doesn't set
${MAKE}, but we say "This makefile requires GNU make." everywhere.

It only has an effect if @SET_MAKE@ is used, which we aren't doing
consistently.
2020-10-14 15:04:19 +01:00
Corinna Vinschen 2741dd0550 Cygwin: seteuid: disable unused funcs and lsaauth subdir
If S4U proves to be usable alone, remove this code entirely.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-28 10:24:18 +01:00
Corinna Vinschen 6e623e9320 Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.

Everything else stays under GPLv3+.

New Linking Exception exempts resulting executables from LGPLv3 section 4.

Add CONTRIBUTORS file to keep track of licensing.

Remove 'Copyright Red Hat Inc' comments.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23 10:09:17 +02:00
Peter Foley e7e6119241 Rename without-mingw-progs to with-cross-bootstrap
Rename without-mingw-progs to with-cross-bootstrap, since it now
disables additional checks that are problematic for cross-compilers.

When cross-compiling a toolchain targeting cygwin, building cygwin1.dll
requires libgcc.
However, building libgcc requires the cygwin headers to be
installed.
Configuring cygwin requries the mingw-crt libraries, which require the
cygwin headers to be installed.
Work around this circular dependency by making the
--with-cross-bootstrap configure option skip cygwin's configure checks
for valid mingw-crt libraries. Cygwin will still properly link against
these libraries if they exist, but this allows configure to succeed even
if the libraries have not been built yet.
Since the mingw-crt libraries only require the cygwin headers to be
installed, this allows us to successfully configure cygwin so that we
can only install the headers without trying to build any
libraries.

winsup/ChangeLog
configure.ac: rename without-mingw-progs option to with-cross-bootstrap
configure: regenerate
winsup/cygserver/ChangeLog
configure.ac: don't check AC_WINDOWS_LIBS when using with-cross-bootstrap
configure: regenerate
winsup/cygwin/ChangeLog
configure.ac: don't check AC_WINDOWS_LIBS when using with-cross-bootstrap
configure: regenerate

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-04-04 16:39:41 +02:00
Peter Foley cf41355aba Add option to not build mingw programs when cross compiling.
Add an option to not require a mingw compiler when bootstrapping a cross toolchain.
Defaults to existing behavior.
Also update some obsolete macros.

winsup/ChangeLog
configure.ac: Add option to skip building programs that require mingw.
configure: Regenerate.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-03-30 13:50:16 +02:00
Corinna Vinschen 8e0b17fb49 * configure.ac: Convert to new AC_INIT style.
* configure: Regenerate.
2014-11-13 12:12:56 +00:00
Christopher Faylor 2a6d6db8e2 winsup/ChangeLog:
2013-11-06  Christopher Faylor  <me.cygwin2013@cgf.cx>

	* configure.ac: Detect windows headers/libs after we've figured out the
	C compiler.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.
	* configure.cygwin: Default to '.' if can't find a winsup directory.

winsup/cygserver/ChangeLog:
2013-11-06  Christopher Faylor  <me.cygwin2013@cgf.cx>

	* configure.ac: Detect windows headers/libs after we've figured out the
	C compiler.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

winsup/cygwin/ChangeLog:
2013-11-06  Christopher Faylor  <me.cygwin2013@cgf.cx>

	* configure.ac: Detect windows headers/libs after we've figured out the
	C compiler.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

winsup/utils/ChangeLog:
2013-11-06  Christopher Faylor  <me.cygwin2013@cgf.cx>

	* configure.ac: Detect windows headers/libs after we've figured out the
	C compiler.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.
2013-11-07 00:19:52 +00:00
Christopher Faylor 02211f348d Update copyrights 2013-01-21 16:21:23 +00:00
Christopher Faylor d4f4d1d0d6 ChangeLog:
2012-11-26  Christopher Faylor  <me.cygwin2012@cgf.cx>

	* configure.ac: Rename from configure.in.
	* configure.in: Delete.
	* configure: Regenerate.

cygserver/ChangeLog:
2012-11-26  Christopher Faylor  <me.cygwin2012@cgf.cx>

	* configure.ac: Rename from configure.in.
	* configure.in: Delete.
	* configure: Regenerate.

cygwin/ChangeLog:
2012-11-26  Christopher Faylor  <me.cygwin2012@cgf.cx>

	* configure.ac: Rename from configure.in.
	* configure.in: Delete.
	* configure: Regenerate.

doc/ChangeLog:
2012-11-26  Christopher Faylor  <me.cygwin2012@cgf.cx>

	* configure.ac: Rename from configure.in.
	* configure.in: Delete.
	* configure: Regenerate.

lsaauth/ChangeLog:
2012-11-26  Christopher Faylor  <me.cygwin2012@cgf.cx>

	* configure.ac: Rename from configure.in.
	* configure.in: Delete.
	* configure: Regenerate.

testsuite/ChangeLog:
2012-11-26  Christopher Faylor  <me.cygwin2012@cgf.cx>

	* configure.ac: Rename from configure.in.
	* configure.in: Delete.
	* configure: Regenerate.

utils/ChangeLog:
2012-11-26  Christopher Faylor  <me.cygwin2012@cgf.cx>

	* configure.ac: Rename from configure.in.
	* configure.in: Delete.
	* configure: Regenerate.
2012-11-26 19:50:45 +00:00