2000-02-17 20:38:33 +01:00
|
|
|
# Makefile.in for Cygwin.
|
|
|
|
#
|
|
|
|
# This file is part of Cygwin.
|
|
|
|
#
|
|
|
|
# This software is a copyrighted work licensed under the terms of the
|
|
|
|
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
|
|
# details.
|
2012-11-23 14:22:47 +01:00
|
|
|
# configure_input: @configure_input@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
# This makefile requires GNU make.
|
2012-11-23 14:22:47 +01:00
|
|
|
|
2011-04-04 17:01:43 +02:00
|
|
|
srcdir:=@srcdir@
|
2012-11-23 14:22:47 +01:00
|
|
|
target_builddir:=@target_builddir@
|
|
|
|
winsup_srcdir:=@winsup_srcdir@
|
|
|
|
configure_args=@configure_args@
|
|
|
|
|
|
|
|
export CC:=@CC@
|
|
|
|
export CXX:=@CXX@
|
|
|
|
|
|
|
|
CFLAGS?=@CFLAGS@
|
|
|
|
CXXFLAGS?=@CXXFLAGS@
|
|
|
|
|
2012-07-09 11:00:56 +02:00
|
|
|
include ${srcdir}/../Makefile.common
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2012-11-23 14:22:47 +01:00
|
|
|
# environment variables used by ccwrap
|
|
|
|
export CCWRAP_HEADERS:=. ${srcdir}
|
|
|
|
export CCWRAP_SYSTEM_HEADERS:=@cygwin_headers@ @newlib_headers@
|
|
|
|
export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
Add missing long double functions to Cygwin
This patch adds the long double functions missing in newlib to Cygwin.
Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l},
isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib.
Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and
fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin.
Cygwin:
* math: New subdir with math functions.
* Makefile.in (VPATH): Add math subdir.
(MATH_OFILES): List of object files collected from building files in
math subdir.
(DLL_OFILES): Add $(MATH_OFILES).
${CURDIR}/libm.a: Add $(MATH_OFILES) to build.
* common.din: Add new functions from math subdir.
* i686.din: Align to new math subdir. Remove functions now commonly
available.
* x86_64.din: Ditto.
* math.h: math.h wrapper to define mingw structs used in some files in
math subdir.
* include/cygwin/version.h: Bump API minor version.
newlib:
* libc/include/complex.h: Add prototypes for complex long double
functions. Only define for Cygwin.
* libc/include/math.h: Additionally enable prototypes of long double
functions for Cygwin. Add Cygwin-only prototypes for dreml, sincosl,
exp10l and pow10l. Explain why we don't add them to newlib.
* libc/include/tgmath.h: Enable long double handling on Cygwin.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-28 19:35:20 +02:00
|
|
|
VPATH+=$(srcdir)/regex $(srcdir)/lib $(srcdir)/libc $(srcdir)/math
|
2000-07-01 05:51:55 +02:00
|
|
|
|
2013-04-23 11:44:36 +02:00
|
|
|
target_cpu:=@target_cpu@
|
2000-02-17 20:38:33 +01:00
|
|
|
target_alias:=@target_alias@
|
|
|
|
build_alias:=@build_alias@
|
|
|
|
host_alias:=@host_alias@
|
|
|
|
prefix:=@prefix@
|
|
|
|
|
|
|
|
program_transform_name:=@program_transform_name@
|
|
|
|
exec_prefix:=@exec_prefix@
|
|
|
|
bindir:=@bindir@
|
|
|
|
libdir:=@libdir@
|
2004-01-20 00:03:43 +01:00
|
|
|
mandir:=@mandir@
|
2008-04-05 11:30:06 +02:00
|
|
|
sysconfdir:=@sysconfdir@
|
2012-11-23 14:22:47 +01:00
|
|
|
datarootdir:=@datarootdir@
|
2000-02-17 20:38:33 +01:00
|
|
|
ifeq ($(target_alias),$(host_alias))
|
|
|
|
ifeq ($(build_alias),$(host_alias))
|
|
|
|
tooldir:=$(exec_prefix)
|
|
|
|
else
|
|
|
|
tooldir:=$(exec_prefix)/$(target_alias)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
tooldir:=$(exec_prefix)/$(target_alias)
|
|
|
|
endif
|
|
|
|
datadir:=@datadir@
|
|
|
|
infodir:=@infodir@
|
|
|
|
includedir:=@includedir@
|
|
|
|
|
2003-07-26 02:10:48 +02:00
|
|
|
override INSTALL:=@INSTALL@
|
|
|
|
override INSTALL_PROGRAM:=@INSTALL_PROGRAM@
|
|
|
|
override INSTALL_DATA:=@INSTALL_DATA@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2012-11-23 14:22:47 +01:00
|
|
|
WINDOWS_LIBDIR:=@windows_libdir@
|
|
|
|
|
|
|
|
cygserver_blddir:=${target_builddir}/winsup/cygserver
|
|
|
|
LIBSERVER:=${cygserver_blddir}/libcygserver.a
|
|
|
|
|
|
|
|
LIBC:=$(newlib_build)/libc/libc.a
|
|
|
|
LIBM:=$(newlib_build)/libm/libm.a
|
|
|
|
CRT0:=$(cygwin_build)/crt0.o
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
#
|
|
|
|
# --enable options from configure
|
|
|
|
#
|
2001-12-20 03:55:11 +01:00
|
|
|
MT_SAFE:=@MT_SAFE@
|
2012-11-23 14:22:47 +01:00
|
|
|
CCEXTRA=
|
2017-09-17 04:04:20 +02:00
|
|
|
COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Werror -fmerge-constants -ftracer $(CCEXTRA)
|
2013-04-23 11:44:36 +02:00
|
|
|
ifeq ($(target_cpu),x86_64)
|
|
|
|
COMMON_CFLAGS+=-mcmodel=small
|
|
|
|
endif
|
2017-09-12 21:30:34 +02:00
|
|
|
COMPILE.cc+=${COMMON_CFLAGS} -std=gnu++98
|
2012-11-23 14:22:47 +01:00
|
|
|
COMPILE.c+=${COMMON_CFLAGS}
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
AR:=@AR@
|
|
|
|
AR_FLAGS:=qv
|
|
|
|
RANLIB:=@RANLIB@
|
|
|
|
LD:=@LD@
|
|
|
|
DLLTOOL:=@DLLTOOL@
|
|
|
|
WINDRES:=@WINDRES@
|
|
|
|
AS:=@AS@
|
2001-12-20 03:55:11 +01:00
|
|
|
NM:=@NM@
|
2005-08-08 04:27:43 +02:00
|
|
|
OBJCOPY:=@OBJCOPY@
|
|
|
|
OBJDUMP:=@OBJDUMP@
|
|
|
|
STRIP:=@STRIP@
|
2001-12-20 03:55:11 +01:00
|
|
|
LDSCRIPT:=cygwin.sc
|
2005-10-17 05:20:20 +02:00
|
|
|
MKDIRP:=$(INSTALL) -m 755 -d
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
# Setup the testing framework, if you have one
|
|
|
|
EXPECT = `if [ -f $${rootme}/../../expect/expect$(EXEEXT) ] ; then \
|
2002-09-22 02:46:24 +02:00
|
|
|
echo $${rootme}/../../expect/expect$(EXEEXT) ; \
|
|
|
|
else echo expect ; fi`
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
|
|
|
|
echo $${srcdir}/../dejagnu/runtest ; \
|
|
|
|
else echo runtest; fi`
|
|
|
|
RUNTESTFLAGS =
|
|
|
|
|
|
|
|
# Parameters used in building the cygwin.dll.
|
2003-03-09 18:01:41 +01:00
|
|
|
# We build as cygwin0.dll and rename at install time to overcome
|
2000-02-17 20:38:33 +01:00
|
|
|
# native rebuilding issues (we don't want the build tools to see a partially
|
|
|
|
# built cygwin.dll and attempt to use it instead of the old one).
|
|
|
|
|
2013-04-23 11:44:36 +02:00
|
|
|
DLL_NAME:=@DLL_NAME@
|
|
|
|
TEST_DLL_NAME:=${patsubst %1.dll,%0.dll,@DLL_NAME@}
|
2003-03-09 18:01:41 +01:00
|
|
|
TEST_LIB_NAME:=libcygwin0.a
|
2009-01-03 06:12:22 +01:00
|
|
|
STATIC_LIB_NAME:=libcygwin_s.a
|
2013-05-01 01:43:08 +02:00
|
|
|
DIN_FILE=@DIN_FILE@ common.din
|
2000-02-17 20:38:33 +01:00
|
|
|
DEF_FILE:=cygwin.def
|
2013-04-23 11:44:36 +02:00
|
|
|
TLSOFFSETS_H:=@TLSOFFSETS_H@
|
2000-02-17 20:38:33 +01:00
|
|
|
DLL_ENTRY:=@DLL_ENTRY@
|
|
|
|
|
|
|
|
LIBGMON_A:=libgmon.a
|
2003-05-12 13:06:27 +02:00
|
|
|
CYGWIN_START:=crt0.o
|
2000-02-17 20:38:33 +01:00
|
|
|
GMON_START:=gcrt0.o
|
|
|
|
|
2013-04-23 11:44:36 +02:00
|
|
|
toolopts:=--cpu=${target_cpu} --ar=${AR} --as=${AS} --nm=${NM} --objcopy=${OBJCOPY}
|
2009-04-12 05:19:52 +02:00
|
|
|
speclib=\
|
|
|
|
${srcdir}/speclib ${toolopts} \
|
|
|
|
--exclude='cygwin' \
|
|
|
|
--exclude='(?i:dll)' \
|
|
|
|
--exclude='reloc' \
|
2013-04-23 11:44:36 +02:00
|
|
|
--exclude='^main$$' \
|
2009-04-12 05:19:52 +02:00
|
|
|
--exclude='^_main$$' \
|
|
|
|
$^
|
2009-03-28 05:55:36 +01:00
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
# Some things want these from libc, but they have their own static
|
|
|
|
# data which apps can get to, which is a pain in the dll, so we
|
|
|
|
# include them directly into the library.
|
|
|
|
|
2000-07-01 05:51:55 +02:00
|
|
|
LIBCOS:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.c}}}} \
|
|
|
|
${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.cc}}}}}
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
# Build all source files in the config directory
|
|
|
|
|
2007-07-08 17:04:34 +02:00
|
|
|
EXTRA_OFILES:=
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2013-04-23 11:44:36 +02:00
|
|
|
MALLOC_OFILES:=malloc.o
|
2001-04-24 17:25:31 +02:00
|
|
|
|
2012-10-24 12:12:45 +02:00
|
|
|
DLL_IMPORTS:=${shell $(CC) -print-file-name=w32api/libkernel32.a} ${shell $(CC) -print-file-name=w32api/libntdll.a}
|
2000-02-17 20:38:33 +01:00
|
|
|
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
MT_SAFE_OBJECTS:=
|
2003-11-28 21:55:59 +01:00
|
|
|
#
|
Add missing long double functions to Cygwin
This patch adds the long double functions missing in newlib to Cygwin.
Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l},
isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib.
Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and
fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin.
Cygwin:
* math: New subdir with math functions.
* Makefile.in (VPATH): Add math subdir.
(MATH_OFILES): List of object files collected from building files in
math subdir.
(DLL_OFILES): Add $(MATH_OFILES).
${CURDIR}/libm.a: Add $(MATH_OFILES) to build.
* common.din: Add new functions from math subdir.
* i686.din: Align to new math subdir. Remove functions now commonly
available.
* x86_64.din: Ditto.
* math.h: math.h wrapper to define mingw structs used in some files in
math subdir.
* include/cygwin/version.h: Bump API minor version.
newlib:
* libc/include/complex.h: Add prototypes for complex long double
functions. Only define for Cygwin.
* libc/include/math.h: Additionally enable prototypes of long double
functions for Cygwin. Add Cygwin-only prototypes for dreml, sincosl,
exp10l and pow10l. Explain why we don't add them to newlib.
* libc/include/tgmath.h: Enable long double handling on Cygwin.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-28 19:35:20 +02:00
|
|
|
MATH_OFILES:= \
|
|
|
|
acoshl.o \
|
|
|
|
acosl.o \
|
|
|
|
asinhl.o \
|
|
|
|
asinl.o \
|
|
|
|
atan2l.o \
|
|
|
|
atanhl.o \
|
|
|
|
atanl.o \
|
|
|
|
cabsl.o \
|
|
|
|
cacosl.o \
|
|
|
|
cargl.o \
|
|
|
|
casinl.o \
|
|
|
|
catanl.o \
|
|
|
|
cbrtl.o \
|
|
|
|
ccosl.o \
|
|
|
|
ceill.o \
|
|
|
|
cephes_emath.o \
|
|
|
|
cexpl.o \
|
|
|
|
cimagl.o \
|
|
|
|
clog10l.o \
|
|
|
|
clogl.o \
|
|
|
|
conjl.o \
|
|
|
|
copysignl.o \
|
|
|
|
coshl.o \
|
|
|
|
cosl.o \
|
|
|
|
cosl_internal.o \
|
|
|
|
cossin.o \
|
|
|
|
cpowl.o \
|
|
|
|
cprojl.o \
|
|
|
|
creall.o \
|
|
|
|
csinl.o \
|
|
|
|
csqrtl.o \
|
|
|
|
ctanl.o \
|
|
|
|
erfl.o \
|
|
|
|
exp10l.o \
|
|
|
|
exp2l.o \
|
|
|
|
expl.o \
|
|
|
|
expm1l.o \
|
|
|
|
fabsl.o \
|
|
|
|
fdiml.o \
|
|
|
|
finite.o \
|
|
|
|
floorl.o \
|
|
|
|
fmal.o \
|
|
|
|
fmaxl.o \
|
|
|
|
fminl.o \
|
|
|
|
fmodl.o \
|
|
|
|
frexpl.o \
|
|
|
|
ilogbl.o \
|
|
|
|
internal_logl.o \
|
|
|
|
isinf.o \
|
|
|
|
isnan.o \
|
|
|
|
ldexpl.o \
|
|
|
|
lgammal.o \
|
|
|
|
llrint.o \
|
|
|
|
llrintf.o \
|
|
|
|
llrintl.o \
|
|
|
|
llroundl.o \
|
|
|
|
log10l.o \
|
|
|
|
log1pl.o \
|
|
|
|
log2l.o \
|
|
|
|
logbl.o \
|
|
|
|
logl.o \
|
|
|
|
lrint.o \
|
|
|
|
lrintf.o \
|
|
|
|
lrintl.o \
|
|
|
|
lroundl.o \
|
|
|
|
modfl.o \
|
|
|
|
nearbyint.o \
|
|
|
|
nearbyintf.o \
|
|
|
|
nearbyintl.o \
|
|
|
|
nextafterl.o \
|
|
|
|
nexttoward.o \
|
|
|
|
nexttowardf.o \
|
|
|
|
pow10l.o \
|
|
|
|
powil.o \
|
|
|
|
powl.o \
|
|
|
|
remainder.o \
|
|
|
|
remainderf.o \
|
|
|
|
remainderl.o \
|
|
|
|
remquol.o \
|
|
|
|
rint.o \
|
|
|
|
rintf.o \
|
|
|
|
rintl.o \
|
|
|
|
roundl.o \
|
|
|
|
scalbl.o \
|
|
|
|
scalbnl.o \
|
|
|
|
sinhl.o \
|
|
|
|
sinl.o \
|
|
|
|
sinl_internal.o \
|
|
|
|
sqrtl.o \
|
|
|
|
tanhl.o \
|
|
|
|
tanl.o \
|
|
|
|
tgammal.o \
|
|
|
|
truncl.o
|
|
|
|
|
2014-10-16 17:40:09 +02:00
|
|
|
DLL_OFILES:= \
|
|
|
|
advapi32.o \
|
2018-07-24 07:31:59 +02:00
|
|
|
aio.o \
|
2016-03-21 08:12:54 +01:00
|
|
|
arc4random_stir.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
assert.o \
|
|
|
|
autoload.o \
|
|
|
|
base64.o \
|
|
|
|
bsdlib.o \
|
2018-11-27 13:47:02 +01:00
|
|
|
clock.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
ctype.o \
|
|
|
|
cxx.o \
|
|
|
|
cygheap.o \
|
|
|
|
cygthread.o \
|
|
|
|
cygtls.o \
|
|
|
|
cygwait.o \
|
|
|
|
cygxdr.o \
|
|
|
|
dcrt0.o \
|
|
|
|
debug.o \
|
|
|
|
devices.o \
|
|
|
|
dir.o \
|
|
|
|
dlfcn.o \
|
|
|
|
dll_init.o \
|
|
|
|
dtable.o \
|
|
|
|
environ.o \
|
|
|
|
errno.o \
|
|
|
|
exceptions.o \
|
|
|
|
exec.o \
|
|
|
|
external.o \
|
|
|
|
fcntl.o \
|
|
|
|
fenv.o \
|
|
|
|
fhandler.o \
|
|
|
|
fhandler_clipboard.o \
|
|
|
|
fhandler_console.o \
|
2019-01-07 12:29:07 +01:00
|
|
|
fhandler_cygdrive.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
fhandler_dev.o \
|
|
|
|
fhandler_disk_file.o \
|
|
|
|
fhandler_dsp.o \
|
|
|
|
fhandler_fifo.o \
|
|
|
|
fhandler_floppy.o \
|
|
|
|
fhandler_netdrive.o \
|
|
|
|
fhandler_nodevice.o \
|
2019-01-07 12:31:28 +01:00
|
|
|
fhandler_pipe.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
fhandler_proc.o \
|
|
|
|
fhandler_process.o \
|
2019-01-06 20:18:14 +01:00
|
|
|
fhandler_process_fd.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
fhandler_procnet.o \
|
|
|
|
fhandler_procsys.o \
|
|
|
|
fhandler_procsysvipc.o \
|
|
|
|
fhandler_random.o \
|
|
|
|
fhandler_raw.o \
|
|
|
|
fhandler_registry.o \
|
|
|
|
fhandler_serial.o \
|
2019-01-13 23:13:33 +01:00
|
|
|
fhandler_signalfd.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
fhandler_socket.o \
|
2018-02-21 21:40:01 +01:00
|
|
|
fhandler_socket_inet.o \
|
|
|
|
fhandler_socket_local.o \
|
2018-02-23 20:59:21 +01:00
|
|
|
fhandler_socket_unix.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
fhandler_tape.o \
|
|
|
|
fhandler_termios.o \
|
2019-01-15 22:02:33 +01:00
|
|
|
fhandler_timerfd.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
fhandler_tty.o \
|
|
|
|
fhandler_virtual.o \
|
|
|
|
fhandler_windows.o \
|
|
|
|
fhandler_zero.o \
|
|
|
|
flock.o \
|
|
|
|
fnmatch.o \
|
|
|
|
fork.o \
|
|
|
|
fts.o \
|
|
|
|
ftw.o \
|
2017-01-19 20:58:06 +01:00
|
|
|
getentropy.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
getopt.o \
|
|
|
|
glob.o \
|
|
|
|
glob_pattern_p.o \
|
|
|
|
globals.o \
|
|
|
|
grp.o \
|
|
|
|
heap.o \
|
|
|
|
hookapi.o \
|
|
|
|
inet_addr.o \
|
|
|
|
inet_network.o \
|
|
|
|
init.o \
|
|
|
|
ioctl.o \
|
|
|
|
ipc.o \
|
|
|
|
kernel32.o \
|
|
|
|
ldap.o \
|
|
|
|
libstdcxx_wrapper.o \
|
2017-03-21 20:17:42 +01:00
|
|
|
loadavg.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
localtime.o \
|
|
|
|
lsearch.o \
|
|
|
|
malloc_wrapper.o \
|
|
|
|
minires-os-if.o \
|
|
|
|
minires.o \
|
|
|
|
miscfuncs.o \
|
|
|
|
mktemp.o \
|
|
|
|
mmap.o \
|
|
|
|
msg.o \
|
2018-01-19 06:26:41 +01:00
|
|
|
msgcat.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
mount.o \
|
|
|
|
net.o \
|
|
|
|
netdb.o \
|
|
|
|
nfs.o \
|
|
|
|
nftw.o \
|
|
|
|
nlsfuncs.o \
|
|
|
|
ntea.o \
|
|
|
|
passwd.o \
|
|
|
|
path.o \
|
|
|
|
pinfo.o \
|
|
|
|
poll.o \
|
|
|
|
posix_ipc.o \
|
2019-01-22 15:23:05 +01:00
|
|
|
posix_timer.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
pseudo-reloc.o \
|
|
|
|
pthread.o \
|
2014-10-17 10:19:27 +02:00
|
|
|
quotactl.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
random.o \
|
|
|
|
regcomp.o \
|
|
|
|
regerror.o \
|
|
|
|
regexec.o \
|
|
|
|
regfree.o \
|
|
|
|
registry.o \
|
|
|
|
resource.o \
|
|
|
|
rexec.o \
|
|
|
|
rcmd.o \
|
|
|
|
scandir.o \
|
|
|
|
sched.o \
|
|
|
|
sec_acl.o \
|
|
|
|
sec_auth.o \
|
|
|
|
sec_helper.o \
|
2016-01-06 18:41:36 +01:00
|
|
|
sec_posixacl.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
security.o \
|
|
|
|
select.o \
|
|
|
|
sem.o \
|
|
|
|
setlsapwd.o \
|
|
|
|
shared.o \
|
|
|
|
shm.o \
|
|
|
|
sigfe.o \
|
|
|
|
signal.o \
|
|
|
|
sigproc.o \
|
|
|
|
smallprint.o \
|
|
|
|
spawn.o \
|
|
|
|
strace.o \
|
|
|
|
strfmon.o \
|
|
|
|
strfuncs.o \
|
|
|
|
strptime.o \
|
|
|
|
strsep.o \
|
|
|
|
strsig.o \
|
|
|
|
sync.o \
|
|
|
|
syscalls.o \
|
|
|
|
sysconf.o \
|
|
|
|
syslog.o \
|
|
|
|
termios.o \
|
|
|
|
thread.o \
|
2019-01-19 19:53:48 +01:00
|
|
|
timerfd.o \
|
2014-10-16 17:40:09 +02:00
|
|
|
times.o \
|
|
|
|
tls_pbuf.o \
|
|
|
|
tty.o \
|
|
|
|
uinfo.o \
|
|
|
|
uname.o \
|
|
|
|
wait.o \
|
|
|
|
wincap.o \
|
|
|
|
window.o \
|
|
|
|
winf.o \
|
|
|
|
xsique.o \
|
|
|
|
$(EXTRA_OFILES) \
|
|
|
|
$(MALLOC_OFILES) \
|
Add missing long double functions to Cygwin
This patch adds the long double functions missing in newlib to Cygwin.
Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l},
isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib.
Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and
fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin.
Cygwin:
* math: New subdir with math functions.
* Makefile.in (VPATH): Add math subdir.
(MATH_OFILES): List of object files collected from building files in
math subdir.
(DLL_OFILES): Add $(MATH_OFILES).
${CURDIR}/libm.a: Add $(MATH_OFILES) to build.
* common.din: Add new functions from math subdir.
* i686.din: Align to new math subdir. Remove functions now commonly
available.
* x86_64.din: Ditto.
* math.h: math.h wrapper to define mingw structs used in some files in
math subdir.
* include/cygwin/version.h: Bump API minor version.
newlib:
* libc/include/complex.h: Add prototypes for complex long double
functions. Only define for Cygwin.
* libc/include/math.h: Additionally enable prototypes of long double
functions for Cygwin. Add Cygwin-only prototypes for dreml, sincosl,
exp10l and pow10l. Explain why we don't add them to newlib.
* libc/include/tgmath.h: Enable long double handling on Cygwin.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-28 19:35:20 +02:00
|
|
|
$(MATH_OFILES) \
|
2014-10-16 17:40:09 +02:00
|
|
|
$(MT_SAFE_OBJECTS)
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2009-01-03 06:12:22 +01:00
|
|
|
EXCLUDE_STATIC_OFILES:=$(addprefix --exclude=,\
|
|
|
|
cygtls.o \
|
|
|
|
dcrt0.o \
|
|
|
|
exceptions.o \
|
|
|
|
fork.o \
|
|
|
|
signal.o \
|
|
|
|
spawn.o \
|
|
|
|
)
|
|
|
|
|
2015-01-28 12:43:06 +01:00
|
|
|
VERSION_OFILES:=version.o winver.o
|
|
|
|
|
2012-11-23 14:22:47 +01:00
|
|
|
ifdef PREPROCESS
|
|
|
|
override DLL_OFILES:=$(patsubst %.o,%_E,${DLL_OFILES})
|
|
|
|
override EXCLUDE_STATIC_OFILES:=$(patsubst %.o,%_E,${EXCLUDE_STATIC_OFILES})
|
|
|
|
override EXTRA_OFILES=$(patsubst %.o,%_E,${DLL_OFILES}))
|
|
|
|
override MALLOC_OFILES:=$(patsubst %.o,%.E,${MALLOC_OFILES})
|
|
|
|
endif #PREPROCESS
|
|
|
|
|
2013-06-18 11:45:37 +02:00
|
|
|
ifeq ($(target_cpu),x86_64)
|
|
|
|
# Needed by mcountFunc.S to choose the right code path and symbol names
|
|
|
|
ASFLAGS:=-D_WIN64
|
|
|
|
endif
|
|
|
|
|
|
|
|
GMON_OFILES:=gmon.o mcount.o profil.o mcountFunc.o
|
2001-12-20 03:55:11 +01:00
|
|
|
|
2014-11-05 10:28:01 +01:00
|
|
|
NEW_FUNCTIONS:=$(addprefix --replace=,\
|
2014-11-05 10:48:00 +01:00
|
|
|
atexit= \
|
2014-11-05 10:28:01 +01:00
|
|
|
timezone= \
|
2019-01-24 12:01:01 +01:00
|
|
|
uname=uname_x \
|
2014-11-05 10:28:01 +01:00
|
|
|
__xdrrec_getrec= \
|
|
|
|
__xdrrec_setnonblock= \
|
|
|
|
xdr_array= \
|
|
|
|
xdr_bool= \
|
|
|
|
xdr_bytes= \
|
|
|
|
xdr_char= \
|
|
|
|
xdr_double= \
|
|
|
|
xdr_enum= \
|
|
|
|
xdr_float= \
|
|
|
|
xdr_free= \
|
|
|
|
xdr_hyper= \
|
|
|
|
xdr_int= \
|
|
|
|
xdr_int16_t= \
|
|
|
|
xdr_int32_t= \
|
|
|
|
xdr_int64_t= \
|
|
|
|
xdr_int8_t= \
|
|
|
|
xdr_long= \
|
|
|
|
xdr_longlong_t= \
|
|
|
|
xdr_netobj= \
|
|
|
|
xdr_opaque= \
|
|
|
|
xdr_pointer= \
|
|
|
|
xdr_reference= \
|
|
|
|
xdr_short= \
|
|
|
|
xdr_sizeof= \
|
|
|
|
xdr_string= \
|
|
|
|
xdr_u_char= \
|
|
|
|
xdr_u_hyper= \
|
|
|
|
xdr_u_int= \
|
|
|
|
xdr_u_int16_t= \
|
|
|
|
xdr_u_int32_t= \
|
|
|
|
xdr_u_int64_t= \
|
|
|
|
xdr_u_int8_t= \
|
|
|
|
xdr_u_long= \
|
|
|
|
xdr_u_longlong_t= \
|
|
|
|
xdr_u_short= \
|
|
|
|
xdr_uint16_t= \
|
|
|
|
xdr_uint32_t= \
|
|
|
|
xdr_uint64_t= \
|
|
|
|
xdr_uint8_t= \
|
|
|
|
xdr_union= \
|
|
|
|
xdr_vector= \
|
|
|
|
xdr_void= \
|
|
|
|
xdr_wrapstring= \
|
|
|
|
xdrmem_create= \
|
|
|
|
xdrrec_create= \
|
|
|
|
xdrrec_endofrecord= \
|
|
|
|
xdrrec_eof= \
|
|
|
|
xdrrec_skiprecord= \
|
|
|
|
xdrstdio_create= \
|
|
|
|
)
|
2013-04-23 11:44:36 +02:00
|
|
|
ifeq ($(target_cpu),x86_64)
|
2014-11-05 10:28:01 +01:00
|
|
|
NEW_FUNCTIONS+=
|
2013-04-23 11:44:36 +02:00
|
|
|
else
|
2014-11-05 10:28:01 +01:00
|
|
|
NEW_FUNCTIONS+=$(addprefix --replace=,\
|
2009-04-12 05:19:52 +02:00
|
|
|
acl=_acl32 \
|
|
|
|
aclcheck=_aclcheck32 \
|
|
|
|
aclfrommode=_aclfrommode32 \
|
|
|
|
aclfrompbits=_aclfrompbits32 \
|
|
|
|
aclfromtext=_aclfromtext32 \
|
|
|
|
aclsort=_aclsort32 \
|
|
|
|
acltomode=_acltomode32 \
|
|
|
|
acltopbits=_acltopbits32 \
|
|
|
|
acltotext=_acltotext32 \
|
|
|
|
chown=_chown32 \
|
|
|
|
facl=_facl32 \
|
|
|
|
fchown=_fchown32 \
|
|
|
|
fcntl=_fcntl64 \
|
|
|
|
fdopen=_fdopen64 \
|
|
|
|
fgetpos=_fgetpos64 \
|
|
|
|
fopen=_fopen64 \
|
|
|
|
freopen=_freopen64 \
|
|
|
|
fseeko=_fseeko64 \
|
|
|
|
fsetpos=_fsetpos64 \
|
|
|
|
fstat=_fstat64 \
|
|
|
|
ftello=_ftello64 \
|
|
|
|
ftruncate=_ftruncate64 \
|
|
|
|
getegid=_getegid32 \
|
|
|
|
geteuid=_geteuid32 \
|
|
|
|
getgid=_getgid32 \
|
|
|
|
getgrent=_getgrent32 \
|
|
|
|
getgrgid=_getgrgid32 \
|
|
|
|
getgrnam=_getgrnam32 \
|
|
|
|
getgroups=_getgroups32 \
|
|
|
|
getpwuid=_getpwuid32 \
|
|
|
|
getpwuid_r=_getpwuid_r32 \
|
|
|
|
getuid=_getuid32 \
|
|
|
|
initgroups=_initgroups32 \
|
|
|
|
lchown=_lchown32 \
|
|
|
|
lseek=_lseek64 \
|
|
|
|
lstat=_lstat64 \
|
|
|
|
mknod=_mknod32 \
|
|
|
|
mmap=_mmap64 \
|
|
|
|
open=_open64 \
|
|
|
|
setegid=_setegid32 \
|
|
|
|
seteuid=_seteuid32 \
|
|
|
|
setgid=_setgid32 \
|
|
|
|
setgroups=_setgroups32 \
|
|
|
|
setregid=_setregid32 \
|
|
|
|
setreuid=_setreuid32 \
|
|
|
|
setuid=_setuid32 \
|
|
|
|
stat=_stat64 \
|
|
|
|
tmpfile=_tmpfile64 \
|
|
|
|
truncate=_truncate64 \
|
|
|
|
)
|
2013-04-23 11:44:36 +02:00
|
|
|
endif
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2002-07-25 11:09:34 +02:00
|
|
|
API_VER:=$(srcdir)/include/cygwin/version.h
|
|
|
|
|
2009-03-28 05:55:36 +01:00
|
|
|
LIB_NAME:=libcygwin.a
|
2017-11-28 06:56:30 +01:00
|
|
|
SUBLIBS:=libpthread.a libutil.a ${CURDIR}/libm.a ${CURDIR}/libc.a libdl.a libresolv.a librt.a libacl.a libssp.a
|
2004-04-06 16:22:43 +02:00
|
|
|
EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a libtextreadmode.a
|
|
|
|
INSTOBJS:=automode.o binmode.o textmode.o textreadmode.o
|
2003-08-06 03:40:12 +02:00
|
|
|
TARGET_LIBS:=$(LIB_NAME) $(CYGWIN_START) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $(INSTOBJS) $(EXTRALIBS)
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
|
|
|
|
ifneq "${filter -O%,$(CFLAGS)}" ""
|
2015-04-05 00:31:03 +02:00
|
|
|
dtable_CFLAGS:=-fcheck-new
|
2013-05-14 15:34:05 +02:00
|
|
|
localtime_CFLAGS:=-fwrapv
|
2015-04-05 00:31:03 +02:00
|
|
|
malloc_CFLAGS:=-O3
|
|
|
|
sync_CFLAGS:=-O3
|
|
|
|
ifeq ($(target_cpu),i686)
|
|
|
|
# on x86, exceptions.cc must be compiled with a frame-pointer as it uses RtlCaptureContext()
|
|
|
|
exceptions_CFLAGS:=-fno-omit-frame-pointer
|
|
|
|
endif
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
endif
|
|
|
|
|
2011-04-04 13:12:48 +02:00
|
|
|
fhandler_proc_CFLAGS+=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\""
|
|
|
|
fhandler_proc_CFLAGS+=-DGCC_VERSION="\"`$(CC) -v 2>&1 | tail -n 1`\""
|
|
|
|
|
winsup/ChangeLog:
* Makefile.common (COMPILE_CXX): Add support for per-file overrides
to exclude $(nostdinc) and $(nostdincxx) from compiler flags.
(COMPILE_CC): Likewise for $(nostdinc).
winsup/cygwin/ChangeLog:
* Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o
(libstdcxx_wrapper_CFLAGS): Add flags for new module.
(_cygwin_crt0_common_STDINCFLAGS): Define per-file override.
(libstdcxx_wrapper_STDINCFLAGS, cxx_STDINCFLAGS): Likewise.
* cxx.cc: Include "cygwin-cxx.h".
(operator new): Tweak prototype for full standards compliance.
(operator new[]): Likewise.
(operator new (nothrow)): New fallback function.
(operator new[] (nothrow), operator delete (nothrow),
operator delete[] (nothrow)): Likewise.
(default_cygwin_cxx_malloc): New struct of pointers to the above,
for final last-resort fallback default.
* cygwin-cxx.h: New file.
(struct per_process_cxx_malloc): Define.
(default_cygwin_cxx_malloc): Declare extern.
* cygwin.din (__wrap__ZdaPv): Export new wrapper.
(__wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
__wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
__wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
__wrap__ZnwjRKSt9nothrow_t): Likewise.
* globals.cc (__cygwin_user_data): Init newly-repurposed 'forkee'
field (now 'cxx_malloc') to point to default_cygwin_cxx_malloc.
* libstdcxx_wrapper.cc: New file.
(__wrap__ZdaPv, __wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
__wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
__wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
__wrap__ZnwjRKSt9nothrow_t): Define wrapper functions for libstdc++
malloc operators and their overrides.
* winsup.h (default_cygwin_cxx_malloc): Declare extern.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* include/sys/cygwin.h (struct per_process_cxx_malloc): Forward
declare here.
(struct per_process::forkee): Rename and repurpose from this ...
(struct per_process::cxx_malloc): ... to this.
* lib/_cygwin_crt0_common.cc: Include cygwin-cxx.h.
(WEAK): Define shorthand helper macro.
(__cygwin_cxx_malloc): Define and populate with weak references
to whatever libstdc++ malloc operators will be visible at final
link time for Cygwin apps and dlls.
(_cygwin_crt0_common): Always look up cygwin DLL's internal
per_process data, and don't test for (impossible) failure. Inherit
any members of __cygwin_cxx_malloc that we don't have overrides
for from the DLL's default and store the resulting overall set of
overrides back into the DLL's global per_process data.
2009-07-07 22:12:44 +02:00
|
|
|
_cygwin_crt0_common_STDINCFLAGS:=yes
|
|
|
|
libstdcxx_wrapper_STDINCFLAGS:=yes
|
|
|
|
cxx_STDINCFLAGS:=yes
|
|
|
|
|
2016-06-05 18:58:22 +02:00
|
|
|
.PHONY: all force dll_ofiles install all_target install_target all_host \
|
|
|
|
install_host install install-libs install-headers \
|
|
|
|
clean distclean realclean maintainer-clean
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2000-06-17 19:54:05 +02:00
|
|
|
all_host=@all_host@
|
|
|
|
install_host=@install_host@
|
|
|
|
|
2001-09-15 06:36:43 +02:00
|
|
|
all: all_target $(all_host)
|
2000-06-17 19:54:05 +02:00
|
|
|
|
2003-07-02 05:16:00 +02:00
|
|
|
all_target: $(TARGET_LIBS)
|
2000-06-17 19:54:05 +02:00
|
|
|
|
2003-03-09 18:01:41 +01:00
|
|
|
all_host: $(TEST_LIB_NAME)
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
force:
|
|
|
|
|
2014-11-26 20:46:59 +01:00
|
|
|
install: install-libs install-headers install-man install-ldif install_target \
|
2002-02-28 15:30:38 +01:00
|
|
|
$(install_host) $(install_target)
|
2001-07-29 04:33:30 +02:00
|
|
|
|
2002-05-18 08:10:16 +02:00
|
|
|
uninstall: uninstall-libs uninstall-headers uninstall-man
|
2002-01-08 05:51:01 +01:00
|
|
|
|
2001-12-31 04:19:29 +01:00
|
|
|
install-libs: $(TARGET_LIBS)
|
2009-02-24 03:11:14 +01:00
|
|
|
@$(MKDIRP) $(DESTDIR)$(bindir)
|
|
|
|
$(INSTALL_PROGRAM) $(TEST_DLL_NAME) $(DESTDIR)$(bindir)/$(DLL_NAME); \
|
2001-12-31 04:19:29 +01:00
|
|
|
for i in $^; do \
|
2009-02-24 03:11:14 +01:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/lib/`basename $$i` ; \
|
2001-07-29 04:33:30 +02:00
|
|
|
done
|
2009-02-24 03:11:14 +01:00
|
|
|
cd $(DESTDIR)$(tooldir)/lib && ln -sf libcygwin.a libg.a
|
2001-07-29 04:33:30 +02:00
|
|
|
|
|
|
|
install-headers:
|
2000-02-17 20:38:33 +01:00
|
|
|
cd $(srcdir); \
|
|
|
|
for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
|
2009-02-24 03:11:14 +01:00
|
|
|
$(MKDIRP) $(DESTDIR)$(tooldir)/$$sub; \
|
2000-02-17 20:38:33 +01:00
|
|
|
for i in $$sub/*.h ; do \
|
2009-02-24 03:11:14 +01:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/$$sub/`basename $$i` ; \
|
2000-02-17 20:38:33 +01:00
|
|
|
done ; \
|
2000-04-26 20:19:22 +02:00
|
|
|
done ; \
|
2001-12-20 03:55:11 +01:00
|
|
|
|
|
|
|
install-man:
|
2009-02-24 03:11:14 +01:00
|
|
|
@$(MKDIRP) $(DESTDIR)$(mandir)/man2 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7
|
2001-12-20 03:55:11 +01:00
|
|
|
cd $(srcdir); \
|
2015-06-18 22:04:58 +02:00
|
|
|
for i in `find . -type f ! -path './release/*' -name '*.2'`; do \
|
2009-02-24 03:11:14 +01:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man2/`basename $$i` ; \
|
2001-12-20 03:55:11 +01:00
|
|
|
done; \
|
2015-06-18 22:04:58 +02:00
|
|
|
for i in `find . -type f ! -path './release/*' -name '*.3'`; do \
|
2009-02-24 03:11:14 +01:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man3/`basename $$i` ; \
|
2001-12-20 03:55:11 +01:00
|
|
|
done; \
|
2015-06-18 22:04:58 +02:00
|
|
|
for i in `find . -type f ! -path './release/*' -name '*.5'`; do \
|
2009-02-24 03:11:14 +01:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man5/`basename $$i` ; \
|
2001-12-20 03:55:11 +01:00
|
|
|
done; \
|
2015-06-18 22:04:58 +02:00
|
|
|
for i in `find . -type f ! -path './release/*' -name '*.7'`; do \
|
2009-02-24 03:11:14 +01:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man7/`basename $$i` ; \
|
2001-12-20 03:55:11 +01:00
|
|
|
done
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2014-11-26 20:46:59 +01:00
|
|
|
install-ldif:
|
|
|
|
@$(MKDIRP) $(DESTDIR)$(datarootdir)/cygwin
|
|
|
|
$(INSTALL_DATA) $(srcdir)/cygwin.ldif $(DESTDIR)$(datarootdir)/cygwin
|
|
|
|
|
2003-07-02 05:16:00 +02:00
|
|
|
install_target:
|
2002-09-22 02:46:24 +02:00
|
|
|
|
2000-06-17 19:54:05 +02:00
|
|
|
install_host:
|
|
|
|
|
2002-01-08 05:51:01 +01:00
|
|
|
uninstall-libs: $(TARGET_LIBS)
|
|
|
|
rm -f $(bindir)/$(DLL_NAME); \
|
|
|
|
for i in $^; do \
|
|
|
|
rm -f $(tooldir)/lib/$$i ; \
|
|
|
|
done
|
|
|
|
|
|
|
|
uninstall-headers:
|
|
|
|
cd $(srcdir); \
|
|
|
|
for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
|
|
|
|
for i in $$sub/*.h ; do \
|
|
|
|
rm -f $(tooldir)/$$sub/`basename $$i` ; \
|
|
|
|
done ; \
|
|
|
|
done ; \
|
|
|
|
|
|
|
|
uninstall-man:
|
|
|
|
cd $(srcdir); \
|
|
|
|
for i in `find . -type f -name '*.2'`; do \
|
2013-04-23 11:44:36 +02:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man2/`basename $$i` ; \
|
2002-01-08 05:51:01 +01:00
|
|
|
done; \
|
|
|
|
for i in `find . -type f -name '*.3'`; do \
|
2013-04-23 11:44:36 +02:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/`basename $$i` ; \
|
2002-01-08 05:51:01 +01:00
|
|
|
done; \
|
|
|
|
for i in `find . -type f -name '*.5'`; do \
|
2013-04-23 11:44:36 +02:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man5/`basename $$i` ; \
|
2002-01-08 05:51:01 +01:00
|
|
|
done; \
|
|
|
|
for i in `find . -type f -name '*.7'`; do \
|
2013-04-23 11:44:36 +02:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man7/`basename $$i` ; \
|
2002-01-08 05:51:01 +01:00
|
|
|
done
|
|
|
|
|
2016-06-05 18:58:22 +02:00
|
|
|
clean distclean realclean:
|
|
|
|
-rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h
|
2012-11-23 14:22:47 +01:00
|
|
|
-@$(MAKE) -C ${cygserver_blddir} libclean
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2016-06-05 18:58:22 +02:00
|
|
|
maintainer-clean: clean
|
2000-02-17 20:38:33 +01:00
|
|
|
@echo "This command is intended for maintainers to use;"
|
|
|
|
@echo "it deletes files that may require special tools to rebuild."
|
|
|
|
-rm -fr configure
|
2016-06-05 18:58:22 +02:00
|
|
|
-rm -f $(srcdir)/$(TLSOFFSETS_H) $(srcdir)/devices.cc
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2013-04-23 11:44:36 +02:00
|
|
|
# Rule to build LDSCRIPT
|
|
|
|
$(LDSCRIPT): $(LDSCRIPT).in
|
|
|
|
$(CC) -E - -P < $^ -o $@
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
# Rule to build cygwin.dll
|
2015-01-28 12:43:06 +01:00
|
|
|
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile $(VERSION_OFILES)
|
2013-05-24 23:12:16 +02:00
|
|
|
$(CXX) $(CXXFLAGS) \
|
|
|
|
-mno-use-libstdc-wrappers -L${WINDOWS_LIBDIR} \
|
|
|
|
-Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \
|
2005-06-11 23:00:23 +02:00
|
|
|
-Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
|
2015-01-28 12:43:06 +01:00
|
|
|
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) $(VERSION_OFILES) \
|
2003-08-25 20:21:07 +02:00
|
|
|
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
|
2009-01-03 06:12:22 +01:00
|
|
|
-lgcc $(DLL_IMPORTS) -Wl,-Map,cygwin.map
|
2016-06-25 18:08:18 +02:00
|
|
|
@$(word 2,$^) $(OBJDUMP) $(OBJCOPY) $@ ${patsubst %0.dll,%1.dbg,$@}
|
2003-03-09 18:01:41 +01:00
|
|
|
@ln -f $@ new-$(DLL_NAME)
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2001-12-20 03:55:11 +01:00
|
|
|
# Rule to build libcygwin.a
|
2013-04-23 11:44:36 +02:00
|
|
|
$(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(TEST_DLL_NAME)
|
|
|
|
${srcdir}/mkimport ${toolopts} ${NEW_FUNCTIONS} $@ cygdll.a $(wordlist 2,99,$^)
|
2001-09-25 00:49:12 +02:00
|
|
|
|
2009-01-03 06:12:22 +01:00
|
|
|
${STATIC_LIB_NAME}: mkstatic ${TEST_DLL_NAME}
|
|
|
|
perl -d $< -x ${EXCLUDE_STATIC_OFILES} --library=${LIBC} --library=${LIBM} --ar=${AR} $@ cygwin.map
|
|
|
|
|
2001-12-20 03:55:11 +01:00
|
|
|
# Rule to make stub library used by testsuite
|
|
|
|
# dependency set to $(LIB_NAME) to accommodate make -j2.
|
2003-03-09 18:01:41 +01:00
|
|
|
$(TEST_LIB_NAME): $(LIB_NAME)
|
|
|
|
perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/cygwin1/cygwin0/g' < $? > $@
|
2001-09-30 23:10:38 +02:00
|
|
|
|
2012-11-23 14:22:47 +01:00
|
|
|
$(LIBSERVER): ${cygserver_blddir}/Makefile
|
|
|
|
$(MAKE) -C ${cygserver_blddir} libcygserver.a
|
|
|
|
|
|
|
|
${cygserver_blddir}/Makefile:
|
2012-11-23 15:52:07 +01:00
|
|
|
/bin/mkdir -p ${@D}
|
2012-11-23 14:22:47 +01:00
|
|
|
cd ${@D} && exec /bin/sh $(dir ${srcdir})/cygserver/configure ${configure_args}
|
2003-10-22 12:07:59 +02:00
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
dll_ofiles: $(DLL_OFILES)
|
|
|
|
|
|
|
|
$(LIBGMON_A): $(GMON_OFILES) $(GMON_START)
|
|
|
|
$(AR) rcv $(LIBGMON_A) $(GMON_OFILES)
|
|
|
|
|
2009-01-03 06:12:22 +01:00
|
|
|
globals.h: mkglobals_h globals.cc
|
|
|
|
$^ > $@
|
|
|
|
|
2016-03-30 14:35:46 +02:00
|
|
|
${DLL_OFILES} ${LIBCOS}: globals.h $(srcdir)/$(TLSOFFSETS_H)
|
2009-01-03 06:12:22 +01:00
|
|
|
|
2001-12-26 05:53:34 +01:00
|
|
|
shared_info_magic.h: cygmagic shared_info.h
|
2012-11-23 14:22:47 +01:00
|
|
|
/bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
|
2001-12-26 05:53:34 +01:00
|
|
|
|
|
|
|
child_info_magic.h: cygmagic child_info.h
|
2012-11-23 14:22:47 +01:00
|
|
|
/bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
|
2001-12-26 05:53:34 +01:00
|
|
|
|
|
|
|
dcrt0.o sigproc.o: child_info_magic.h
|
|
|
|
|
|
|
|
shared.o: shared_info_magic.h
|
|
|
|
|
2003-10-01 14:36:39 +02:00
|
|
|
$(srcdir)/devices.cc: gendevices devices.in devices.h
|
* devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file. Reorganize headers so that path.h precedes
fhandler.h throughout. Remove device argument and unit arguments from fhandler
constructors throughout. Remove pc arguments to fhandler functions and use
internal pc element instead, throughout. Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class. Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices. Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name. Move
out of dtable class. Don't accept a path_conv argument. Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler. Move out of dtable class.
Simplify arguments to just take new 'device' type and a name. Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element. Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access. Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe. Change arguments to accept
fhandler_pipe array. Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately. Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument. Call build_fh_name to construct
fhandler. Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access. Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff. Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here. Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 02:37:18 +02:00
|
|
|
${wordlist 1,2,$^} $@
|
|
|
|
|
2012-11-23 14:22:47 +01:00
|
|
|
${CURDIR}/libc.a: ${LIB_NAME} ${CURDIR}/libm.a libpthread.a libutil.a
|
2009-03-28 05:55:36 +01:00
|
|
|
${speclib} -v ${@F}
|
2001-12-31 04:19:29 +01:00
|
|
|
|
Add missing long double functions to Cygwin
This patch adds the long double functions missing in newlib to Cygwin.
Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l},
isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib.
Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and
fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin.
Cygwin:
* math: New subdir with math functions.
* Makefile.in (VPATH): Add math subdir.
(MATH_OFILES): List of object files collected from building files in
math subdir.
(DLL_OFILES): Add $(MATH_OFILES).
${CURDIR}/libm.a: Add $(MATH_OFILES) to build.
* common.din: Add new functions from math subdir.
* i686.din: Align to new math subdir. Remove functions now commonly
available.
* x86_64.din: Ditto.
* math.h: math.h wrapper to define mingw structs used in some files in
math subdir.
* include/cygwin/version.h: Bump API minor version.
newlib:
* libc/include/complex.h: Add prototypes for complex long double
functions. Only define for Cygwin.
* libc/include/math.h: Additionally enable prototypes of long double
functions for Cygwin. Add Cygwin-only prototypes for dreml, sincosl,
exp10l and pow10l. Explain why we don't add them to newlib.
* libc/include/tgmath.h: Enable long double handling on Cygwin.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-28 19:35:20 +02:00
|
|
|
${CURDIR}/libm.a: ${LIB_NAME} $(LIBM) $(MATH_OFILES)
|
2009-03-28 05:55:36 +01:00
|
|
|
${speclib} ${@F}
|
2004-09-10 10:30:51 +02:00
|
|
|
|
2009-04-12 05:19:52 +02:00
|
|
|
libpthread.a: ${LIB_NAME} pthread.o thread.o
|
2009-03-28 05:55:36 +01:00
|
|
|
${speclib} ${@F}
|
2001-12-31 04:19:29 +01:00
|
|
|
|
2009-04-12 05:19:52 +02:00
|
|
|
libutil.a: ${LIB_NAME} bsdlib.o
|
2009-03-28 05:55:36 +01:00
|
|
|
${speclib} ${@F}
|
2001-12-31 04:19:29 +01:00
|
|
|
|
2009-04-12 05:19:52 +02:00
|
|
|
libdl.a: ${LIB_NAME} dlfcn.o
|
2009-03-28 05:55:36 +01:00
|
|
|
${speclib} ${@F}
|
2006-06-03 17:48:30 +02:00
|
|
|
|
2009-04-12 05:19:52 +02:00
|
|
|
libresolv.a: ${LIB_NAME} minires.o
|
2009-03-28 05:55:36 +01:00
|
|
|
${speclib} ${@F}
|
2006-12-11 20:59:06 +01:00
|
|
|
|
2009-06-12 12:19:36 +02:00
|
|
|
librt.a: ${LIB_NAME} posix_ipc.o
|
|
|
|
${speclib} ${@F}
|
|
|
|
|
2016-01-06 18:41:36 +01:00
|
|
|
libacl.a: ${LIB_NAME} sec_posixacl.o
|
|
|
|
${speclib} ${@F}
|
|
|
|
|
2017-11-28 06:56:30 +01:00
|
|
|
libssp.a: ${LIB_NAME} $(newlib_build)/libc/ssp/lib.a
|
|
|
|
${speclib} ${@F}
|
|
|
|
|
2009-03-28 05:55:36 +01:00
|
|
|
${EXTRALIBS}: lib%.a: %.o
|
2001-12-31 04:19:29 +01:00
|
|
|
$(AR) cru $@ $?
|
|
|
|
|
2019-01-29 17:33:59 +01:00
|
|
|
# Every time we touch a source file, the version info has to be rebuilt
|
|
|
|
# to maintain a correct build date, especially in uname release output
|
|
|
|
find_src_files = $(wildcard $(dir)/*.[chS]) $(wildcard $(dir)/*.cc)
|
|
|
|
src_files := $(foreach dir,$(VPATH),$(find_src_files))
|
|
|
|
|
|
|
|
winver.o: mkvers.sh include/cygwin/version.h winver.rc $(src_files)
|
2015-01-28 12:43:06 +01:00
|
|
|
@echo "Making version.cc and winver.o";\
|
|
|
|
/bin/sh ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) ${CFLAGS} $(addprefix -I,${CCWRAP_SYSTEM_HEADERS} ${CCWRAP_DIRAFTER_HEADERS})
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2017-02-16 16:57:40 +01:00
|
|
|
version.cc: winver.o
|
|
|
|
|
2013-05-01 01:43:08 +02:00
|
|
|
Makefile: ${srcdir}/Makefile.in
|
2012-11-23 14:22:47 +01:00
|
|
|
/bin/sh ./config.status
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2013-05-01 01:43:08 +02:00
|
|
|
$(DEF_FILE): gendef $(srcdir)/$(TLSOFFSETS_H) $(DIN_FILE)
|
|
|
|
$(word 1,$^) --cpu=${target_cpu} --output-def=$@ --tlsoffsets=$(word 2,$^) $(wordlist 3,99,$^)
|
2003-11-28 21:55:59 +01:00
|
|
|
|
2013-04-23 11:44:36 +02:00
|
|
|
$(srcdir)/$(TLSOFFSETS_H): gentls_offsets cygtls.h
|
2016-06-06 11:44:54 +02:00
|
|
|
$^ $@ $(target_cpu) $(COMPILE.cc) -c || rm $@
|
2003-11-28 21:55:59 +01:00
|
|
|
|
|
|
|
sigfe.s: $(DEF_FILE)
|
2004-02-13 20:34:32 +01:00
|
|
|
@[ -s $@ ] || \
|
|
|
|
{ rm -f $(DEF_FILE); $(MAKE) -s -j1 $(DEF_FILE); }; \
|
|
|
|
[ -s $@ ] && touch $@
|
2003-11-28 21:55:59 +01:00
|
|
|
|
2016-03-30 14:35:46 +02:00
|
|
|
sigfe.o: sigfe.s $(srcdir)/$(TLSOFFSETS_H)
|
2015-02-20 13:15:38 +01:00
|
|
|
$(CC) ${CFLAGS} -c -o $@ $<
|
2000-06-22 23:51:48 +02:00
|
|
|
|
2010-01-28 12:54:00 +01:00
|
|
|
ctags: CTAGS
|
|
|
|
tags: CTAGS
|
|
|
|
CTAGS:
|
2017-11-27 13:38:43 +01:00
|
|
|
-cd $(srcdir) && \
|
|
|
|
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q \
|
2017-11-28 13:10:34 +01:00
|
|
|
--regex-C++='/EXPORT_ALIAS *\([a-zA-Z0-9_]*, *([a-zA-Z0-9_]*)\)/\1/' \
|
2017-11-28 13:31:20 +01:00
|
|
|
--regex-C++='/__ASMNAME *\("([a-zA-Z0-9_]+)"\)/\1/' \
|
2017-11-27 13:38:43 +01:00
|
|
|
@newlib_headers@ .
|
2010-01-28 12:54:00 +01:00
|
|
|
|
2000-12-15 23:25:51 +01:00
|
|
|
deps:=${wildcard *.d}
|
|
|
|
ifneq (,$(deps))
|
|
|
|
include $(deps)
|
2000-08-22 17:25:25 +02:00
|
|
|
endif
|
2009-07-12 23:15:47 +02:00
|
|
|
|
|
|
|
%: RCS/%,v
|