R e l e a s e N o t e s G C C f o r O S / 2 +----------------------------------------------------+ (C)'2003-2004 InnoTek Systemberatung GmbH http://www.innotek.de v3.2.2 Beta 4 CSD 1: -------------------- Bug fixes: o Fixed crash in file stream allocation code. o Fixed incorrect time on machines which had DATETIME::timezone set. This fix changes the time granularity from hundredths of a second to milliseconds. o Added the SPBCDATA struct, the defines FCF_CLOSEBUTTON and BS_NOTEBOOKBUTTON and infosegment structs to os2emx.h o Fixed bug in sys/locale.h where it hid the lconv struct. o Fixed missing error number translations in getsockopt() and setsockopt(). o Fixed potential conflict caused by sys/types.h not defining _KEY_T with the key_t typedef. o Fixed missing 64bit I/O support in ftell(), fstat() and stat(). o Fixed UCS-2 codepage mappings. o Fixed problem with emxbind not recognizing option -e and a problem with case sensitivity in the export checking. v3.2.2 Beta 4: -------------- (The changelog is removed, thus the release notes are more detailed.) New features and fixes: o Filehandle rewrite. Files, pipes and sockets now share the same handle space. o Updated binutils from v2.11.2 to v2.14 adding as-elf.exe and ld-elf.exe as goodies for the adventurous. o GCC defines __INNOTEK_LIBC__=0x005. The value reflects the LIBC version, form: 0xGMM Where G=major version and MM=middle version numbers. o Changed library search algorithms for the linkers (emxomfld and ld). Three variations, static, shared and shared+dll. (The options indicated corresponds to what binutils 2.12.x documents.) static: (-Bstatic, -non_shared, -dn, -static) 1. libfoo_s.a 2. foo_s.a 3. libfoo.a 4. foo.a shared: (default, -Bshared, -call_shared, -dy) 1. libfoo_dll.a 2. foo_dll.a 3. libfoo.a 4. foo.a 5. libfoo_s.a 6. foo_s.a shared+dll: (-Zdll-search with -Bshared, -call_shared, -dy) 1. libfoo_dll.a 2. foo_dll.a 3. libfoo.a 4. foo.a 5. foo.dll 6. libfoo_s.a 7. foo_s.a o Added some deadlock checking/termination checks to semphores. o Added macros to os2emx.h for preserving FPU control word and applied these to certing read and write operations in LIBC. o Added feature to emxomfld to automatically convert a.out libraries and objects to OMF (using temporary files). Enabled by default but can be disabled by the option -Zno-autoconv. o Added support to emximp for dlls. o Added support for automatic conversion of dlls to temporary import libraries emxomfld and ld. o Added getopt_long() and changed getopt() to FreeBSD implementations. o Added a few more code page aliases. o Added optional breakpoint in abort. The presense of the env.var. LIBC_BREAKPOINT_ABORT triggers the breakpoint instruction. o Added syslog interfaces (contrib from Yuri Dario). o Added to libc and updated BSD db code to FreeBSD 5.1 level. o Added to libc and updated regex code to FreeBSD 5.1 level. o Ported the posix spawn api from GLIBC v2.3.2. o Updated with os2emx.h flags for DosQueryMemState(). o Changed size_t to unsigned int (from unsigned long int) and ptrdiff_t to signed int (from signed long int) to comply with most of the other i386 environments. o Changed abort and default signal termination messages to say which process it's printed from. o Changed the glob() and globfree() implemenation with a port of the FreeBSD 5.1 implemenation. o Changed so_ioctl() to os2_ioctl() to better match the toolkit. o Changed time_t to be signed as in BSD & linux. (Negative values means date/time before epoc.) o Changed to FreeBSD implementation of difftime(). o Increased default stream buffer size to 2 pages. o Workaround for DosSetFileLocksL() on non JFS volumes. o Workaround for bad FIL_STANDARDL buffer handling in os2krnl. o Fixed waitpid() to respect the WNOHANG flag. o Fixed strerror() to set errno if an invalid error number is specified. o Fixed problem with emxexp emitting ordinal without being told. o Fixed broken setenv(). o Fixed errno value for read() and write() when the handle isn't opened for that operation. o Fixed a bad record length problem in emxomf. o Fixed type_tag too long issue in emxomf. o Fixed repetition of main source file in HLL debuginfo (emxomf). o Fixed weakld problem with selfrefering aliases. o Fixed weakld problem with PUBLIC and COMM clash. o Fixed problem with streams not being flushed on termination. o Fixed define clash in float.h when in C99 mode. o Fixed abend in GCC if TMPDIR or TMP was ending with a slash. o Fixed crash in ld when having fixups to weak symbols. o Fixed bad conversion of dll0*.o to OMF, the OMF version got an unwanted stack object. o New functions: isblank(), ishexnumber(), isnumber(), mempcpy(), realpath(), strnlen(), asctime_r(), ctime_r(), gmtime_r(), localtime_r(), strerror_r(), usleep(). o New functions & globals (from FreeBSD 5.1): imaxabs(), imaxdiv(), strtoimax(), strtoumax(), hcreate(), hdestroy(), hsearch(), insque(), lfind(), lsearch(), remque(), tdelete(), tfind(), tsearch(), twalk(), reallocf(), strsignal(), sys_signame, sys_siglist, sys_nsig, regcomp(), regerror(), regexec(), regfree(), + bsd db functions. o New functions (from GLIBC 2.3.2): error(), error_at_line(), strndup(), argz_add(), argz_add_sep(), argz_append(), argz_count(), argz_create(), argz_create_sep(), argz_delete(), argz_extract(), argz_insert(), argz_next(), argz_replace(), argz_stringify(), posix_spawnp() posix_spawn(), posix_spawnattr_destroy(), posix_spawnattr_getflags(), posix_spawnattr_getpgroup(), posix_spawnattr_getschedparam(), posix_spawnattr_getschedpolicy(), posix_spawnattr_getsigdefault(), posix_spawnattr_getsigmask(), posix_spawnattr_init(), posix_spawnattr_setflags(), posix_spawnattr_setpgroup(), posix_spawnattr_setschedparam(), posix_spawnattr_setschedpolicy(), posix_spawnattr_setsigdefault(), posix_spawnattr_setsigmask(), posix_spawn_file_actions_addclose(), posix_spawn_file_actions_adddup2(), posix_spawn_file_actions_addopen(), posix_spawn_file_actions_destroy(), posix_spawn_file_actions_init() o New headers: nerrno.h (toolkit compatability). o New headers (from FreeBSD 5.1): search.h, sys/queue.h, net/if_types.h. o New headers (from GLIBC 2.3.2): features.h (somewhat crippled), sys/gnu/cdefs.h (included from BSD styled sys/cdefs.h). o Updated headers: stddef.h (FreeBSD, sys/stddef.h (FreeBSD), ulsitem.h (missing defines), os2emx.h, ... o What I forgot... v3.2.2 Beta 3 Fix 1 (private build): ------------------------------------ Fixes to LIBC: o Crash if calloc was called before main(). o TZ parsing of timezones such as PST8EDT. o sigsetjmp() and siglongjmp() visibility. v3.2.2 Beta 3: -------------- A few new features and fixes. o Fixed a bunch of debug info problems. o Added large file support. o Enabled high memory support for LIBC. Two new options to GCC: -Zhigh-mem and -Zhigh-low. If the program is to be enabled for high memory use, specify -Zhigh-mem when linking. Note that socket is not high memory enabled yet. o Made LIBC preserve the FS selector. o Added random() and *rand48() from BSD. o Fixed crash with link386 and unresolved symbols. v3.2.2 Beta 2: -------------- A few bugfixes and a some new features (as usual). o Added file locking support to LIBC. o Fixed _System and _Optlink bugs and made _Optlink support floating point argument passing in registers. o Header updates related to limits and file locking primarily. o Timezone fixes. o Fixed some CRT init trouble in regards to getenv and putenv. o And some other minor stuff.. v3.2.2 Beta 1: -------------- A few bugfixes and a some new features. o Locale support in libc. o Implemented a different approach to OMF and weak symbols. This new hack performs pre-linking before invoking the OMF linker generating new .def files if needed and an extra object file with aliases to resolve the weak symbols correctly. The old approach will be used used when GCC_WEAKSYMS is present in the environment. Please note that due to a bug in BFD, weak symbols don't work 100% correctly. This will be addressed as soon as we have performed the switch to a more recent version of binutils. o A couple of new functions in libc, and a few corrections to existing in respect to namespaces. o Addressed issues with calling conventions. We now detect incompatible calling conventions, emitting warnings and errors where appropriate. o _Optlink is much better, but there are still some issues left. Passing prototyped floating point parameters to _Optlink doesn't work. Mixing of parameters which go into registers (eax, edx, ecx) and parameters which don't - void foo(int eax, struct sss s, int edx) - doesn't work. All these issues are being addressed and are expected to be fixed in the next build. o Changed GCC to link with shared libc by default. This means that in order to link with the static libc one has to specify -static. It also means that -Zmtd or -Zcrtdll are no longer required for linking with shared libc and can be removed from all makescripts. o Changed EMXOMFLD defaults to ilink from Visual Age for C++ v3.6.5 or later (preferably later). The emxomfld usage output will instruct you on how to use older linkers. For VAC308 and VAC365 linkers /dbgpack is specified if debuginfo is to be generated. Emxomf checks for EMXOMFLD_TYPE=link386 when choosing debug info level. o Shipping three extra libc dlls: libc02.dbg: Unstripped version of libc02.dll. This is identical except from the presense of debug info. libc02.prf: Linked together from profiled enabled libraries using kProfiler. libc02.elh: Standard libc but linked with an external electrical fence heap from kLibDbg. These libc02.* dlls can be used instead of libc02.dll. kLibDbg and kProfiler is available in separate zip files at same location as the rest of the InnoTek GCC suite. However these external tools are provided as is. (I might actually not find time to put them out yet.) o Distribution is splitted into several zips: -core.zip: All you really need. -dbg.zip: Map files, unstripped tools and libs, and libc02.elh. -prf.zip: Profiling libraries and libc02.prf. libc.zip: The runtime libraries. (included in core.) The big zip is everything. v3.2.2 Alpha 3: --------------- Primarily bugfixes. o Changed code generator for floating point truncations (double to int casts and such) so PM can freely mess up the fpu status. o We were using the wrong float.h in two sense. We're now using the correct one which includes all the PC defines and prototypes. o Fixed a few issues with error defines and tcpip. Note that some of the error defines have changed value in the process so we could become compatible with the tcpip stack and FreeBSD. o Corrected bugs in a number of headers. o Added more OS/2 prototypes and imports. There is still work left on the header part, o Optimized emxomf debug info conversion. o Wrapped bsdselect for BSD 4.4 header mode to implement bsdselect(). o .... what did we forget... v3.2.2 Alpha 2: --------------- A few bugfixes and a couple of new features. o The TCP/IP headers and libraries scheme have been changed. The default is the current OS/2 tcpip toolkit (BSD 4.4 based). To target the older OS/2 tcpip stack (BSD 4.3 based) you must define TCPV40HDRS before including any TCP/IP headers and make sure usr/lib/tcpipv4 is searched before usr/lib (this is to get the right libsocket). It is recommended to use the -D compiler option for the define and either the LIBRARY_PATH or the -L compiler/linker option for the library. o There are a couple of new and updated based on FreeBSD 5.1. sys\stdint.h and inttypes.h (and a few internal once) are new. sys\types.h and unistd.h are the ones most heavily updated. We're working on getting the headers and libc in a better shape standardwise to easy compatability and portability. o A infinite loop in emxomf has been fixed. o Linker error on sopen() has been corrected. o .... what did we forget... v3.2.2 Alpha 1: --------------- This is the first release from InnoTek, and it contains the InnoTek LIBC. In addition to the new LIBC there is a number of other major changes: o Name mangling in OMF mode have changed. Until this release emxomf used to pretty much strip one leading '_' from symbols when converting them to omf. This is now longer done chiefly in order to correctly support mangling calling conventions like __stdcall and __cdecl. This change have the following side effects: - _System and __cdecl no longer produces the same names and hence all OS/2 API which are _System must be declared as _System in order to link. - Assembly code might need an extra underscore to work, or perhaps change the prototypes to _System. - Global variables are prepended and underscore, so mixing VAC and GCC, or accessing globals from asm, take care. (MSC v6.0 does this too, so it's not any uncommon practise.) The OS/2 headers which are included are all updated to use _System. o TCPIP headers are updated a quite a bit to match the toolkit ones and to reflect the fact that the new libc does not a having common handle space for files and sockets. These changes aren't 100% completed yet, and usage probably will uncover some issues left in there. Also for the programmer there is the following changes in the apis provided: - TCPV40HDRS are supported and should work like with the toolkit headers. It will alias all functions to tcpip40_ editions (using #defines) so we get the right imports thru -llibsocket. - There is no support for sockets in select(). To do select on sockets you will have to use bsdselect() or os2_select(). bsdselect() is only available for TCPV40HDRS. For !defined(TCPV40HDRS) fd_set is in the emx/bsd format and not the OS/2 tcpip v5.0 format. - Socket IOCTLs are not supported by the ioctl() libc function because of the separate handle space for sockets. For sockets so_ioctl() and os2_ioctl() are used. os2_ioctl() is not available when TCPV40HDRS is defined. According to the tcpref in v5.0 so_ioctl() only supports BSD ioctls. - writev() and readv() also clashes with libc. For socket handles use so_writev() and so_readv(). o The prefered OMF linker is now ilink. link386 will fail with an odd error message if you tell gcc/g++ to make debug info. Set the EMXOMFLD_LINKER environment variable to value ilink in order to use ilink as OMF linker. It likely that we will change the default OMF linker to ilink in an later version of the GCC suite. o .... what did we forget...