config/debug/duma.in
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Fri Jan 27 13:31:16 2012 +0100 (2012-01-27)
changeset 2854 a70abdbfa342
parent 2444 896cb0d36c1a
child 3142 6569f6a9060c
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 # D.U.M.A. - Detect Unintended Memory Access - Memory checker
     2 
     3 ## depends on ! BACKEND
     4 
     5 ## help D.U.M.A. - Detect Unintended Memory Access
     6 ## help A memory bound checker, with additional features.
     7 ## help Formerly known as Electric Fence.
     8 
     9 config DUMA_A
    10     bool
    11     prompt "Build a static library"
    12     default y
    13 
    14 config DUMA_SO
    15     bool
    16     prompt "Build a shared library"
    17     default y if SHARED_LIBS
    18 
    19 choice
    20     bool
    21     prompt "D.U.M.A. version"
    22 # Don't remove next line
    23 # CT_INSERT_VERSION_BELOW
    24 
    25 config DUMA_V_2_5_15
    26     bool
    27     prompt "2_5_15"
    28 
    29 config DUMA_V_2_5_14
    30     bool
    31     prompt "2_5_14 (OBSOLETE)"
    32     depends on OBSOLETE
    33 
    34 config DUMA_V_2_5_12
    35     bool
    36     prompt "2_5_12 (OBSOLETE)"
    37     depends on OBSOLETE
    38 
    39 config DUMA_V_2_5_8
    40     bool
    41     prompt "2_5_8 (OBSOLETE)"
    42     depends on OBSOLETE
    43 
    44 config DUMA_V_2_5_1
    45     bool
    46     prompt "2_5_1 (OBSOLETE)"
    47     depends on OBSOLETE
    48 
    49 endchoice
    50 
    51 config DUMA_VERSION
    52     string
    53 # Don't remove next line
    54 # CT_INSERT_VERSION_STRING_BELOW
    55     default "2_5_15" if DUMA_V_2_5_15
    56     default "2_5_14" if DUMA_V_2_5_14
    57     default "2_5_12" if DUMA_V_2_5_12
    58     default "2_5_8" if DUMA_V_2_5_8
    59     default "2_5_1" if DUMA_V_2_5_1