source: rtems-tools/tools/4.11/gcc/nios2/nios2-gcc-4.1-rtems-20110818.diff @ e42bad3

4.104.115
Last change on this file since e42bad3 was e42bad3, checked in by Chris Johns <chrisj@…>, on 03/10/13 at 22:28:55

Move current patches in to the repo.

  • Property mode set to 100644
File size: 6.4 KB
  • config-ml.in

    diff -ruN gcc-4.1.orig/config-ml.in gcc-4.1/config-ml.in
    old new  
    892892        fi
    893893    fi
    894894
    895     if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
    896         --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
    897         ${ac_configure_args} ${ml_srcdiroption} ; then
    898       true
    899     else
    900       exit 1
    901     fi
     895    case $(uname) in
     896        MINGW32*)
     897            #
     898            # Work around bugs in MSYS sed or bash. The CC in
     899            # ${ac_configure_args} overrides the CC built above
     900            # I do not know if the CC should have been stripped
     901            # before this script. It seems sed in MSYS does not
     902            # handle:
     903            #    $ echo "'XX=hello' 'YY=world' 'CC=gcc -O3'" | sed -e "s/\'CC=.*\'//g"
     904            #
     905            tmp_IFS=$IFS
     906            IFS="'"
     907            tmp__ac_configure_args=
     908            for o in ${ac_configure_args}
     909            do
     910                o=$(echo $o | sed -e 's/ *$//g')
     911                case $o in
     912                    CC=*) ;;
     913                    '') ;;
     914                    *) tmp__ac_configure_args="${tmp__ac_configure_args} "\'$o\' ;;
     915                esac
     916            done
     917            IFS=$tmp_IFS
     918
     919            if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
     920                --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
     921                ${tmp__ac_configure_args} ${ml_srcdiroption} ; then
     922                true
     923            else
     924                exit 1
     925            fi
     926            ;;
     927        *)
     928            if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
     929                --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
     930                ${ac_configure_args} ${ml_srcdiroption} ; then
     931                true
     932            else
     933                exit 1
     934            fi
     935            ;;
     936    esac
    902937
    903938    cd ${ML_POPDIR}
    904939
  • gcc/DEV-PHASE

    diff -ruN gcc-4.1.orig/gcc/DEV-PHASE gcc-4.1/gcc/DEV-PHASE
    old new  
     1RTEMS (chrisj@rtems.org) NIOS2 gcc-4.1-11.0/newlib-1.19.0
  • gcc/config/nios2/crti.asm

    diff -ruN gcc-4.1.orig/gcc/config/nios2/crti.asm gcc-4.1/gcc/config/nios2/crti.asm
    old new  
    6767        stw     r16, 12(sp)
    6868        stw     fp, 8(sp)
    6969        addi    fp, sp, 8
     70
     71#if !defined(__rtems__)
     72/* FIXME: Disabled for now.
     73 * Causes undefined refs to _GLOBAL_OFFSET_TABLE_
     74 */
    7075        nextpc  r22
    7176#ifdef __nios2_6b__
    72771:      movhi20 r2, %hi20adj(_GLOBAL_OFFSET_TABLE_ - 1b)
     
    7681        addi    r2, r2, %lo(_GLOBAL_OFFSET_TABLE_ - 1b)
    7782#endif
    7883        add     r22, r22, r2
    79        
     84#endif
    8085       
    8186        .section        ".fini"
    8287        .align  2
     
    9499        stw     r16, 12(sp)
    95100        stw     fp, 8(sp)
    96101        addi    fp, sp, 8
     102
     103#if !defined(__rtems__)
     104/* FIXME: Disabled for now.
     105 * Causes undefined refs to _GLOBAL_OFFSET_TABLE_
     106 */
    97107        nextpc  r22
    98108#ifdef __nios2_6b__
    991091:      movhi20 r2, %hi20adj(_GLOBAL_OFFSET_TABLE_ - 1b)
     
    1021121:      movhi   r2, %hiadj(_GLOBAL_OFFSET_TABLE_ - 1b)
    103113        addi    r2, r2, %lo(_GLOBAL_OFFSET_TABLE_ - 1b)
    104114#endif
    105        
    106115        add     r22, r22, r2
    107        
    108 
     116#endif
  • gcc/config/nios2/nios2-protos.h

    diff -ruN gcc-4.1.orig/gcc/config/nios2/nios2-protos.h gcc-4.1/gcc/config/nios2/nios2-protos.h
    old new  
    8888extern int nios2_return_in_memory (tree);
    8989
    9090#endif /* TREE_CODE */
     91
     92rtx nios2_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode);
  • gcc/config/nios2/rtems.h

    diff -ruN gcc-4.1.orig/gcc/config/nios2/rtems.h gcc-4.1/gcc/config/nios2/rtems.h
    old new  
     1/* Definitions for rtems targeting a NIOS2 using ELF.
     2   Copyright (C) 2011 Free Software Foundation, Inc.
     3   Contributed by Chris Johns (chrisj@rtems.org).
     4
     5This file is part of GCC.
     6
     7GCC is free software; you can redistribute it and/or modify
     8it under the terms of the GNU General Public License as published by
     9the Free Software Foundation; either version 2, or (at your option)
     10any later version.
     11
     12GCC is distributed in the hope that it will be useful,
     13but WITHOUT ANY WARRANTY; without even the implied warranty of
     14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15GNU General Public License for more details.
     16
     17You should have received a copy of the GNU General Public License
     18along with GCC; see the file COPYING.  If not, write to
     19the Free Software Foundation, 51 Franklin Street, Fifth Floor,
     20Boston, MA 02110-1301, USA.  */
     21
     22/* Specify predefined symbols in preprocessor.  */
     23
     24#define TARGET_OS_CPP_BUILTINS()        \
     25do {                                    \
     26  builtin_define ("__rtems__");         \
     27  builtin_define ("__USE_INIT_FINI__"); \
     28  builtin_assert ("system=rtems");      \
     29} while (0)
  • gcc/config/nios2/t-rtems

    diff -ruN gcc-4.1.orig/gcc/config/nios2/t-rtems gcc-4.1/gcc/config/nios2/t-rtems
    old new  
     1# Multilibs for NIOS2 RTEMS targets.
     2
     3# Use all.
     4
  • gcc/config.gcc

    diff -ruN gcc-4.1.orig/gcc/config.gcc gcc-4.1/gcc/config.gcc
    old new  
    14471447                thread_file='posix'
    14481448        fi
    14491449        ;;
     1450nios2-*-rtems*)
     1451        tm_file=" elfos.h ${tm_file} dbxelf.h nios2/rtems.h rtems.h"
     1452        tmake_file="${tmake_file} nios2/t-nios2 t-rtems nios2/t-rtems"
     1453        ;;
    14501454nios2*-*-*)
    14511455        tm_file="elfos.h ${tm_file}"
    14521456        tmake_file="${tmake_file} nios2/t-nios2"
  • libiberty/strsignal.c

    diff -ruN gcc-4.1.orig/libiberty/strsignal.c gcc-4.1/libiberty/strsignal.c
    old new  
    404404
    405405#ifndef HAVE_STRSIGNAL
    406406
    407 const char *
     407char *
    408408strsignal (int signo)
    409409{
    410   const char *msg;
     410  char *msg;
    411411  static char buf[32];
    412412
    413413#ifndef HAVE_SYS_SIGLIST
     
    428428    {
    429429      /* In range, but no sys_siglist or no entry at this index. */
    430430      sprintf (buf, "Signal %d", signo);
    431       msg = (const char *) buf;
     431      msg = buf;
    432432    }
    433433  else
    434434    {
    435435      /* In range, and a valid message.  Just return the message. */
    436       msg = (const char *) sys_siglist[signo];
     436      msg = (char *) sys_siglist[signo];
    437437    }
    438438 
    439439  return (msg);
     
    549549#ifndef HAVE_PSIGNAL
    550550
    551551void
    552 psignal (unsigned signo, char *message)
     552psignal (int signo, const char *message)
    553553{
    554554  if (signal_names == NULL)
    555555    {
Note: See TracBrowser for help on using the repository browser.