2000-02-18 03:38:33 +08: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 21:22:47 +08:00
|
|
|
# configure_input: @configure_input@
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
# This makefile requires GNU make.
|
2012-11-23 21:22:47 +08:00
|
|
|
|
2011-04-04 23:01:43 +08:00
|
|
|
srcdir:=@srcdir@
|
2012-11-23 21:22:47 +08: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 17:00:56 +08:00
|
|
|
include ${srcdir}/../Makefile.common
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2012-11-23 21:22:47 +08: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-18 03:38:33 +08: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-29 01:35:20 +08:00
|
|
|
VPATH+=$(srcdir)/regex $(srcdir)/lib $(srcdir)/libc $(srcdir)/math
|
2000-07-01 11:51:55 +08:00
|
|
|
|
2013-04-23 17:44:36 +08:00
|
|
|
target_cpu:=@target_cpu@
|
2000-02-18 03:38:33 +08: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 07:03:43 +08:00
|
|
|
mandir:=@mandir@
|
2008-04-05 17:30:06 +08:00
|
|
|
sysconfdir:=@sysconfdir@
|
2012-11-23 21:22:47 +08:00
|
|
|
datarootdir:=@datarootdir@
|
2000-02-18 03:38:33 +08: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 08:10:48 +08:00
|
|
|
override INSTALL:=@INSTALL@
|
|
|
|
override INSTALL_PROGRAM:=@INSTALL_PROGRAM@
|
|
|
|
override INSTALL_DATA:=@INSTALL_DATA@
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2012-11-23 21:22:47 +08: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-18 03:38:33 +08:00
|
|
|
#
|
|
|
|
# --enable options from configure
|
|
|
|
#
|
2001-12-20 10:55:11 +08:00
|
|
|
MT_SAFE:=@MT_SAFE@
|
2012-11-23 21:22:47 +08:00
|
|
|
CCEXTRA=
|
2017-09-17 10:04:20 +08:00
|
|
|
COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Werror -fmerge-constants -ftracer $(CCEXTRA)
|
2013-04-23 17:44:36 +08:00
|
|
|
ifeq ($(target_cpu),x86_64)
|
|
|
|
COMMON_CFLAGS+=-mcmodel=small
|
|
|
|
endif
|
2017-09-13 03:30:34 +08:00
|
|
|
COMPILE.cc+=${COMMON_CFLAGS} -std=gnu++98
|
2012-11-23 21:22:47 +08:00
|
|
|
COMPILE.c+=${COMMON_CFLAGS}
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
AR:=@AR@
|
|
|
|
AR_FLAGS:=qv
|
|
|
|
RANLIB:=@RANLIB@
|
|
|
|
LD:=@LD@
|
|
|
|
DLLTOOL:=@DLLTOOL@
|
|
|
|
WINDRES:=@WINDRES@
|
|
|
|
AS:=@AS@
|
2001-12-20 10:55:11 +08:00
|
|
|
NM:=@NM@
|
2005-08-08 10:27:43 +08:00
|
|
|
OBJCOPY:=@OBJCOPY@
|
|
|
|
OBJDUMP:=@OBJDUMP@
|
|
|
|
STRIP:=@STRIP@
|
2001-12-20 10:55:11 +08:00
|
|
|
LDSCRIPT:=cygwin.sc
|
2005-10-17 11:20:20 +08:00
|
|
|
MKDIRP:=$(INSTALL) -m 755 -d
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
@SET_MAKE@
|
|
|
|
|
|
|
|
# Setup the testing framework, if you have one
|
|
|
|
EXPECT = `if [ -f $${rootme}/../../expect/expect$(EXEEXT) ] ; then \
|
2002-09-22 08:46:24 +08:00
|
|
|
echo $${rootme}/../../expect/expect$(EXEEXT) ; \
|
|
|
|
else echo expect ; fi`
|
2000-02-18 03:38:33 +08: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-10 01:01:41 +08:00
|
|
|
# We build as cygwin0.dll and rename at install time to overcome
|
2000-02-18 03:38:33 +08: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 17:44:36 +08:00
|
|
|
DLL_NAME:=@DLL_NAME@
|
|
|
|
TEST_DLL_NAME:=${patsubst %1.dll,%0.dll,@DLL_NAME@}
|
2003-03-10 01:01:41 +08:00
|
|
|
TEST_LIB_NAME:=libcygwin0.a
|
2009-01-03 13:12:22 +08:00
|
|
|
STATIC_LIB_NAME:=libcygwin_s.a
|
2013-05-01 07:43:08 +08:00
|
|
|
DIN_FILE=@DIN_FILE@ common.din
|
2000-02-18 03:38:33 +08:00
|
|
|
DEF_FILE:=cygwin.def
|
2013-04-23 17:44:36 +08:00
|
|
|
TLSOFFSETS_H:=@TLSOFFSETS_H@
|
2000-02-18 03:38:33 +08:00
|
|
|
DLL_ENTRY:=@DLL_ENTRY@
|
|
|
|
|
|
|
|
LIBGMON_A:=libgmon.a
|
2003-05-12 19:06:27 +08:00
|
|
|
CYGWIN_START:=crt0.o
|
2000-02-18 03:38:33 +08:00
|
|
|
GMON_START:=gcrt0.o
|
|
|
|
|
2013-04-23 17:44:36 +08:00
|
|
|
toolopts:=--cpu=${target_cpu} --ar=${AR} --as=${AS} --nm=${NM} --objcopy=${OBJCOPY}
|
2009-04-12 11:19:52 +08:00
|
|
|
speclib=\
|
|
|
|
${srcdir}/speclib ${toolopts} \
|
|
|
|
--exclude='cygwin' \
|
|
|
|
--exclude='(?i:dll)' \
|
|
|
|
--exclude='reloc' \
|
2013-04-23 17:44:36 +08:00
|
|
|
--exclude='^main$$' \
|
2009-04-12 11:19:52 +08:00
|
|
|
--exclude='^_main$$' \
|
|
|
|
$^
|
2009-03-28 12:55:36 +08:00
|
|
|
|
2000-02-18 03:38:33 +08: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 11:51:55 +08:00
|
|
|
LIBCOS:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.c}}}} \
|
|
|
|
${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.cc}}}}}
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
# Build all source files in the config directory
|
|
|
|
|
2007-07-08 23:04:34 +08:00
|
|
|
EXTRA_OFILES:=
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2013-04-23 17:44:36 +08:00
|
|
|
MALLOC_OFILES:=malloc.o
|
2001-04-24 23:25:31 +08:00
|
|
|
|
2012-10-24 18:12:45 +08:00
|
|
|
DLL_IMPORTS:=${shell $(CC) -print-file-name=w32api/libkernel32.a} ${shell $(CC) -print-file-name=w32api/libntdll.a}
|
2000-02-18 03:38:33 +08: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 08:37:18 +08:00
|
|
|
MT_SAFE_OBJECTS:=
|
2003-11-29 04:55:59 +08: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-29 01:35:20 +08: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 \
|
2016-03-29 23:39:17 +08:00
|
|
|
nanl.o \
|
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-29 01:35:20 +08:00
|
|
|
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 23:40:09 +08:00
|
|
|
DLL_OFILES:= \
|
|
|
|
advapi32.o \
|
2016-03-21 15:12:54 +08:00
|
|
|
arc4random_stir.o \
|
2014-10-16 23:40:09 +08:00
|
|
|
assert.o \
|
|
|
|
autoload.o \
|
|
|
|
base64.o \
|
|
|
|
bsdlib.o \
|
|
|
|
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 \
|
|
|
|
fhandler_dev.o \
|
|
|
|
fhandler_disk_file.o \
|
|
|
|
fhandler_dsp.o \
|
|
|
|
fhandler_fifo.o \
|
|
|
|
fhandler_floppy.o \
|
|
|
|
fhandler_mailslot.o \
|
|
|
|
fhandler_netdrive.o \
|
|
|
|
fhandler_nodevice.o \
|
|
|
|
fhandler_proc.o \
|
|
|
|
fhandler_process.o \
|
|
|
|
fhandler_procnet.o \
|
|
|
|
fhandler_procsys.o \
|
|
|
|
fhandler_procsysvipc.o \
|
|
|
|
fhandler_random.o \
|
|
|
|
fhandler_raw.o \
|
|
|
|
fhandler_registry.o \
|
|
|
|
fhandler_serial.o \
|
|
|
|
fhandler_socket.o \
|
|
|
|
fhandler_tape.o \
|
|
|
|
fhandler_termios.o \
|
|
|
|
fhandler_tty.o \
|
|
|
|
fhandler_virtual.o \
|
|
|
|
fhandler_windows.o \
|
|
|
|
fhandler_zero.o \
|
|
|
|
flock.o \
|
|
|
|
fnmatch.o \
|
|
|
|
fork.o \
|
|
|
|
fts.o \
|
|
|
|
ftw.o \
|
2017-01-20 03:58:06 +08:00
|
|
|
getentropy.o \
|
2014-10-16 23:40:09 +08: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-22 03:17:42 +08:00
|
|
|
loadavg.o \
|
2014-10-16 23:40:09 +08:00
|
|
|
localtime.o \
|
|
|
|
lsearch.o \
|
|
|
|
malloc_wrapper.o \
|
|
|
|
minires-os-if.o \
|
|
|
|
minires.o \
|
|
|
|
miscfuncs.o \
|
|
|
|
mktemp.o \
|
|
|
|
mmap.o \
|
|
|
|
msg.o \
|
|
|
|
mount.o \
|
|
|
|
net.o \
|
|
|
|
netdb.o \
|
|
|
|
nfs.o \
|
|
|
|
nftw.o \
|
|
|
|
nlsfuncs.o \
|
|
|
|
ntea.o \
|
|
|
|
passwd.o \
|
|
|
|
path.o \
|
|
|
|
pinfo.o \
|
|
|
|
pipe.o \
|
|
|
|
poll.o \
|
|
|
|
posix_ipc.o \
|
|
|
|
pseudo-reloc.o \
|
|
|
|
pthread.o \
|
2014-10-17 16:19:27 +08:00
|
|
|
quotactl.o \
|
2014-10-16 23:40:09 +08: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-07 01:41:36 +08:00
|
|
|
sec_posixacl.o \
|
2014-10-16 23:40:09 +08: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 \
|
|
|
|
timer.o \
|
|
|
|
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-29 01:35:20 +08:00
|
|
|
$(MATH_OFILES) \
|
2014-10-16 23:40:09 +08:00
|
|
|
$(MT_SAFE_OBJECTS)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2009-01-03 13:12:22 +08:00
|
|
|
EXCLUDE_STATIC_OFILES:=$(addprefix --exclude=,\
|
|
|
|
cygtls.o \
|
|
|
|
dcrt0.o \
|
|
|
|
exceptions.o \
|
|
|
|
fork.o \
|
|
|
|
signal.o \
|
|
|
|
spawn.o \
|
|
|
|
)
|
|
|
|
|
2015-01-28 19:43:06 +08:00
|
|
|
VERSION_OFILES:=version.o winver.o
|
|
|
|
|
2012-11-23 21:22:47 +08: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 17:45:37 +08: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 10:55:11 +08:00
|
|
|
|
2014-11-05 17:28:01 +08:00
|
|
|
NEW_FUNCTIONS:=$(addprefix --replace=,\
|
2014-11-05 17:48:00 +08:00
|
|
|
atexit= \
|
2014-11-05 17:28:01 +08:00
|
|
|
timezone= \
|
|
|
|
__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 17:44:36 +08:00
|
|
|
ifeq ($(target_cpu),x86_64)
|
2014-11-05 17:28:01 +08:00
|
|
|
NEW_FUNCTIONS+=
|
2013-04-23 17:44:36 +08:00
|
|
|
else
|
2014-11-05 17:28:01 +08:00
|
|
|
NEW_FUNCTIONS+=$(addprefix --replace=,\
|
2009-04-12 11:19:52 +08: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 17:44:36 +08:00
|
|
|
endif
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2002-07-25 17:09:34 +08:00
|
|
|
API_VER:=$(srcdir)/include/cygwin/version.h
|
|
|
|
|
2009-03-28 12:55:36 +08:00
|
|
|
LIB_NAME:=libcygwin.a
|
2017-11-28 13:56:30 +08: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 22:22:43 +08:00
|
|
|
EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a libtextreadmode.a
|
|
|
|
INSTOBJS:=automode.o binmode.o textmode.o textreadmode.o
|
2003-08-06 09:40:12 +08: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 08:37:18 +08:00
|
|
|
|
|
|
|
ifneq "${filter -O%,$(CFLAGS)}" ""
|
2015-04-05 06:31:03 +08:00
|
|
|
dtable_CFLAGS:=-fcheck-new
|
2013-05-14 21:34:05 +08:00
|
|
|
localtime_CFLAGS:=-fwrapv
|
2015-04-05 06:31:03 +08: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 08:37:18 +08:00
|
|
|
endif
|
|
|
|
|
2011-04-04 19:12:48 +08: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-08 04:12:44 +08:00
|
|
|
_cygwin_crt0_common_STDINCFLAGS:=yes
|
|
|
|
libstdcxx_wrapper_STDINCFLAGS:=yes
|
|
|
|
cxx_STDINCFLAGS:=yes
|
|
|
|
|
2016-06-06 00:58:22 +08: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-18 03:38:33 +08:00
|
|
|
|
2000-06-18 01:54:05 +08:00
|
|
|
all_host=@all_host@
|
|
|
|
install_host=@install_host@
|
|
|
|
|
2001-09-15 12:36:43 +08:00
|
|
|
all: all_target $(all_host)
|
2000-06-18 01:54:05 +08:00
|
|
|
|
2003-07-02 11:16:00 +08:00
|
|
|
all_target: $(TARGET_LIBS)
|
2000-06-18 01:54:05 +08:00
|
|
|
|
2003-03-10 01:01:41 +08:00
|
|
|
all_host: $(TEST_LIB_NAME)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
force:
|
|
|
|
|
2014-11-27 03:46:59 +08:00
|
|
|
install: install-libs install-headers install-man install-ldif install_target \
|
2002-02-28 22:30:38 +08:00
|
|
|
$(install_host) $(install_target)
|
2001-07-29 10:33:30 +08:00
|
|
|
|
2002-05-18 14:10:16 +08:00
|
|
|
uninstall: uninstall-libs uninstall-headers uninstall-man
|
2002-01-08 12:51:01 +08:00
|
|
|
|
2001-12-31 11:19:29 +08:00
|
|
|
install-libs: $(TARGET_LIBS)
|
2009-02-24 10:11:14 +08:00
|
|
|
@$(MKDIRP) $(DESTDIR)$(bindir)
|
|
|
|
$(INSTALL_PROGRAM) $(TEST_DLL_NAME) $(DESTDIR)$(bindir)/$(DLL_NAME); \
|
2001-12-31 11:19:29 +08:00
|
|
|
for i in $^; do \
|
2009-02-24 10:11:14 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/lib/`basename $$i` ; \
|
2001-07-29 10:33:30 +08:00
|
|
|
done
|
2009-02-24 10:11:14 +08:00
|
|
|
cd $(DESTDIR)$(tooldir)/lib && ln -sf libcygwin.a libg.a
|
2001-07-29 10:33:30 +08:00
|
|
|
|
|
|
|
install-headers:
|
2000-02-18 03:38:33 +08:00
|
|
|
cd $(srcdir); \
|
|
|
|
for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
|
2009-02-24 10:11:14 +08:00
|
|
|
$(MKDIRP) $(DESTDIR)$(tooldir)/$$sub; \
|
2000-02-18 03:38:33 +08:00
|
|
|
for i in $$sub/*.h ; do \
|
2009-02-24 10:11:14 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/$$sub/`basename $$i` ; \
|
2000-02-18 03:38:33 +08:00
|
|
|
done ; \
|
2000-04-27 02:19:22 +08:00
|
|
|
done ; \
|
2001-12-20 10:55:11 +08:00
|
|
|
|
|
|
|
install-man:
|
2009-02-24 10:11:14 +08:00
|
|
|
@$(MKDIRP) $(DESTDIR)$(mandir)/man2 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7
|
2001-12-20 10:55:11 +08:00
|
|
|
cd $(srcdir); \
|
2015-06-19 04:04:58 +08:00
|
|
|
for i in `find . -type f ! -path './release/*' -name '*.2'`; do \
|
2009-02-24 10:11:14 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man2/`basename $$i` ; \
|
2001-12-20 10:55:11 +08:00
|
|
|
done; \
|
2015-06-19 04:04:58 +08:00
|
|
|
for i in `find . -type f ! -path './release/*' -name '*.3'`; do \
|
2009-02-24 10:11:14 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man3/`basename $$i` ; \
|
2001-12-20 10:55:11 +08:00
|
|
|
done; \
|
2015-06-19 04:04:58 +08:00
|
|
|
for i in `find . -type f ! -path './release/*' -name '*.5'`; do \
|
2009-02-24 10:11:14 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man5/`basename $$i` ; \
|
2001-12-20 10:55:11 +08:00
|
|
|
done; \
|
2015-06-19 04:04:58 +08:00
|
|
|
for i in `find . -type f ! -path './release/*' -name '*.7'`; do \
|
2009-02-24 10:11:14 +08:00
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man7/`basename $$i` ; \
|
2001-12-20 10:55:11 +08:00
|
|
|
done
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2014-11-27 03:46:59 +08:00
|
|
|
install-ldif:
|
|
|
|
@$(MKDIRP) $(DESTDIR)$(datarootdir)/cygwin
|
|
|
|
$(INSTALL_DATA) $(srcdir)/cygwin.ldif $(DESTDIR)$(datarootdir)/cygwin
|
|
|
|
|
2003-07-02 11:16:00 +08:00
|
|
|
install_target:
|
2002-09-22 08:46:24 +08:00
|
|
|
|
2000-06-18 01:54:05 +08:00
|
|
|
install_host:
|
|
|
|
|
2002-01-08 12:51:01 +08: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 17:44:36 +08:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man2/`basename $$i` ; \
|
2002-01-08 12:51:01 +08:00
|
|
|
done; \
|
|
|
|
for i in `find . -type f -name '*.3'`; do \
|
2013-04-23 17:44:36 +08:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man3/`basename $$i` ; \
|
2002-01-08 12:51:01 +08:00
|
|
|
done; \
|
|
|
|
for i in `find . -type f -name '*.5'`; do \
|
2013-04-23 17:44:36 +08:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man5/`basename $$i` ; \
|
2002-01-08 12:51:01 +08:00
|
|
|
done; \
|
|
|
|
for i in `find . -type f -name '*.7'`; do \
|
2013-04-23 17:44:36 +08:00
|
|
|
rm -f $(DESTDIR)$(mandir)/man7/`basename $$i` ; \
|
2002-01-08 12:51:01 +08:00
|
|
|
done
|
|
|
|
|
2016-06-06 00:58:22 +08: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 21:22:47 +08:00
|
|
|
-@$(MAKE) -C ${cygserver_blddir} libclean
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2016-06-06 00:58:22 +08:00
|
|
|
maintainer-clean: clean
|
2000-02-18 03:38:33 +08: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-06 00:58:22 +08:00
|
|
|
-rm -f $(srcdir)/$(TLSOFFSETS_H) $(srcdir)/devices.cc
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2013-04-23 17:44:36 +08:00
|
|
|
# Rule to build LDSCRIPT
|
|
|
|
$(LDSCRIPT): $(LDSCRIPT).in
|
|
|
|
$(CC) -E - -P < $^ -o $@
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
# Rule to build cygwin.dll
|
2015-01-28 19:43:06 +08:00
|
|
|
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile $(VERSION_OFILES)
|
2013-05-25 05:12:16 +08:00
|
|
|
$(CXX) $(CXXFLAGS) \
|
|
|
|
-mno-use-libstdc-wrappers -L${WINDOWS_LIBDIR} \
|
|
|
|
-Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \
|
2005-06-12 05:00:23 +08:00
|
|
|
-Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
|
2015-01-28 19:43:06 +08:00
|
|
|
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) $(VERSION_OFILES) \
|
2003-08-26 02:21:07 +08:00
|
|
|
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
|
2009-01-03 13:12:22 +08:00
|
|
|
-lgcc $(DLL_IMPORTS) -Wl,-Map,cygwin.map
|
2016-06-26 00:08:18 +08:00
|
|
|
@$(word 2,$^) $(OBJDUMP) $(OBJCOPY) $@ ${patsubst %0.dll,%1.dbg,$@}
|
2003-03-10 01:01:41 +08:00
|
|
|
@ln -f $@ new-$(DLL_NAME)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2001-12-20 10:55:11 +08:00
|
|
|
# Rule to build libcygwin.a
|
2013-04-23 17:44:36 +08:00
|
|
|
$(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(TEST_DLL_NAME)
|
|
|
|
${srcdir}/mkimport ${toolopts} ${NEW_FUNCTIONS} $@ cygdll.a $(wordlist 2,99,$^)
|
2001-09-25 06:49:12 +08:00
|
|
|
|
2009-01-03 13:12:22 +08: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 10:55:11 +08:00
|
|
|
# Rule to make stub library used by testsuite
|
|
|
|
# dependency set to $(LIB_NAME) to accommodate make -j2.
|
2003-03-10 01:01:41 +08:00
|
|
|
$(TEST_LIB_NAME): $(LIB_NAME)
|
|
|
|
perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/cygwin1/cygwin0/g' < $? > $@
|
2001-10-01 05:10:38 +08:00
|
|
|
|
2012-11-23 21:22:47 +08:00
|
|
|
$(LIBSERVER): ${cygserver_blddir}/Makefile
|
|
|
|
$(MAKE) -C ${cygserver_blddir} libcygserver.a
|
|
|
|
|
|
|
|
${cygserver_blddir}/Makefile:
|
2012-11-23 22:52:07 +08:00
|
|
|
/bin/mkdir -p ${@D}
|
2012-11-23 21:22:47 +08:00
|
|
|
cd ${@D} && exec /bin/sh $(dir ${srcdir})/cygserver/configure ${configure_args}
|
2003-10-22 18:07:59 +08:00
|
|
|
|
2000-02-18 03:38:33 +08:00
|
|
|
dll_ofiles: $(DLL_OFILES)
|
|
|
|
|
|
|
|
$(LIBGMON_A): $(GMON_OFILES) $(GMON_START)
|
|
|
|
$(AR) rcv $(LIBGMON_A) $(GMON_OFILES)
|
|
|
|
|
2009-01-03 13:12:22 +08:00
|
|
|
globals.h: mkglobals_h globals.cc
|
|
|
|
$^ > $@
|
|
|
|
|
2016-03-30 20:35:46 +08:00
|
|
|
${DLL_OFILES} ${LIBCOS}: globals.h $(srcdir)/$(TLSOFFSETS_H)
|
2009-01-03 13:12:22 +08:00
|
|
|
|
2001-12-26 12:53:34 +08:00
|
|
|
shared_info_magic.h: cygmagic shared_info.h
|
2012-11-23 21:22:47 +08: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 12:53:34 +08:00
|
|
|
|
|
|
|
child_info_magic.h: cygmagic child_info.h
|
2012-11-23 21:22:47 +08:00
|
|
|
/bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
|
2001-12-26 12:53:34 +08:00
|
|
|
|
|
|
|
dcrt0.o sigproc.o: child_info_magic.h
|
|
|
|
|
|
|
|
shared.o: shared_info_magic.h
|
|
|
|
|
2003-10-01 20:36:39 +08: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 08:37:18 +08:00
|
|
|
${wordlist 1,2,$^} $@
|
|
|
|
|
2012-11-23 21:22:47 +08:00
|
|
|
${CURDIR}/libc.a: ${LIB_NAME} ${CURDIR}/libm.a libpthread.a libutil.a
|
2009-03-28 12:55:36 +08:00
|
|
|
${speclib} -v ${@F}
|
2001-12-31 11:19:29 +08: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-29 01:35:20 +08:00
|
|
|
${CURDIR}/libm.a: ${LIB_NAME} $(LIBM) $(MATH_OFILES)
|
2009-03-28 12:55:36 +08:00
|
|
|
${speclib} ${@F}
|
2004-09-10 16:30:51 +08:00
|
|
|
|
2009-04-12 11:19:52 +08:00
|
|
|
libpthread.a: ${LIB_NAME} pthread.o thread.o
|
2009-03-28 12:55:36 +08:00
|
|
|
${speclib} ${@F}
|
2001-12-31 11:19:29 +08:00
|
|
|
|
2009-04-12 11:19:52 +08:00
|
|
|
libutil.a: ${LIB_NAME} bsdlib.o
|
2009-03-28 12:55:36 +08:00
|
|
|
${speclib} ${@F}
|
2001-12-31 11:19:29 +08:00
|
|
|
|
2009-04-12 11:19:52 +08:00
|
|
|
libdl.a: ${LIB_NAME} dlfcn.o
|
2009-03-28 12:55:36 +08:00
|
|
|
${speclib} ${@F}
|
2006-06-03 23:48:30 +08:00
|
|
|
|
2009-04-12 11:19:52 +08:00
|
|
|
libresolv.a: ${LIB_NAME} minires.o
|
2009-03-28 12:55:36 +08:00
|
|
|
${speclib} ${@F}
|
2006-12-12 03:59:06 +08:00
|
|
|
|
2009-06-12 18:19:36 +08:00
|
|
|
librt.a: ${LIB_NAME} posix_ipc.o
|
|
|
|
${speclib} ${@F}
|
|
|
|
|
2016-01-07 01:41:36 +08:00
|
|
|
libacl.a: ${LIB_NAME} sec_posixacl.o
|
|
|
|
${speclib} ${@F}
|
|
|
|
|
2017-11-28 13:56:30 +08:00
|
|
|
libssp.a: ${LIB_NAME} $(newlib_build)/libc/ssp/lib.a
|
|
|
|
${speclib} ${@F}
|
|
|
|
|
2009-03-28 12:55:36 +08:00
|
|
|
${EXTRALIBS}: lib%.a: %.o
|
2001-12-31 11:19:29 +08:00
|
|
|
$(AR) cru $@ $?
|
|
|
|
|
2017-02-16 23:57:40 +08:00
|
|
|
winver.o: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
|
2015-01-28 19:43:06 +08: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-18 03:38:33 +08:00
|
|
|
|
2017-02-16 23:57:40 +08:00
|
|
|
version.cc: winver.o
|
|
|
|
|
2013-05-01 07:43:08 +08:00
|
|
|
Makefile: ${srcdir}/Makefile.in
|
2012-11-23 21:22:47 +08:00
|
|
|
/bin/sh ./config.status
|
2000-02-18 03:38:33 +08:00
|
|
|
|
2013-05-01 07:43:08 +08:00
|
|
|
$(DEF_FILE): gendef $(srcdir)/$(TLSOFFSETS_H) $(DIN_FILE)
|
|
|
|
$(word 1,$^) --cpu=${target_cpu} --output-def=$@ --tlsoffsets=$(word 2,$^) $(wordlist 3,99,$^)
|
2003-11-29 04:55:59 +08:00
|
|
|
|
2013-04-23 17:44:36 +08:00
|
|
|
$(srcdir)/$(TLSOFFSETS_H): gentls_offsets cygtls.h
|
2016-06-06 17:44:54 +08:00
|
|
|
$^ $@ $(target_cpu) $(COMPILE.cc) -c || rm $@
|
2003-11-29 04:55:59 +08:00
|
|
|
|
|
|
|
sigfe.s: $(DEF_FILE)
|
2004-02-14 03:34:32 +08:00
|
|
|
@[ -s $@ ] || \
|
|
|
|
{ rm -f $(DEF_FILE); $(MAKE) -s -j1 $(DEF_FILE); }; \
|
|
|
|
[ -s $@ ] && touch $@
|
2003-11-29 04:55:59 +08:00
|
|
|
|
2016-03-30 20:35:46 +08:00
|
|
|
sigfe.o: sigfe.s $(srcdir)/$(TLSOFFSETS_H)
|
2015-02-20 20:15:38 +08:00
|
|
|
$(CC) ${CFLAGS} -c -o $@ $<
|
2000-06-23 05:51:48 +08:00
|
|
|
|
2010-01-28 19:54:00 +08:00
|
|
|
ctags: CTAGS
|
|
|
|
tags: CTAGS
|
|
|
|
CTAGS:
|
2017-11-27 20:38:43 +08:00
|
|
|
-cd $(srcdir) && \
|
|
|
|
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q \
|
2017-11-28 20:10:34 +08:00
|
|
|
--regex-C++='/EXPORT_ALIAS *\([a-zA-Z0-9_]*, *([a-zA-Z0-9_]*)\)/\1/' \
|
2017-11-28 20:26:37 +08:00
|
|
|
--regex-C++='/_EXFUN *\(([a-zA-Z0-9_]+) ?[,\)]/\1/' \
|
|
|
|
--regex-C++='/_EXFUN *\([^,]* ([a-zA-Z0-9_]+) ?[,\)]/\1/' \
|
2017-11-28 20:31:20 +08:00
|
|
|
--regex-C++='/__ASMNAME *\("([a-zA-Z0-9_]+)"\)/\1/' \
|
2017-11-27 20:38:43 +08:00
|
|
|
@newlib_headers@ .
|
2010-01-28 19:54:00 +08:00
|
|
|
|
2000-12-16 06:25:51 +08:00
|
|
|
deps:=${wildcard *.d}
|
|
|
|
ifneq (,$(deps))
|
|
|
|
include $(deps)
|
2000-08-22 23:25:25 +08:00
|
|
|
endif
|
2009-07-13 05:15:47 +08:00
|
|
|
|
|
|
|
%: RCS/%,v
|