source: rtems/contrib/crossrpms/patches/gcc-core-4.1.1-rtems4.8-20070201.diff @ 080c23d

4.104.114.84.9
Last change on this file since 080c23d was 91350690, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 2, 2007 at 3:07:55 PM

Yet another attempt.

  • Property mode set to 100644
File size: 8.3 KB
  • gcc/config/arm/rtems-elf.h

    diff -uNr gcc-4.1.1.orig/gcc/config/arm/rtems-elf.h gcc-4.1.1/gcc/config/arm/rtems-elf.h
    old new  
    2727#define TARGET_OS_CPP_BUILTINS()                \
    2828    do {                                        \
    2929        builtin_define ("__rtems__");           \
     30        builtin_define ("__USE_INIT_FINI__");   \
    3031        builtin_assert ("system=rtems");        \
    3132    } while (0)
    3233
  • gcc/config/bfin/rtems.h

    diff -uNr gcc-4.1.1.orig/gcc/config/bfin/rtems.h gcc-4.1.1/gcc/config/bfin/rtems.h
    old new  
     1/* Definitions for rtems targeting a bfin
     2   Copyright (C) 2006 Free Software Foundation, Inc.
     3   Contributed by Ralf Corsépius (ralf.corsepius@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/* Target OS preprocessor built-ins.  */
     23#define TARGET_OS_CPP_BUILTINS()                \
     24  do                                            \
     25    {                                           \
     26      builtin_define ("__rtems__");             \
     27      builtin_assert ("system=rtems");          \
     28    }                                           \
     29  while (0)
  • gcc/config/c4x/rtems.h

    diff -uNr gcc-4.1.1.orig/gcc/config/c4x/rtems.h gcc-4.1.1/gcc/config/c4x/rtems.h
    old new  
    2424#define TARGET_OS_CPP_BUILTINS()                \
    2525    do {                                        \
    2626        builtin_define ("__rtems__");           \
    27         builtin_define ("__USE_INIT_FINI__");   \
    2827        builtin_assert ("system=rtems");        \
    2928    } while (0)
  • gcc/config/mips/elf.h

    diff -uNr gcc-4.1.1.orig/gcc/config/mips/elf.h gcc-4.1.1/gcc/config/mips/elf.h
    old new  
    4848
    4949#undef  ENDFILE_SPEC
    5050#define ENDFILE_SPEC "crtend%O%s crtn%O%s"
    51 
    52 #define NO_IMPLICIT_EXTERN_C 1
  • gcc/config/mips/t-rtems

    diff -uNr gcc-4.1.1.orig/gcc/config/mips/t-rtems gcc-4.1.1/gcc/config/mips/t-rtems
    old new  
    11# Custom multilibs for RTEMS
    22
    3 MULTILIB_OPTIONS = mips1/mips3/mips32 msoft-float/msingle-float
    4 MULTILIB_DIRNAMES = mips1 mips3 mips32 soft-float single
    5 MULTILIB_MATCHES = msingle-float=m4650
     3# default is mips1 EB hard-float
     4MULTILIB_OPTIONS = mips1/mips3/mips32 EB/EL msoft-float
     5MULTILIB_DIRNAMES = mips1 mips3 mips32 eb el soft-float
     6MULTILIB_MATCHES = EL=mel EB=meb
     7
     8MULTILIB_EXCEPTIONS =
     9
     10# Big endian only
     11MULTILIB_EXCEPTIONS += EL*
     12MULTILIB_EXCEPTIONS += mips32/EL*
     13
     14# Little endian only
     15MULTILIB_EXCEPTIONS += mips3
     16MULTILIB_EXCEPTIONS += mips3/msoft-float
  • gcc/config.gcc

    diff -uNr gcc-4.1.1.orig/gcc/config.gcc gcc-4.1.1/gcc/config.gcc
    old new  
    761761        tmake_file=bfin/t-bfin-elf
    762762        use_collect2=no
    763763        ;;
     764bfin*-rtems*)
     765        tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h"
     766        tmake_file=bfin/t-bfin-elf
     767        use_collect2=no
     768        ;;
    764769bfin*-*)
    765770        tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h"
    766771        tmake_file=bfin/t-bfin
     
    15601565        tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
    15611566        use_fixproto=yes
    15621567        ;;
    1563 mips*-*-rtems*)
     1568mips-*-rtems*)
    15641569        tm_file="elfos.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
    15651570        tmake_file="mips/t-elf t-rtems mips/t-rtems"
    15661571        ;;
  • gcc/Makefile.in

    diff -uNr gcc-4.1.1.orig/gcc/Makefile.in gcc-4.1.1/gcc/Makefile.in
    old new  
    388388CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
    389389
    390390# autoconf sets SYSTEM_HEADER_DIR to one of the above.
    391 SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
     391# Purge it of unneccessary internal relative paths
     392# to directories that might not exist yet.
     393# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
     394SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
    392395
    393396# Control whether to run fixproto and fixincludes.
    394397STMP_FIXPROTO = @STMP_FIXPROTO@
     
    21932196   $(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H) 
    21942197ipa-pure-const.o : ipa-pure-const.c $(CONFIG_H) $(SYSTEM_H) \
    21952198   coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) tree-inline.h langhooks.h \
    2196    pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(C_COMMON_H) \
     2199   pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(C_COMMON_H) $(TARGET_H) \
    21972200   $(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H) 
    21982201ipa-type-escape.o : ipa-type-escape.c $(CONFIG_H) $(SYSTEM_H) \
    21992202   coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) tree-inline.h langhooks.h \
     
    31463149macro_list: s-macro_list; @true
    31473150s-macro_list : $(GCC_PASSES)
    31483151        echo | $(GCC_FOR_TARGET) -E -dM - | \
    3149           sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p ; \
    3150                 s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
     3152          sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
     3153                -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
    31513154          sort -u > tmp-macro_list
    31523155        $(SHELL) $(srcdir)/../move-if-change tmp-macro_list macro_list
    31533156        $(STAMP) s-macro_list
     
    31673170../$(build_subdir)/fixincludes/fixincl: ; @ :
    31683171
    31693172# Build fixed copies of system files.
     3173# Abort if no system headers available, unless building a crosscompiler.
     3174# FIXME: abort unless building --without-headers would be more accurate and less ugly
    31703175stmp-fixinc: gsyslimits.h macro_list \
    31713176  $(build_objdir)/fixincludes/fixincl \
    31723177  $(build_objdir)/fixincludes/fixinc.sh
    31733178        @if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
    31743179          echo The directory that should contain system headers does not exist: >&2 ; \
    31753180          echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
    3176           if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
     3181          tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
     3182          if test "x${SYSTEM_HEADER_DIR}" = "x${tooldir_sysinc}"; \
    31773183          then sleep 1; else exit 1; fi; \
    31783184        fi
    31793185        rm -rf include; mkdir include
     
    36163622install-driver: installdirs xgcc$(exeext)
    36173623        -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
    36183624        -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext)
    3619         -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)
     3625        -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext)
    36203626        -( cd $(DESTDIR)$(bindir) && \
    3621            $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version) )
     3627           $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) )
    36223628        -if [ -f gcc-cross$(exeext) ] ; then \
    36233629          if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
    36243630            rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
  • Makefile.in

    diff -uNr gcc-4.1.1.orig/Makefile.in gcc-4.1.1/Makefile.in
    old new  
    329329# CFLAGS will be just -g.  We want to ensure that TARGET libraries
    330330# (which we know are built with gcc) are built with optimizations so
    331331# prepend -O2 when setting CFLAGS_FOR_TARGET.
    332 CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
     332CFLAGS_FOR_TARGET = $(strip -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
    333333SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
    334 CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
     334CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
    335335LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
    336336LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
    337337LDFLAGS_FOR_TARGET =
Note: See TracBrowser for help on using the repository browser.