Changeset d185132 in mainline


Ignore:
Timestamp:
2011-06-24T23:06:34Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
723560f
Parents:
021c508
Message:

Added two intrusive patches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/binutils/intrusive.sh

    r021c508 rd185132  
    7373# to patch libiberty to avoid compiler warnings.
    7474#
     75# Patch 5
     76# When host and target system is equal, libbfd wants to compile a support
     77# for core files, which is dependent on non-standard headers sys/param.h
     78# and sys/user.h. Since we are cross compiling even when host and target
     79# are equal, variables related to core file support must be cleared.
     80#
     81# Patch 6
     82# There is a few occurences in binutils where POSIX function is declared
     83# and called without first including the corresponding header. Such
     84# declarations cause a problem to the linker, because all functions
     85# from libposix are prefixed with the posix_ prefix.
     86#
    7587
    7688case "$1" in
     
    8496                cp -f "$2/libiberty/configure" "$2/libiberty/configure.backup"
    8597                cp -f "$2/libiberty/pex-common.h" "$2/libiberty/pex-common.h.backup"
     98                cp -f "$2/libiberty/xstrerror.c" "$2/libiberty/xstrerror.c.backup"
    8699                cp -f "$2/opcodes/configure" "$2/opcodes/configure.backup"
    87100
     
    95108                cat "$2/bfd/configure.backup" | \
    96109                # See Patch 1.
    97                 sed 's/^cross_compiling=no/cross_compiling=yes/g' \
     110                sed 's/^cross_compiling=no/cross_compiling=yes/g' | \
     111                # See Patch 5.
     112                sed 's/COREFILE=".*"/COREFILE='\'\''/g' | \
     113                sed 's/COREFILE=[^ ]*/COREFILE='\'\''/g' \
    98114                > "$2/bfd/configure"
    99115
     
    130146                > "$2/libiberty/pex-common.h"
    131147
     148                # Patch libiberty xstrerror.c.
     149                (
     150                echo '#include <string.h>'
     151                echo '#define DONT_DECLARE_STRERROR'
     152                cat "$2/libiberty/xstrerror.c.backup"
     153                ) > "$2/libiberty/xstrerror.c"
     154
    132155                # Patch opcodes configure script.
    133156                cat "$2/opcodes/configure.backup" | \
     
    148171                mv -f "$2/libiberty/configure.backup" "$2/libiberty/configure"
    149172                mv -f "$2/libiberty/pex-common.h.backup" "$2/libiberty/pex-common.h"
     173                mv -f "$2/libiberty/xstrerror.c.backup" "$2/libiberty/xstrerror.c"
    150174                mv -f "$2/opcodes/configure.backup" "$2/opcodes/configure"
    151175                ;;
Note: See TracChangeset for help on using the changeset viewer.