config/binutils/elf2flt.in
author Oron Peled <oron@actcom.co.il>
Mon Aug 03 00:49:25 2009 +0200 (2009-08-03)
changeset 1449 8ad2773e7ae3
child 1535 073d351bdcd3
permissions -rw-r--r--
[complib:mpfr] Fix building MPFR in some weird cases

The tmul test uses a compiled-in input file in $(srcdir).
The problem is that the Makefile passes it unquoted. The C code
tries to stringify it using clever macros, which may *usually* work.

In my case the source directory was named:
.../toolchain-powerpc-e500v2-linux-gnuspe-1.0-2.fc10/.../tests
And guess what? During testing I found out the program fails because
it tries to open:
.../toolchain-powerpc-e500v2-1-gnuspe-1.0-2.fc10/.../tests

Yes, CPP tokenized the macro before stringifying it and not surprisingly
the 'linux' part was converted to 1.
[on Fedora-10: cpp (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)]

So the attached patch simplify the macros and pass the path as string
from the Makefile.
yann@1345
     1
# elf2flt options
yann@1345
     2
yann@1345
     3
if ARCH_BINFMT_FLAT
yann@1345
     4
yann@1345
     5
comment "elf2flt"
yann@1345
     6
yann@1345
     7
config ELF2FLT_VERSION
yann@1345
     8
    string
yann@1345
     9
yann@1345
    10
choice
yann@1345
    11
    bool
yann@1345
    12
    prompt "elf2flt version"
yann@1345
    13
yann@1345
    14
config ELF2FLT_CVSHEAD
yann@1345
    15
    bool
yann@1345
    16
    prompt "CVS Head"
yann@1345
    17
    help
yann@1345
    18
      Grab the latest version of elf2flt from the CVS repository
yann@1345
    19
yann@1345
    20
config ELF2FLT_CVS_SNAPSHOT
yann@1345
    21
    bool
yann@1345
    22
    prompt "CVS Snapshot"
yann@1345
    23
yann@1345
    24
# CT_INSERT_VERSION_ABOVE
yann@1345
    25
# Don't remove above line!
yann@1345
    26
endchoice
yann@1345
    27
yann@1345
    28
config ELF2FLT_CVS_SNAPSHOT_SPEC
yann@1345
    29
    string
yann@1345
    30
    depends on ELF2FLT_CVS_SNAPSHOT
yann@1345
    31
    default ""
yann@1345
    32
    prompt "CVS refspec for elf2flt"
yann@1345
    33
    help
yann@1345
    34
       What you enter here will be passed verbatim to the cvs checkout command
yann@1345
    35
       so be careful!
yann@1345
    36
yann@1345
    37
config ELF2FLT_VERSION
yann@1345
    38
    string
yann@1345
    39
    default "head" if ELF2FLT_CVSHEAD
yann@1345
    40
# CT_INSERT_VERSION_STRING_ABOVE
yann@1345
    41
# Don't remove above line!
yann@1345
    42
yann@1345
    43
config ELF2FLT_EXTRA_CONFIG
yann@1345
    44
    string
yann@1345
    45
    prompt "elf2flt extra config"
yann@1345
    46
    default ""
yann@1345
    47
    help
yann@1345
    48
      Extra flags passed onto ./configure when configuring
yann@1345
    49
yann@1345
    50
endif