docs/0 - Table of content.txt
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Fri Jan 27 13:31:16 2012 +0100 (2012-01-27)
changeset 2854 a70abdbfa342
parent 2563 e17f35b05539
child 2908 dcdb309b7967
permissions -rw-r--r--
complibs/cloog: fix linking with libm

In Ubuntu 11.04 and 11.10, the default options for ld have changed.
--no-copy-dt-needed-entries and --as-needed are now enabled by default, which
causes errors like:

[EXTRA] Checking CLooG/ppl
[DEBUG] ==> Executing: 'make' '-j3' '-s' 'check'
[ALL ] Making check in .
[ALL ] config.status: creating include/cloog/cloog-config.h
[ALL ] config.status: include/cloog/cloog-config.h is unchanged
[ALL ] libtool: link: i686-build_pc-linux-gnu-gcc -Wall -fomit-frame-pointer
-pipe -o cloog cloog.o -L/<snip>/build/static/lib ./.libs/libcloog.a -lm
/<snip>/build/static/lib/libppl_c.a /<snip>/build/static/lib/libpwl.a
/<snip>/build/static/lib/libppl.a /<snip>/build/static/lib/libgmpxx.a
/<snip>/build/static/lib/libgmp.a -lstdc++
[ALL ] /usr/bin/ld: /<snip>/build/static/lib/libppl.a(MIP_Problem.o):
undefined reference to symbol 'sqrt@@GLIBC_2.0'
[ALL ] /usr/bin/ld: note: 'sqrt@@GLIBC_2.0' is defined in DSO
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so so try adding
it to the linker command line
[ALL ] /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../i386-linux-gnu/libm.so:
could not read symbols: Invalid operation
[ALL ] collect2: ld returned 1 exit status
[ERROR] make[2]: *** [cloog] Error 1
[ERROR] make[1]: *** [check-recursive] Error 1

See:
https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition

This patch fixes these errors by placing '-lm' at the right place on the command
line as libppl requires libm when linking cloog.

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
     1 File.........: 0 - Table of content.txt
     2 Copyright....: (C) 2010 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     3 License......: Creative Commons Attribution Share Alike (CC-by-sa), v2.5
     4 
     5 
     6 Table Of Content  /
     7 _________________/
     8 
     9 
    10 1- Introduction
    11     - History
    12     - Referring to crosstool-NG
    13 
    14 2- Installing crosstool-NG
    15     - Install method
    16     - The hacker's way
    17     - Preparing for packaging
    18     - Shell completion
    19     - Contributed code
    20 
    21 3- Configuring a toolchain
    22     - Interesting config options
    23     - Re-building an existing toolchain
    24     - Using as a backend for a build-system
    25 
    26 4- Building the toolchain
    27     - Stopping and restarting a build
    28     - Testing all toolchains at once
    29     - Overriding the number of // jobs
    30     - Note on // jobs
    31     - Tools wrapper
    32 
    33 5- Using the toolchain
    34     - The 'populate' script
    35 
    36 6- Toolchain types
    37     - Seemingly-native toolchains
    38 
    39 7- Contributing
    40     - Sending a bug report
    41     - Sending patches
    42 
    43 8- Internals
    44     - Makefile front-end
    45     - Kconfig parser
    46     - Architecture-specific
    47     - Adding a new version of a component
    48     - Build scripts
    49 
    50 9 - How is a toolchain constructed?
    51     - I want a cross-compiler! What is this toolchain you're speaking about?
    52     - So, what are those components in a toolchain?
    53     - And now, how do all these components chained together?
    54     - So the list is complete. But why does crosstool-NG have more steps?
    55 
    56 A- Credits
    57 
    58 B- Known issues
    59     - gcc is not found, although I *do* have gcc installed
    60     - The extract and/or path steps fail under Cygwin
    61     - uClibc fails to build under Cygwin
    62     - On 64-bit build systems, the glibc (possibly eglibc too) build
    63       fails for 64-bit targets, because it can not find libgcc
    64     - libtool.m4: error: problem compiling FC test program
    65     - unable to detect the exception model
    66     - configure: error: forced unwind support is required
    67     - glibc start files and headers fail with: [/usr/include/limits.h] Error 1
    68 
    69 C- Misc. tutorials
    70     - Using crosstool-NG on FreeBSD (and other *BSD)
    71     - Using crosstool-NG on MacOS-X
    72     - Using Mercurial to hack crosstool-NG