source: mainline/tools/toolchain-gcc-4.8.1-targets.patch@ 0cabd10

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 0cabd10 was 5a65d29, checked in by Vojtech Horky <vojtechhorky@…>, 12 years ago

Add HelenOS-specific toolchain patches

It is possible to build '*-helenos-*' toolchain, that is the triplet
would contain the word 'helenos' instead of 'linux' and GCC would
provide some HelenOS-specific macros.

The toolchain can be built with the toolchain.sh script, just provide
—helenos-target as a parameter.

Changes to the autotool/configuration scripts would be added later.

  • Property mode set to 100644
File size: 10.8 KB
  • gcc-4.8.1/config.sub

    diff -ud -Nrud gcc-4.8.1/config.sub gcc-4.8.1/config.sub
     
    13691369              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    13701370              | -chorusos* | -chorusrdb* | -cegcc* \
    13711371              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
     1372              | -helenos \
    13721373              | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
    13731374              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
    13741375              | -uxpv* | -beos* | -mpeix* | -udk* \
  • gcc-4.8.1/gcc/config.gcc

    diff -ud -Nrud gcc-4.8.1/gcc/config.gcc gcc-4.8.1/gcc/config.gcc
     
    624624  # need_64bit_hwint=yes # system compiler has this for all arch!
    625625  use_gcc_stdint=wrap
    626626  ;;
    627 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
     627*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu | *-helenos*)
    628628  extra_options="$extra_options gnu-user.opt"
    629629  gas=yes
    630630  gnu_ld=yes
     
    642642  # glibc / uclibc / bionic switch.
    643643  # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
    644644  case $target in
    645     *linux*)
     645    *linux* | *helenos*)
    646646      extra_options="$extra_options linux.opt";;
    647647  esac
    648648  case $target in
     
    663663  use_gcc_stdint=wrap
    664664  # Add Android userspace support to Linux targets.
    665665  case $target in
    666     *linux*)
     666    *linux* | *helenos*)
    667667      tm_file="$tm_file linux-android.h"
    668668      extra_options="$extra_options linux-android.opt"
    669669      ;;
     
    681681  cxx_target_objs="${cxx_target_objs} glibc-c.o"
    682682  tmake_file="${tmake_file} t-glibc"
    683683  target_has_targetcm=yes
     684  # HelenOS
     685  case $target in
     686    *-helenos*) tm_file="$tm_file helenos.h" ;;
     687  esac
    684688  ;;
    685689*-*-netbsd*)
    686690  tmake_file="t-slibgcc"
     
    868872        extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
    869873        tmake_file="${tmake_file} arm/t-arm"
    870874        ;;
    871 arm*-*-linux-*)                 # ARM GNU/Linux with ELF
     875arm*-*-linux-* | arm*-helenos-*)                        # ARM GNU/Linux with ELF
    872876        tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
    873877        case $target in
    874878        arm*b-*-linux*)
     
    890894        # The EABI requires the use of __cxa_atexit.
    891895        default_use_cxa_atexit=yes
    892896        with_tls=${with_tls:-gnu}
     897        # HelenOS
     898        # (Strangely, tm_file ignores the defaults loaded previously and
     899        # we need to add helenos.h one more time.)
     900        case $target in
     901        *-helenos*) tm_file="$tm_file helenos.h arm/helenos-arm32.h arm/helenos.h" ;;
     902        esac
    893903        ;;
    894904arm*-*-uclinux*eabi*)           # ARM ucLinux
    895905        tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
     
    12571267        gas=yes
    12581268        gnu_ld=yes
    12591269        ;;
    1260 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
     1270i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu | i[34567]86-*-helenos)
    12611271                        # Intel 80386's running GNU/*
    12621272                        # with ELF format using glibc 2
    12631273        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
    12641274        case ${target} in
    1265         i[34567]86-*-linux*)
     1275        i[34567]86-*-linux* | i[34567]86-*-helenos)
    12661276                tm_file="${tm_file} linux.h"
    12671277                # Assume modern glibc
    12681278                default_gnu_indirect_function=yes
     
    13181328                tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
    13191329                ;;
    13201330        esac
     1331        # HelenOS
     1332        case $target in
     1333        *-helenos*) tm_file="$tm_file i386/helenos-ia32.h i386/helenos.h" ;;
     1334        esac
    13211335        ;;
    1322 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
     1336x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu | x86_64-*-helenos)
    13231337        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
    13241338                 i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
    13251339        case ${target} in
    1326         x86_64-*-linux*)
     1340        x86_64-*-linux* | x86_64-*-helenos)
    13271341                tm_file="${tm_file} linux.h i386/linux-common.h i386/linux64.h"
    13281342                # Assume modern glibc
    13291343                default_gnu_indirect_function=yes
     
    13591373                esac
    13601374        done
    13611375        TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
     1376        # HelenOS
     1377        case $target in
     1378        *-helenos*) tm_file="$tm_file i386/helenos-amd64.h i386/helenos.h" ;;
     1379        esac
    13621380        ;;
    13631381i[34567]86-pc-msdosdjgpp*)
    13641382        xm_file=i386/xm-djgpp.h
     
    15671585        target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
    15681586        tmake_file="${tmake_file} ia64/t-ia64"
    15691587        ;;
    1570 ia64*-*-linux*)
     1588ia64*-*-linux* | ia64-*-helenos)
    15711589        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
    15721590        tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
    15731591        target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
     1592        # HelenOS
     1593        case $target in
     1594        *-helenos*) tm_file="$tm_file ia64/helenos-ia64.h ia64/helenos.h" ;;
     1595        esac
    15741596        ;;
    15751597ia64*-*-hpux*)
    15761598        tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
     
    17941816        gas=yes
    17951817        test x$with_llsc != x || with_llsc=yes
    17961818        ;;
    1797 mips64*-*-linux* | mipsisa64*-*-linux*)
     1819mips64*-*-linux* | mipsisa64*-*-linux* | mips64*-*-helenos)
    17981820        tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h"
    17991821        tmake_file="${tmake_file} mips/t-linux64"
    18001822        tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
     
    18141836        gnu_ld=yes
    18151837        gas=yes
    18161838        test x$with_llsc != x || with_llsc=yes
     1839        # HelenOS
     1840        case $target in
     1841        *-helenos*) tm_file="$tm_file mips/helenos-mips64el.h mips/helenos.h" ;;
     1842        esac
    18171843        ;;
    1818 mips*-*-linux*)                         # Linux MIPS, either endian.
     1844mips*-*-linux* | mips*-*-helenos)       # Linux MIPS, either endian.
    18191845        tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h"
    18201846        if test x$enable_targets = xall; then
    18211847                tm_file="${tm_file} mips/gnu-user64.h mips/linux64.h"
     
    18301856                tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
    18311857        esac
    18321858        test x$with_llsc != x || with_llsc=yes
     1859        # HelenOS
     1860        case $target in
     1861        mipsel-*-helenos*) tm_file="$tm_file mips/helenos-mips32el.h mips/helenos.h" ;;
     1862        mips-*-helenos*) tm_file="$tm_file mips/helenos-mips32eb.h mips/helenos.h" ;;
     1863        esac
    18331864        ;;
    18341865mips*-mti-elf*)
    18351866        tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h mips/mti-elf.h"
     
    20662097        extra_options="${extra_options} rs6000/sysv4.opt"
    20672098        tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm"
    20682099        ;;
    2069 powerpc-*-linux* | powerpc64-*-linux*)
     2100powerpc-*-linux* | powerpc64-*-linux* | powerpc*-*-helenos)
    20702101        tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
    20712102        extra_options="${extra_options} rs6000/sysv4.opt"
    20722103        tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
     
    20792110            powerpc-*-linux*spe* | powerpc-*-linux*paired*)
    20802111                maybe_biarch=
    20812112                ;;
    2082             powerpc64-*-linux*)
     2113            powerpc64-*-linux* | powerpc64-*-helenos)
    20832114                test x$with_cpu != x || cpu_is_64bit=yes
    20842115                maybe_biarch=always
    20852116                ;;
     
    21122143        if test x${enable_secureplt} = xyes; then
    21132144                tm_file="rs6000/secureplt.h ${tm_file}"
    21142145        fi
     2146        # HelenOS
     2147        case $target in
     2148        powerpc-*-helenos*) tm_file="$tm_file rs6000/helenos-ppc32.h rs6000/helenos.h" ;;
     2149        powerpc64-*-helenos*) tm_file="$tm_file rs6000/helenos-ppc64.h rs6000/helenos64.h" ;;
     2150        esac
    21152151        ;;
    21162152powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
    21172153        tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
     
    24962532        extra_options="${extra_options}"
    24972533        tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64 t-rtems"
    24982534        ;;
    2499 sparc64-*-linux*)
     2535sparc64-*-linux* | sparc64-*-helenos)
    25002536        tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default-64.h sparc/linux64.h sparc/tso.h"
    25012537        extra_options="${extra_options} sparc/long-double-switch.opt"
    25022538        tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
     2539        # HelenOS
     2540        case $target in
     2541        *-helenos*) tm_file="$tm_file sparc/helenos-sparc64.h sparc/helenos64.h" ;;
     2542        esac
    25032543        ;;
    25042544sparc64-*-freebsd*|ultrasparc-*-freebsd*)
    25052545        tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
  • gcc-4.8.1/libgcc/config.host

    diff -ud -Nrud gcc-4.8.1/libgcc/config.host gcc-4.8.1/libgcc/config.host
     
    195195      ;;
    196196  esac
    197197  ;;
    198 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
     198*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu | *-*-helenos)
    199199  tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
    200200  extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
    201201  ;;
     
    322322arm*-*-netbsdelf*)
    323323        tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover"
    324324        ;;
    325 arm*-*-linux*)                  # ARM GNU/Linux with ELF
     325arm*-*-linux* | arm*-helenos-gnueabi)                   # ARM GNU/Linux with ELF
    326326        tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix"
    327327        tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
    328328        tm_file="$tm_file arm/bpabi-lib.h"
     
    518518        ;;
    519519x86_64-*-openbsd*)
    520520        ;;
    521 i[34567]86-*-linux*)
     521i[34567]86-*-linux* | i[34567]86-*-helenos)
    522522        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
    523523        tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm i386/t-crtstuff t-dfprules"
    524524        md_unwind_header=i386/linux-unwind.h
     
    527527        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
    528528        tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm i386/t-crtstuff t-dfprules"
    529529        ;;
    530 x86_64-*-linux*)
     530x86_64-*-linux* | x86_64-*-helenos)
    531531        extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
    532532        tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm i386/t-crtstuff t-dfprules"
    533533        md_unwind_header=i386/linux-unwind.h
     
    631631        extra_parts="$extra_parts crtfastmath.o"
    632632        tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm"
    633633        ;;
    634 ia64*-*-linux*)
     634ia64*-*-linux* | ia64-*-helenos)
    635635        # Don't use crtbeginT.o from *-*-linux* default.
    636636        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
    637637        tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat ia64/t-eh-ia64 t-libunwind ia64/t-linux"
     
    10381038        tmake_file="$tmake_file t-crtfm"
    10391039        extra_parts="$extra_parts crtfastmath.o"
    10401040        ;;
    1041 sparc64-*-linux*)               # 64-bit SPARC's running GNU/Linux
     1041sparc64-*-linux* | sparc64-*-helenos)   # 64-bit SPARC's running GNU/Linux
    10421042        extra_parts="$extra_parts crtfastmath.o"
    10431043        tmake_file="${tmake_file} t-crtfm sparc/t-linux"
    10441044        if test "${host_address}" = 64; then
Note: See TracBrowser for help on using the repository browser.