Mail Archives: cygwin/2009/12/18/14:46:08
--------------050003000709090109040905
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
jojelino wrote:
>> make -j 10 because of speed gain.
> and it complains.. which i reported it.
> so i got
>> cd i686-pc-cygwin/winsup
> and >make again.
> and it complains when it comes to cygserver.exe
>
> this could be answer for your question?????
I was just curious how you got as far as building cygserver.exe without
running into earlier problems compiling the cygwin1.dll; it doesn't build
using 4.5.0 without a lot of patching.
Anyway, thanks for the bug report; you reminded me that I stumbled across
this bug earlier in the summer but put it to one side because 4.5.0 was still
a long way from release. Time to fix it, particularly now that the libstdc++
changes have gone in.
The problem is a bug in the linker, so you'll need to check out binutils
from sourceware.org cvs and apply the attached
weaksyms-vs-undefs-order-of-ref-fix-take-2.diff patch. You'll also need the
other attached patch for the winsup/cygwin repository before it will all
compile correctly with 4.5.0; there are a number of aliasing problems to which
4.5.0 is more sensitive than earlier GCCs.
(I'll be feeding these patches back upstream in due course, once I've given
them all some further testing, but they build an apparently fully working
4.5.0-compiled cygwin1.dll so far, anyway.)
cheers,
DaveK
--------------050003000709090109040905
Content-Type: text/x-c;
name="weaksyms-vs-undefs-order-of-ref-fix-take-2.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="weaksyms-vs-undefs-order-of-ref-fix-take-2.diff"
SW5kZXg6IGJmZC9jb2ZmbGluay5jCj09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K
UkNTIGZpbGU6IC9jdnMvc3JjL3NyYy9iZmQvY29mZmxpbmsuYyx2CnJldHJp
ZXZpbmcgcmV2aXNpb24gMS43MwpkaWZmIC1wIC11IC1yMS43MyBjb2ZmbGlu
ay5jCi0tLSBiZmQvY29mZmxpbmsuYwkxMCBPY3QgMjAwOSAwNDo1ODo0OCAt
MDAwMAkxLjczCisrKyBiZmQvY29mZmxpbmsuYwkxOCBEZWMgMjAwOSAxODow
OTowMyAtMD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JIHJldHVybmVkIGVudHJ5IHdp
dGggdGhlIGRldGFpbHMgb2YgdGhlIG5ldyBzeW1ib2wuICAqLworCSAgICAg
IGlmICgoKnN5bV9oYXNoKS0+c3ltYm9sX2NsYXNzICE9IENfTlRfV0VBSykK
KwkJeworCQkgICgqc3ltX2hhc2gpLT5zeW1ib2xfY2xhc3MgPSBDX05UX1dF
QUs7CisJCSAgKCpzeW1faGFzaCktPnJvb3QudHlwZSA9IGJmZF9saW5rX2hh
c2hfdW5kZWZ3ZWFrOw0KKwkJICAoKnN5bV9oYXNoKS0+cm9vdC51LnVuZGVm
LmFiZmQgPSBhYmZkOworCQkgICgqc3ltX2hhc2gpLT5yb290LnUudW5kZWYu
d2VhayA9IGFiZmQ7DQorCQkgIC8qIE5vdyBmaXggdGhlIHVuZGVmcyBjaGFp
bi4gICovDQorCQkgIGJmZF9saW5rX3JlcGFpcl91bmRlZl9saXN0IChpbmZv
LT5oYXNoKTsKKwkJfQorCSAgICB9CisKIAkgIGlmIChvYmpfcGUgKGFiZmQp
ICYmIChmbGFncyAmIEJTRl9TRUNUSU9OX1NZTSkgIT0gMCkKIAkgICAgKCpz
eW1faGFzaCktPmNvZmZfbGlua19oYXNoX2ZsYWdzIHw9CiAJICAgICAgQ09G
Rl9MSU5LX0hBU0hfUEVfU0VDVElPTl9TWU1CT0w7Cg==
--------------050003000709090109040905
Content-Type: text/x-c;
name="gcc-4.5-misc-aliasing-fixes.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="gcc-4.5-misc-aliasing-fixes.diff"
? newlib/libc/libc.info
? newlib/libm/libm.info
? winsup/cygwin/gendef.unwind
Index: winsup/cygwin/fhandler.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler.h,v
retrieving revision 1.385
diff -p -u -r1.385 fhandler.h
--- winsup/cygwin/fhandler.h 16 Dec 2009 14:56:10 -0000 1.385
+++ winsup/cygwin/fhandler.h 18 Dec 2009 13:41:23 -0000
@@ -291,6 +291,18 @@ class fhandler_base
DWORD nNumberOfLinks,
DWORD dwFileAttributes)
__attribute__ ((regparm (3)));
+ int __stdcall fstat_helper (struct __stat64 *buf,
+ LARGE_INTEGER ftChangeTime,
+ LARGE_INTEGER ftLastAccessTime,
+ LARGE_INTEGER ftLastWriteTime,
+ LARGE_INTEGER ftCreationTime,
+ DWORD dwVolumeSerialNumber,
+ ULONGLONG nFileSize,
+ LONGLONG nAllocSize,
+ ULONGLONG nFileIndex,
+ DWORD nNumberOfLinks,
+ DWORD dwFileAttributes)
+ __attribute__ ((regparm (3)));
int __stdcall fstat_by_nfs_ea (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstat_by_handle (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstat_by_name (struct __stat64 *buf) __attribute__ ((regparm (2)));
Index: winsup/cygwin/fhandler_disk_file.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_disk_file.cc,v
retrieving revision 1.318
diff -p -u -r1.318 fhandler_disk_file.cc
--- winsup/cygwin/fhandler_disk_file.cc 27 Nov 2009 14:27:22 -0000 1.318
+++ winsup/cygwin/fhandler_disk_file.cc 18 Dec 2009 13:41:23 -0000
@@ -373,11 +373,11 @@ fhandler_base::fstat_by_handle (struct _
pc.file_attributes (fbi.FileAttributes);
return fstat_helper (buf,
fbi.ChangeTime.QuadPart
- ? *(FILETIME *) (void *) &fbi.ChangeTime
- : *(FILETIME *) (void *) &fbi.LastWriteTime,
- *(FILETIME *) (void *) &fbi.LastAccessTime,
- *(FILETIME *) (void *) &fbi.LastWriteTime,
- *(FILETIME *) (void *) &fbi.CreationTime,
+ ? fbi.ChangeTime
+ : fbi.LastWriteTime,
+ fbi.LastAccessTime,
+ fbi.LastWriteTime,
+ fbi.CreationTime,
get_dev (),
fsi.EndOfFile.QuadPart,
fsi.AllocationSize.QuadPart,
@@ -441,11 +441,11 @@ fhandler_base::fstat_by_name (struct __s
pc.file_attributes (fdi_buf.fdi.FileAttributes);
return fstat_helper (buf,
fdi_buf.fdi.ChangeTime.QuadPart ?
- *(FILETIME *) (void *) &fdi_buf.fdi.ChangeTime :
- *(FILETIME *) (void *) &fdi_buf.fdi.LastWriteTime,
- *(FILETIME *) (void *) &fdi_buf.fdi.LastAccessTime,
- *(FILETIME *) (void *) &fdi_buf.fdi.LastWriteTime,
- *(FILETIME *) (void *) &fdi_buf.fdi.CreationTime,
+ fdi_buf.fdi.ChangeTime :
+ fdi_buf.fdi.LastWriteTime,
+ fdi_buf.fdi.LastAccessTime,
+ fdi_buf.fdi.LastWriteTime,
+ fdi_buf.fdi.CreationTime,
pc.fs_serial_number (),
fdi_buf.fdi.EndOfFile.QuadPart,
fdi_buf.fdi.AllocationSize.QuadPart,
@@ -458,10 +458,10 @@ too_bad:
/* Arbitrary value: 2006-12-01 */
RtlSecondsSince1970ToTime (1164931200L, &ft);
return fstat_helper (buf,
- *(FILETIME *) (void *) &ft,
- *(FILETIME *) (void *) &ft,
- *(FILETIME *) (void *) &ft,
- *(FILETIME *) (void *) &ft,
+ ft,
+ ft,
+ ft,
+ ft,
0,
0ULL,
-1LL,
@@ -692,6 +692,28 @@ fhandler_base::fstat_helper (struct __st
}
int __stdcall
+fhandler_base::fstat_helper (struct __stat64 *buf,
+ LARGE_INTEGER ftChangeTime,
+ LARGE_INTEGER ftLastAccessTime,
+ LARGE_INTEGER ftLastWriteTime,
+ LARGE_INTEGER ftCreationTime,
+ DWORD dwVolumeSerialNumber,
+ ULONGLONG nFileSize,
+ LONGLONG nAllocSize,
+ ULONGLONG nFileIndex,
+ DWORD nNumberOfLinks,
+ DWORD dwFileAttributes)
+{
+ return fstat_helper (buf,
+ ((FILETIME) {ftChangeTime.u.LowPart, ftChangeTime.u.HighPart}),
+ ((FILETIME) {ftLastAccessTime.u.LowPart, ftLastAccessTime.u.HighPart}),
+ ((FILETIME) {ftLastWriteTime.u.LowPart, ftLastWriteTime.u.HighPart}),
+ ((FILETIME) {ftCreationTime.u.LowPart, ftCreationTime.u.HighPart}),
+ dwVolumeSerialNumber, nFileSize, nAllocSize,
+ nFileIndex, nNumberOfLinks, dwFileAttributes);
+}
+
+int __stdcall
fhandler_disk_file::fstat (struct __stat64 *buf)
{
return fstat_fs (buf);
Index: winsup/cygwin/fhandler_floppy.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_floppy.cc,v
retrieving revision 1.55
diff -p -u -r1.55 fhandler_floppy.cc
--- winsup/cygwin/fhandler_floppy.cc 24 Jul 2009 20:54:33 -0000 1.55
+++ winsup/cygwin/fhandler_floppy.cc 18 Dec 2009 13:41:23 -0000
@@ -56,7 +56,8 @@ fhandler_dev_floppy::get_drive_info (str
__seterrno ();
else
{
- di = &((DISK_GEOMETRY_EX *) dbuf)->Geometry;
+ DISK_GEOMETRY_EX *dgx = (DISK_GEOMETRY_EX *) dbuf;
+ di = &dgx->Geometry;
if (!DeviceIoControl (get_handle (),
IOCTL_DISK_GET_PARTITION_INFO_EX, NULL, 0,
pbuf, 256, &bytes_read, NULL))
Index: winsup/cygwin/fhandler_proc.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_proc.cc,v
retrieving revision 1.87
diff -p -u -r1.87 fhandler_proc.cc
--- winsup/cygwin/fhandler_proc.cc 9 Jun 2009 09:45:29 -0000 1.87
+++ winsup/cygwin/fhandler_proc.cc 18 Dec 2009 13:41:23 -0000
@@ -637,7 +637,9 @@ format_proc_cpuinfo (void *, char *&dest
read_value ("Identifier", REG_SZ);
bufptr += __small_sprintf (bufptr, "identifier : %s\n", szBuffer);
read_value ("~Mhz", REG_DWORD);
- bufptr += __small_sprintf (bufptr, "cpu MHz : %u\n", *(DWORD *) szBuffer);
+ union { char szbuff[sizeof (DWORD)]; DWORD dw; } u;
+ memcpy (u.szbuff, szBuffer, sizeof (DWORD));
+ bufptr += __small_sprintf (bufptr, "cpu MHz : %u\n", u.dw);
print ("flags :");
if (IsProcessorFeaturePresent (PF_3DNOW_INSTRUCTIONS_AVAILABLE))
@@ -675,7 +677,9 @@ format_proc_cpuinfo (void *, char *&dest
bufptr += __small_sprintf (bufptr, "vendor_id\t: %s\n",
(char *)vendor_id);
read_value ("~Mhz", REG_DWORD);
- unsigned cpu_mhz = *(DWORD *)szBuffer;
+ union { char szbuff[sizeof (DWORD)]; DWORD dw; } u;
+ memcpy (u.szbuff, szBuffer, sizeof (DWORD));
+ unsigned cpu_mhz = u.dw;
if (maxf >= 1)
{
unsigned features2, features1, extra_info, cpuid_sig;
Index: winsup/cygwin/fhandler_tty.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_tty.cc,v
retrieving revision 1.190
diff -p -u -r1.190 fhandler_tty.cc
--- winsup/cygwin/fhandler_tty.cc 24 Jul 2009 20:54:33 -0000 1.190
+++ winsup/cygwin/fhandler_tty.cc 18 Dec 2009 13:41:24 -0000
@@ -225,6 +225,7 @@ process_input (void *)
== line_edit_signalled)
tty_master->console->eat_readahead (-1);
}
+ return 0;
}
bool
@@ -438,6 +439,7 @@ process_ioctl (void *)
: (void *) &ttyp->arg);
SetEvent (tty_master->ioctl_done_event);
}
+ return 0;
}
/**********************************************************************/
Index: winsup/cygwin/hookapi.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/hookapi.cc,v
retrieving revision 1.19
diff -p -u -r1.19 hookapi.cc
--- winsup/cygwin/hookapi.cc 11 Sep 2008 04:34:23 -0000 1.19
+++ winsup/cygwin/hookapi.cc 18 Dec 2009 13:41:24 -0000
@@ -252,7 +252,7 @@ hook_or_detect_cygwin (const char *name,
fh.origfn = NULL;
fh.hookfn = fn;
char *buf = (char *) alloca (strlen (name) + sizeof ("_64"));
- int i;
+ int i = -1;
// Iterate through each import descriptor, and redirect if appropriate
for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++)
{
cvs diff: winsup/cygwin/how-crt-and-initfini.txt is a new entry, no comparison available
cvs diff: winsup/cygwin/how-cxx-abi.txt is a new entry, no comparison available
Index: winsup/cygwin/passwd.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/passwd.cc,v
retrieving revision 1.84
diff -p -u -r1.84 passwd.cc
--- winsup/cygwin/passwd.cc 26 Jan 2009 13:20:46 -0000 1.84
+++ winsup/cygwin/passwd.cc 18 Dec 2009 13:41:24 -0000
@@ -98,11 +98,14 @@ internal_getpwsid (cygpsid &sid)
{
endptr = strchr (sid_string + 2, 0) - 1;
for (int i = 0; i < pr.curr_lines; i++)
- if ((pw = passwd_buf + i)->pw_dir > pw->pw_gecos + 8)
- for (ptr1 = endptr, ptr2 = pw->pw_dir - 2;
- *ptr1 == *ptr2; ptr2--)
+ {
+ pw = passwd_buf + i;
+ if (pw->pw_dir > pw->pw_gecos + 8)
+ for (ptr1 = endptr, ptr2 = pw->pw_dir - 2;
+ *ptr1 == *ptr2; ptr2--)
if (!*--ptr1)
return pw;
+ }
}
return NULL;
}
Index: winsup/cygwin/syscalls.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/syscalls.cc,v
retrieving revision 1.548
diff -p -u -r1.548 syscalls.cc
--- winsup/cygwin/syscalls.cc 17 Dec 2009 18:33:05 -0000 1.548
+++ winsup/cygwin/syscalls.cc 18 Dec 2009 13:41:24 -0000
@@ -3641,8 +3641,12 @@ long gethostid (void)
status = UuidCreate (&Uuid);
if (status == RPC_S_OK)
{
- data[4] = *(unsigned *)&Uuid.Data4[2];
- data[5] = *(unsigned short *)&Uuid.Data4[6];
+ unsigned d4;
+ unsigned short d5;
+ memcpy (&d4, &Uuid.Data4[2], sizeof (unsigned));
+ memcpy (&d5, &Uuid.Data4[6], sizeof (unsigned short));
+ data[4] = d4;
+ data[5] = d5;
// Unfortunately Windows will sometimes pick a virtual Ethernet card
// e.g. VMWare Virtual Ethernet Adaptor
debug_printf ("MAC address of first Ethernet card: %02x:%02x:%02x:%02x:%02x:%02x",
Index: winsup/cygwin/include/cygwin/in6.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/in6.h,v
retrieving revision 1.6
diff -p -u -r1.6 in6.h
--- winsup/cygwin/include/cygwin/in6.h 18 Jan 2007 10:25:40 -0000 1.6
+++ winsup/cygwin/include/cygwin/in6.h 18 Dec 2009 13:41:24 -0000
@@ -16,10 +16,7 @@ details. */
#define INET6_ADDRSTRLEN 46
#define IN6_ARE_ADDR_EQUAL(a, b) \
- (((const uint32_t *)(a))[0] == ((const uint32_t *)(b))[0] \
- && ((const uint32_t *)(a))[1] == ((const uint32_t *)(b))[1] \
- && ((const uint32_t *)(a))[2] == ((const uint32_t *)(b))[2] \
- && ((const uint32_t *)(a))[3] == ((const uint32_t *)(b))[3])
+ (!memcmp ((a), (b), 4 * sizeof (uint32_t)))
#define IN6_IS_ADDR_UNSPECIFIED(addr) \
(((const uint32_t *)(addr))[0] == 0 \
--------------050003000709090109040905
Content-Type: text/plain; charset=us-ascii
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--------------050003000709090109040905--
- Raw text -