initCommon(); $template->displayHeader(); ?>

12. Development

This section covers various development tools and features.

12.1. Runtime

These are the new features in glibc:

  • Support for priority inheriting and priority protecting mutexes. These are two features described in the POSIX standards.

    • Priority inheriting mutexes automatically prevent priority inversion caused by waiting for the availability of mutexes. The kernel automatically boosts the priority of the thread holding the mutex until it unlocks the mutex.

    • Priority protection allows to specify a priority that all threads that acquire the mutex will run with until the mutex is unlocked. This feature is not available for robust mutexes.

  • The destination address sorting performed by the getaddrinfo() interface for hostname lookup can now be customized by rules in the /etc/gai.conf file.

  • Significant speed-ups in NIS and NIS+ processing.

  • RFC 3542 support completed (advanced socket APIs for IPv6).

  • Significant speed-ups of dynamic symbol lookup.

12.2. Tools

The linker includes support for the new ELF symbol hash table format. Use the --hash-style option of the linker to select the format(s).

12.2.1. Kernel header files

This release of Fedora has been built using Linux kernel headers exported directly from the kernel, using the new headers_install feature of the 2.6.18 kernel. Thus, the glibc-kernheaders package has been removed and replaced with kernel-headers, a subpackage of kernel.

Developers may notice some changes between these new kernel headers and what was present before, including but not limited to the following:

  • The <linux/compiler.h> header file has been removed, since it contains nothing of use to userspace.

  • The _syscallX() macros are removed. Userspace should use syscall() from the C library instead.

  • The PAGE_SIZE macro is removed from some architectures, since the page size is variable. Userspace should be using sysconf(_SC_PAGE_SIZE) or getpagesize() instead.

  • The <asm/atomic.h> and <asm/bitops.h> header files have been removed. These were not designed for use in userspace, and would fail to compile on some architectures while silently giving non-atomic behaviour on others. The C compiler provides its own atomic builtin functions that are suitable for use in userspace programs instead.

  • Content that was previously protected with #ifdef __KERNEL__ is now elided completely with the unifdef tool. Defining __KERNEL___ in order to see parts that should not be visible to userspace is no longer effective.

In addition, some other header files that xare not suitable for use in userspace have been removed, and still more headers have been edited to remove unsuitable content.

[Note]Kernel header changes are not Fedora-specific

These changes are inherited from the upstream kernel and are not specific to Fedora. Any distribution using the current officially-exported kernel headers would be the same.

12.2.2. GCC Compiler Collection

This release of Fedora has been built with GCC 4.1, which is included with the distribution.

12.2.2.1. Caveats
  • Fedora developers have introduced changes in the ELF .hash section that provides symbols for dynamic linking. This new .gnu.hash section, which is produced with the new default --hash-style=gnu option for gcc, serves the same purpose as previous hash sections. It provides, however, an approximately 50% increase in dynamic linking speed. Binaries and libraries produced with the new hashing function are incompatible with older glibc and dynamic linker releases. To use the old-style hashing routines for compatibility with older glibc-based systems, pass the --hash-style=sysv option instead.

  • You need GDB 6.1 or newer to debug binaries, unless they are compiled using the -fno-var-tracking compilation option.

  • The -fwritable-strings option is no longer accepted.

  • English-language diagnostic messages now use Unicode quotes. If you cannot read this, set your LC_CTYPE environment variable to C or change your terminal emulator.

  • The specs file is no longer installed on most systems. Ordinary users will not notice, but developers who need to alter the file can use the -dumpspecs option to generate the file for editing.

12.2.2.2. Code Generation
  • The SSA code optimizer is now included and brings with it better constant propagation, partial redundancy elimination, load and store code motion, strength reduction, dead storage elimination, better detection of unreachable code, and tail recursion by accumulation.

  • Autovectorization is supported. This technique achieves higher performance for repetitive loop code, in some circumstances.

12.2.2.3. Language Extensions
  • The new sentinel attribute causes the compiler to issue a warning if a function such as execl(char *path, const char *arg, ...), which requires a NULL list terminator, is missing the NULL.

  • The cast-as-lvalue, conditional-expression-as-lvalue, and compund-expression-as-lvalue extensions have been removed.

  • The #pragma pack() semantics are now closer to those used by other compilers.

  • Taking the address of a variable declared with the register modifier now generates an error instead of a warning.

  • Arrays of incomplete element types now generate an error. This implies no forward reference to structure definitions.

  • The basic compiler, without any optimization (-O0), has been measured as much as 25% faster in real-world code.

  • Libraries may now contain function-scope static variables in multi-threaded programs. Embedded developers can use the -fno-threadsafe-statics to turn off this feature, but ordinary users should never do this.

12.3. Ruby

The standard search path for Ruby libraries, $:, has changed in accordance with the packaging guidelines. Changes were also made to some of the entries in Config::CONFIG in the rbconfig module. The most important changes include:

  • sitedir and related directories (sitelibdir, sitearchdir) are now under rubylibdir. Instead of /usr/lib/site_ruby they are underneath /usr/lib/ruby/site_ruby.

  • The directories for architecture-independent pure Ruby code are always under /usr/lib, even on x86_64 architecture, where they used to be under /usr/lib64. This change affects the Config::CONFIG entries rubylibdir and sitelibdir.

Directories that were previously in $: remain there for the time being, so that existing code, such as /usr/lib/site_ruby, does not need to be modified. These directories are deprecated though, and will be removed by the release of Fedora Core 8. Build Ruby RPM packages in accordance with the packaging guidelines. In particular, Ruby libraries should only be installed into sitelibdir and sitearchdir. You should also follow this rule for Ruby code that is not packaged as an RPM.

displayFooter('$Date: 2007/02/06 03:00:19 $'); ?>