* Makefile.in: Add some more optimization flags for cygwait, malloc and path. Explain
why -fomit-frame-pointer doesn't work right for passwd.o and path.o. Add -static to link command line for cygwin0.dll. * fhandler_disk_file.cc (fhandler_disk_file::facl): Reorganize slightly to silence compiler warning when compiling with -fstack-check. * net.cc (inet_ntop6): Initialize structure members to silence compiler warning when compiling with -fstack-check. * pseudo-reloc.cc (_pei386_runtime_relocator): Make this a C function. Detect NULL u. * winsup.h (_pei386_runtime_relocator): Declare this as extern "C". * lib/_cygwin_crt0_common.cc (_pei386_runtime_relocator): Call with NULL argument. * signal.cc (sigaction_worker): Eliminate last argument. Let callers report their own strace info. Regparmize. (sigaction): Reflect sigaction_worker changes. (siginterrupt): Ditto. * exceptions.cc: Update copyright.
This commit is contained in:
parent
c4441d46b6
commit
1809b65e23
|
@ -1,3 +1,27 @@
|
|||
2012-07-01 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* Makefile.in: Add some more optimization flags for cygwait, malloc and
|
||||
path. Explain why -fomit-frame-pointer doesn't work right for passwd.o
|
||||
and path.o. Add -static to link command line for cygwin0.dll.
|
||||
|
||||
* fhandler_disk_file.cc (fhandler_disk_file::facl): Reorganize slightly
|
||||
to silence compiler warning when compiling with -fstack-check.
|
||||
* net.cc (inet_ntop6): Initialize structure members to silence compiler
|
||||
warning when compiling with -fstack-check.
|
||||
|
||||
* pseudo-reloc.cc (_pei386_runtime_relocator): Make this a C function.
|
||||
Detect NULL u.
|
||||
* winsup.h (_pei386_runtime_relocator): Declare this as extern "C".
|
||||
* lib/_cygwin_crt0_common.cc (_pei386_runtime_relocator): Call with
|
||||
NULL argument.
|
||||
|
||||
* signal.cc (sigaction_worker): Eliminate last argument. Let callers
|
||||
report their own strace info. Regparmize.
|
||||
(sigaction): Reflect sigaction_worker changes.
|
||||
(siginterrupt): Ditto.
|
||||
|
||||
* exceptions.cc: Update copyright.
|
||||
|
||||
2012-07-01 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* path.cc: Perform some whitespace fixups throughout.
|
||||
|
|
|
@ -237,6 +237,7 @@ ifneq "${filter -O%,$(CFLAGS)}" ""
|
|||
cygheap_CFLAGS:=-fomit-frame-pointer
|
||||
cygthread_CFLAGS:=-fomit-frame-pointer
|
||||
cygtls_CFLAGS:=-fomit-frame-pointer
|
||||
cygwait_CFLAGS=-fomit-frame-pointer
|
||||
delqueue_CFLAGS:=-fomit-frame-pointer
|
||||
devices_CFLAGS:=-fomit-frame-pointer -Os
|
||||
dir_CFLAGS:=-fomit-frame-pointer
|
||||
|
@ -270,11 +271,19 @@ fhandler_zero_CFLAGS:=-fomit-frame-pointer
|
|||
flock_CFLAGS:=-fomit-frame-pointer
|
||||
grp_CFLAGS:=-fomit-frame-pointer
|
||||
libstdcxx_wrapper_CFLAGS:=-fomit-frame-pointer
|
||||
malloc_CFLAGS:=-fomit-frame-pointer
|
||||
malloc_CFLAGS:=-fomit-frame-pointer -O3
|
||||
malloc_wrapper_CFLAGS:=-fomit-frame-pointer
|
||||
miscfuncs_CFLAGS:=-fomit-frame-pointer
|
||||
net_CFLAGS:=-fomit-frame-pointer
|
||||
passwd_CFLAGS:=-fomit-frame-pointer
|
||||
#
|
||||
# FIXME: Setting either of the below to -fomit-frame-pointer causes an
|
||||
# optimized version of Cygwin to sometimes "jump to zero" in long-running
|
||||
# shell processes when compiled with gcc 4.5.3.
|
||||
#
|
||||
# passwd_CFLAGS:=-fomit-frame-pointer
|
||||
# path_CFLAGS=-fomit-frame-pointer
|
||||
#
|
||||
path_CFLAGS=-fgcse-lm -fgcse-sm -fgcse-las -fgcse-after-reload
|
||||
regcomp_CFLAGS=-fomit-frame-pointer
|
||||
regerror_CFLAGS=-fomit-frame-pointer
|
||||
regexec_CFLAGS=-fomit-frame-pointer
|
||||
|
@ -394,7 +403,7 @@ maintainer-clean realclean: clean
|
|||
|
||||
# Rule to build cygwin.dll
|
||||
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(DLL_IMPORTS) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
|
||||
$(CXX) $(CXXFLAGS) -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) \
|
||||
$(CXX) $(CXXFLAGS) -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \
|
||||
-Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
|
||||
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
|
||||
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* exceptions.cc
|
||||
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
|
|
|
@ -984,7 +984,6 @@ fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp)
|
|||
cant_access_acl:
|
||||
switch (cmd)
|
||||
{
|
||||
struct __stat64 st;
|
||||
|
||||
case SETACL:
|
||||
/* Open for writing required to be able to set ctime
|
||||
|
@ -1000,6 +999,7 @@ cant_access_acl:
|
|||
set_errno (ENOSPC);
|
||||
else
|
||||
{
|
||||
struct __stat64 st;
|
||||
if (!fstat (&st))
|
||||
{
|
||||
aclbufp[0].a_type = USER_OBJ;
|
||||
|
|
|
@ -49,7 +49,6 @@ extern "C"
|
|||
{
|
||||
char **environ;
|
||||
int _fmode;
|
||||
void _pei386_runtime_relocator (void);
|
||||
|
||||
extern char __RUNTIME_PSEUDO_RELOC_LIST__;
|
||||
extern char __RUNTIME_PSEUDO_RELOC_LIST_END__;
|
||||
|
@ -155,7 +154,7 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
|
|||
u->image_base = &_image_base__;
|
||||
/* This is actually a dummy call to force the linker to load this
|
||||
symbol for older apps which need it. */
|
||||
_pei386_runtime_relocator ();
|
||||
_pei386_runtime_relocator (NULL);
|
||||
return 1;
|
||||
}
|
||||
} /* "C" */
|
||||
|
|
|
@ -3169,6 +3169,8 @@ inet_ntop6 (const u_char *src, char *dst, size_t size)
|
|||
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
|
||||
best.base = -1;
|
||||
cur.base = -1;
|
||||
best.len = 0;
|
||||
cur.len = 0;
|
||||
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
|
||||
{
|
||||
if (words[i] == 0)
|
||||
|
|
|
@ -328,10 +328,10 @@ do_pseudo_reloc (void * start, void * end, void * base)
|
|||
}
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
void
|
||||
extern "C" void
|
||||
_pei386_runtime_relocator (per_process *u)
|
||||
{
|
||||
if (CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL (u))
|
||||
if (u && CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL (u))
|
||||
do_pseudo_reloc (u->pseudo_reloc_start, u->pseudo_reloc_end, u->image_base);
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -26,7 +26,7 @@ details. */
|
|||
|
||||
#define _SA_NORESTART 0x8000
|
||||
|
||||
static int sigaction_worker (int, const struct sigaction *, struct sigaction *, bool, const char *)
|
||||
static int sigaction_worker (int, const struct sigaction *, struct sigaction *, bool)
|
||||
__attribute__ ((regparm (3)));
|
||||
|
||||
#define sigtrapped(func) ((func) != SIG_IGN && (func) != SIG_DFL)
|
||||
|
@ -390,9 +390,9 @@ abort (void)
|
|||
do_exit (SIGABRT); /* signal handler didn't exit. Goodbye. */
|
||||
}
|
||||
|
||||
static int
|
||||
static int __attribute__ ((regparm (3)))
|
||||
sigaction_worker (int sig, const struct sigaction *newact,
|
||||
struct sigaction *oldact, bool isinternal, const char *fnname)
|
||||
struct sigaction *oldact, bool isinternal)
|
||||
{
|
||||
int res = -1;
|
||||
myfault efault;
|
||||
|
@ -445,14 +445,15 @@ sigaction_worker (int sig, const struct sigaction *newact,
|
|||
}
|
||||
|
||||
out:
|
||||
syscall_printf ("%R = %s(%d, %p, %p)", res, fnname, sig, newact, oldact);
|
||||
return res;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact)
|
||||
{
|
||||
return sigaction_worker (sig, newact, oldact, false, "sigaction");
|
||||
int res = sigaction_worker (sig, newact, oldact, false);
|
||||
syscall_printf ("%R = sigaction(%d, %p, %p)", res, sig, newact, oldact);
|
||||
return res;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
|
@ -549,7 +550,9 @@ siginterrupt (int sig, int flag)
|
|||
act.sa_flags &= ~_SA_NORESTART;
|
||||
act.sa_flags |= SA_RESTART;
|
||||
}
|
||||
return sigaction_worker (sig, &act, NULL, true, "siginterrupt");
|
||||
int res = sigaction_worker (sig, &act, NULL, true);
|
||||
syscall_printf ("%R = siginterrupt(%d, %p)", sig, flag);
|
||||
return res;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
|
|
|
@ -162,7 +162,7 @@ void dll_dllcrt0_1 (void *);
|
|||
/* dynamically loaded dll initialization */
|
||||
extern "C" int dll_dllcrt0 (HMODULE, per_process *);
|
||||
|
||||
void _pei386_runtime_relocator (per_process *);
|
||||
extern "C" void _pei386_runtime_relocator (per_process *);
|
||||
|
||||
/* dynamically loaded dll initialization for non-cygwin apps */
|
||||
extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
|
||||
|
|
Loading…
Reference in New Issue