gcc-2.95.3-arm-010218 from rmk plus gcc-2.95.3-mips-patch1 from maciej (fixes cpp) plus JTL patch for std::string diff -ur gcc-2.95.3/gcc/config/arm/arm.c gcc-2.95.3-jtl1/gcc/config/arm/arm.c --- gcc-2.95.3/gcc/config/arm/arm.c 2001-01-25 14:03:24.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/config/arm/arm.c 2002-04-02 20:06:42.000000000 +0100 @@ -1529,27 +1529,34 @@ return gen_rtx_PLUS (Pmode, base, offset); } else if (GET_CODE (orig) == LABEL_REF) - current_function_uses_pic_offset_table = 1; - - return orig; -} + { + current_function_uses_pic_offset_table = 1; -static rtx pic_rtx; + if (NEED_PLT_GOT) + { + rtx pic_ref, address = gen_reg_rtx (Pmode); + + emit_insn (gen_pic_load_addr (address, orig)); + pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, + address); + emit_move_insn (address, pic_ref); + return address; + } + } -int -is_pic(x) - rtx x; -{ - if (x == pic_rtx) - return 1; - return 0; + return orig; } +/* Generate code to load the PIC register. PROLOGUE is true if + called from arm_expand_prologue (in which case we want the + generated insns at the start of the function); false if called + by an exception receiver that needs the PIC register reloaded + (in which case the insns are just dumped at the current location). */ void -arm_finalize_pic () +arm_finalize_pic (int prologue) { #ifndef AOF_ASSEMBLER - rtx l1, pic_tmp, pic_tmp2, seq; + rtx l1, pic_tmp, pic_tmp2, seq, pic_rtx; rtx global_offset_table; if (current_function_uses_pic_offset_table == 0) @@ -1578,7 +1585,10 @@ seq = gen_sequence (); end_sequence (); - emit_insn_after (seq, get_insns ()); + if (prologue) + emit_insn_after (seq, get_insns ()); + else + emit_insn (seq); /* Need to emit this whether or not we obey regdecls, since setjmp/longjmp can cause life info to screw up. */ @@ -5327,7 +5337,13 @@ if (frame_pointer_needed) live_regs += 4; - if (live_regs) + if (live_regs == 1 && regs_ever_live[LR_REGNUM] + && ! lr_save_eliminated && ! really_return) + { + output_asm_insn (reverse ? "ldr%?%D0\t%|lr, [%|sp}, #4" + : "ldr%?%d0\t%|lr, [%|sp], #4", &operand); + } + else if (live_regs) { if (lr_save_eliminated || ! regs_ever_live[14]) live_regs++; @@ -5446,7 +5462,7 @@ rtx x; length = strlen (name); - alignlength = (length + 1) + 3 & ~3; + alignlength = ((length + 1) + 3) & ~3; ASM_OUTPUT_ASCII (stream, name, length + 1); ASM_OUTPUT_ALIGN (stream, 2); @@ -5838,6 +5854,9 @@ int store_arg_regs = 0; int volatile_func = (optimize > 0 && TREE_THIS_VOLATILE (current_function_decl)); + rtx ip_rtx; + int fp_offset = 0; + rtx insn; /* Naked functions don't have prologues. */ if (arm_naked_function_p (current_function_decl)) @@ -5859,11 +5878,59 @@ live_regs_mask |= 0x4000; } + ip_rtx = gen_rtx_REG (SImode, IP_REGNUM); + if (frame_pointer_needed) { + if (current_function_needs_context) + { + /* The Static chain register is the same as the IP register + used as a scratch register during stack frame creation. + To get around this need to find somewhere to store IP + whilst the frame is being created. We try the following + places in order: + + 1. An unused argument register. + 2. A slot on the stack above the frame. (This only + works if the function is not a varargs function). + + If neither of these places is available, we abort (for now). */ + if (regs_ever_live[3] == 0) + { + insn = gen_rtx_REG (SImode, 3); + insn = gen_rtx_SET (SImode, insn, ip_rtx); + insn = emit_insn (insn); + RTX_FRAME_RELATED_P (insn) = 1; + } + else if (current_function_pretend_args_size == 0) + { + insn = gen_rtx_PRE_DEC (SImode, stack_pointer_rtx); + insn = gen_rtx_MEM (SImode, insn); + insn = gen_rtx_SET (VOIDmode, insn, ip_rtx); + insn = emit_insn (insn); + RTX_FRAME_RELATED_P (insn) = 1; + fp_offset = 4; + } + else + /* FIXME - the way to handle this situation is to allow + the pretend args to be dumped onto the stack, then + reuse r3 to save IP. This would involve moving the + copying os SP into IP until after the pretend args + have been dumped, but this is not too hard. */ + error ("Unable to find a temporary location for static chanin register"); + } + live_regs_mask |= 0xD800; - emit_insn (gen_movsi (gen_rtx_REG (SImode, 12), - stack_pointer_rtx)); + if (fp_offset) + { + insn = gen_rtx_PLUS (SImode, stack_pointer_rtx, GEN_INT (fp_offset)); + insn = gen_rtx_SET (SImode, ip_rtx, insn); + } + else + insn = gen_movsi (ip_rtx, stack_pointer_rtx); + + insn = emit_insn (insn); + RTX_FRAME_RELATED_P (insn) = 1; } if (current_function_pretend_args_size) @@ -5927,9 +5994,31 @@ } if (frame_pointer_needed) - emit_insn (gen_addsi3 (hard_frame_pointer_rtx, gen_rtx_REG (SImode, 12), - (GEN_INT - (-(4 + current_function_pretend_args_size))))); + { + insn = GEN_INT (-(4 + current_function_pretend_args_size + fp_offset)); + insn = emit_insn (gen_addsi3 (hard_frame_pointer_rtx, ip_rtx, insn)); + RTX_FRAME_RELATED_P (insn) = 1; + + if (current_function_needs_context) + { + /* Recover the static chain register. */ + if (regs_ever_live [3] == 0) + { + insn = gen_rtx_REG (SImode, 3); + insn = gen_rtx_SET (SImode, ip_rtx, insn); + insn = emit_insn (insn); + RTX_FRAME_RELATED_P (insn) = 1; + } + else /* if (current_function_pretend_args_size == 0) */ + { + insn = gen_rtx_PLUS (SImode, hard_frame_pointer_rtx, GEN_INT (4)); + insn = gen_rtx_MEM (SImode, insn); + insn = gen_rtx_SET (SImode, ip_rtx, insn); + insn = emit_insn (insn); + RTX_FRAME_RELATED_P (insn) = 1; + } + } + } if (amount != const0_rtx) { Only in gcc-2.95.3-jtl1/gcc/config/arm: arm.c~ diff -ur gcc-2.95.3/gcc/config/arm/arm.h gcc-2.95.3-jtl1/gcc/config/arm/arm.h --- gcc-2.95.3/gcc/config/arm/arm.h 2001-01-25 14:03:26.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/config/arm/arm.h 2002-04-02 20:06:42.000000000 +0100 @@ -601,14 +601,20 @@ (TREE_CODE (EXP) == STRING_CST \ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) +#ifndef STRUCTURE_SIZE_BOUNDARY /* Every structures size must be a multiple of 32 bits. */ /* This is for compatibility with ARMCC. ARM SDT Reference Manual (ARM DUI 0020D) page 2-20 says "Structures are aligned on word boundaries". */ -#ifndef STRUCTURE_SIZE_BOUNDARY -#define STRUCTURE_SIZE_BOUNDARY 32 +/* Setting this to 32 produces more efficient code, but the value set in previous + versions of this toolchain was 8, which produces more compact structures. The + command line option -mstructure_size_boundary= can be used to change this + value. */ +#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary #endif +extern int arm_structure_size_boundary; + /* Used when parsing command line option -mstructure_size_boundary. */ extern const char * structure_size_string; @@ -768,6 +774,9 @@ /* Specify the registers used for certain standard purposes. The values of these macros are register numbers. */ +/* Register which holds return address from a subroutine call. */ +#define LR_REGNUM 14 + /* Define this if the program counter is overloaded on a register. */ #define PC_REGNUM 15 @@ -777,6 +786,9 @@ /* Base register for access to local variables of the function. */ #define FRAME_POINTER_REGNUM 25 +/* Scratch register - used in all kinds of places, eg trampolines. */ +#define IP_REGNUM 12 + /* Define this to be where the real frame pointer is if it is not possible to work out the offset between the frame pointer and the automatic variables until after register allocation has taken place. FRAME_POINTER_REGNUM @@ -798,7 +810,7 @@ /* The native (Norcroft) Pascal compiler for the ARM passes the static chain as an invisible last argument (possible since varargs don't exist in Pascal), so the following is not true. */ -#define STATIC_CHAIN_REGNUM 8 +#define STATIC_CHAIN_REGNUM 12 /* Register in which address to store a structure value is passed to a function. */ @@ -1248,7 +1260,12 @@ { \ int volatile_func = arm_volatile_func (); \ if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\ - (OFFSET) = 0; \ + { \ + if (! current_function_needs_context || ! frame_pointer_needed) \ + (OFFSET) = 0; \ + else \ + (OFFSET) = 4; \ + } \ else if ((FROM) == FRAME_POINTER_REGNUM \ && (TO) == STACK_POINTER_REGNUM) \ (OFFSET) = (current_function_outgoing_args_size \ @@ -1379,8 +1396,10 @@ On the ARM, allow any integer (invalid ones are removed later by insn patterns), nice doubles and symbol_refs which refer to the function's - constant pool XXX. */ -#define LEGITIMATE_CONSTANT_P(X) (! label_mentioned_p (X)) + constant pool XXX. + + When generating PIC code, allow anything. */ +#define LEGITIMATE_CONSTANT_P(X) (flag_pic || ! label_mentioned_p (X)) /* Symbols in the text segment can be accessed without indirecting via the constant pool; it may take an extra binary operation, but this is still @@ -1496,9 +1515,8 @@ && INTVAL (op) <= 31) \ goto LABEL; \ } \ - /* NASTY: Since this limits the addressing of unsigned byte loads */ \ range = ((MODE) == HImode || (MODE) == QImode) \ - ? (arm_arch4 ? 256 : 4095) : 4096; \ + ? (((MODE) == HImode && arm_arch4) ? 256 : 4095) : 4096; \ if (code == CONST_INT && INTVAL (INDEX) < range \ && INTVAL (INDEX) > -range) \ goto LABEL; \ @@ -1812,14 +1830,15 @@ data addresses in memory. */ #define PIC_OFFSET_TABLE_REGNUM arm_pic_register -#define FINALIZE_PIC arm_finalize_pic () +#define FINALIZE_PIC arm_finalize_pic (1) -/* We can't directly access anything that contains a symbol, +/* We can't directly access anything that contains a symbol or label, nor can we indirect via the constant pool. */ #define LEGITIMATE_PIC_OPERAND_P(X) \ - (! symbol_mentioned_p (X) \ + (! symbol_mentioned_p (X) && ! label_mentioned_p (X) \ && (! CONSTANT_POOL_ADDRESS_P (X) \ - || ! symbol_mentioned_p (get_pool_constant (X)))) + || (! symbol_mentioned_p (get_pool_constant (X))) \ + && (! label_mentioned_p (get_pool_constant (X))))) /* We need to know when we are making a constant pool; this determines whether data needs to be in the GOT or can be referenced via a GOT @@ -2046,17 +2065,9 @@ else output_addr_const(STREAM, X); \ } -/* Handles PIC addr specially */ #define OUTPUT_INT_ADDR_CONST(STREAM,X) \ { \ - if (flag_pic && GET_CODE(X) == CONST && is_pic(X)) \ - { \ - output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 0), 0)); \ - fputs(" - (", STREAM); \ - output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 1), 0)); \ - fputs(")", STREAM); \ - } \ - else output_addr_const(STREAM, X); \ + output_addr_const(STREAM, X); \ \ /* Mark symbols as position independent. We only do this in the \ .text segment, not in the .data segment. */ \ @@ -2170,8 +2181,7 @@ int arm_return_in_memory PROTO ((Tree)); int legitimate_pic_operand_p PROTO ((Rtx)); Rtx legitimize_pic_address PROTO ((Rtx, Mmode, Rtx)); -int is_pic PROTO ((Rtx)); -void arm_finalize_pic PROTO ((void)); +void arm_finalize_pic PROTO ((int)); int arm_rtx_costs RTX_CODE_PROTO ((Rtx, Rcode)); int arm_adjust_cost PROTO ((Rtx, Rtx, Rtx, int)); int const_double_rtx_ok_for_fpu PROTO ((Rtx)); Only in gcc-2.95.3-jtl1/gcc/config/arm: arm.h~ diff -ur gcc-2.95.3/gcc/config/arm/arm.md gcc-2.95.3-jtl1/gcc/config/arm/arm.md --- gcc-2.95.3/gcc/config/arm/arm.md 2001-01-25 14:03:27.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/config/arm/arm.md 2002-04-02 20:06:42.000000000 +0100 @@ -2629,7 +2629,8 @@ : preserve_subexpressions_p ())); DONE; } - if (CONSTANT_P (operands[1]) && flag_pic) + if ((CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1]) + || label_mentioned_p (operands[1])) && flag_pic) operands[1] = legitimize_pic_address (operands[1], SImode, ((reload_in_progress || reload_completed) @@ -2721,6 +2722,15 @@ return \"add%?\\t%0, %|pc, %0\"; ") +(define_expand "builtin_setjmp_receiver" + [(label_ref (match_operand 0 "" ""))] + "flag_pic" + " +{ + arm_finalize_pic (0); + DONE; +}") + ;; If copying one reg to another we can set the condition codes according to ;; its value. Such a move is common after a return from subroutine and the ;; result is being tested against zero. @@ -6184,15 +6194,20 @@ abort (); return \"\"; } - strcpy (pattern, \"stmfd\\t%m0!, {%1\"); - for (i = 1; i < XVECLEN (operands[2], 0); i++) + if (XVECLEN (operands[2], 0) > 1) { - strcat (pattern, \", %|\"); - strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i), + strcpy (pattern, \"stmfd\\t%m0!, {%1\"); + for (i = 1; i < XVECLEN (operands[2], 0); i++) + { + strcat (pattern, \", %|\"); + strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i), 0))]); + } + strcat (pattern, \"}\"); + output_asm_insn (pattern, operands); } - strcat (pattern, \"}\"); - output_asm_insn (pattern, operands); + else + output_asm_insn (\"str\\t%1, [%m0, #-4]!\", operands); return \"\"; }" [(set_attr "type" "store4")]) Only in gcc-2.95.3-jtl1/gcc/config/arm: arm.md~ diff -ur gcc-2.95.3/gcc/config/arm/elf.h gcc-2.95.3-jtl1/gcc/config/arm/elf.h --- gcc-2.95.3/gcc/config/arm/elf.h 1999-05-31 09:21:53.000000000 +0100 +++ gcc-2.95.3-jtl1/gcc/config/arm/elf.h 2002-04-02 20:06:42.000000000 +0100 @@ -167,15 +167,6 @@ #define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" } #endif -/* Setting this to 32 produces more efficient code, but the value set in previous - versions of this toolchain was 8, which produces more compact structures. The - command line option -mstructure_size_boundary= can be used to change this - value. */ -#undef STRUCTURE_SIZE_BOUNDARY -#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary - -extern int arm_structure_size_boundary; - /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS is a valid machine specific attribute for DECL. The attributes in ATTRIBUTES have previously been assigned to DECL. */ diff -ur gcc-2.95.3/gcc/config/arm/linux-gas.h gcc-2.95.3-jtl1/gcc/config/arm/linux-gas.h --- gcc-2.95.3/gcc/config/arm/linux-gas.h 1999-02-22 16:47:57.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/config/arm/linux-gas.h 2002-04-02 20:06:42.000000000 +0100 @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. ARM Linux-based GNU systems version. - Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Russell King . This file is part of GNU CC. @@ -79,5 +79,7 @@ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ register unsigned long _end __asm ("a2") = (unsigned long) (END); \ register unsigned long _flg __asm ("a3") = 0; \ - __asm __volatile ("swi 0x9f0002"); \ + __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ + : "=r" (_beg) \ + : "0" (_beg), "r" (_end), "r" (_flg)); \ } diff -ur gcc-2.95.3/gcc/config/i386/linux.h gcc-2.95.3-jtl1/gcc/config/i386/linux.h --- gcc-2.95.3/gcc/config/i386/linux.h 1999-04-08 01:32:13.000000000 +0100 +++ gcc-2.95.3-jtl1/gcc/config/i386/linux.h 2002-04-02 20:06:54.000000000 +0100 @@ -234,3 +234,21 @@ } \ } while (0) #endif + +#if defined(__PIC__) && defined (USE_GNULIBC_1) +/* This is a kludge. The i386 GNU/Linux dynamic linker needs ___brk_addr, + __environ and atexit (). We have to make sure they are in the .dynsym + section. We accomplish it by making a dummy call here. This + code is never reached. */ + +#define CRT_END_INIT_DUMMY \ + do \ + { \ + extern void *___brk_addr; \ + extern char **__environ; \ + \ + ___brk_addr = __environ; \ + atexit (0); \ + } \ + while (0) +#endif Only in gcc-2.95.3-jtl1/gcc/config/i386: linux.h~ diff -ur gcc-2.95.3/gcc/crtstuff.c gcc-2.95.3-jtl1/gcc/crtstuff.c --- gcc-2.95.3/gcc/crtstuff.c 1999-03-23 00:43:51.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/crtstuff.c 2002-04-02 20:06:54.000000000 +0100 @@ -380,19 +380,8 @@ #endif asm (TEXT_SECTION_ASM_OP); -/* This is a kludge. The i386 GNU/Linux dynamic linker needs ___brk_addr, - __environ and atexit (). We have to make sure they are in the .dynsym - section. We accomplish it by making a dummy call here. This - code is never reached. */ - -#if defined(__linux__) && defined(__PIC__) && defined(__i386__) - { - extern void *___brk_addr; - extern char **__environ; - - ___brk_addr = __environ; - atexit (); - } +#ifdef CRT_END_INIT_DUMMY + CRT_END_INIT_DUMMY; #endif } diff -ur gcc-2.95.3/gcc/final.c gcc-2.95.3-jtl1/gcc/final.c --- gcc-2.95.3/gcc/final.c 2001-03-12 12:07:59.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/final.c 2002-04-02 20:06:42.000000000 +0100 @@ -3652,8 +3652,9 @@ output_addr_const (file, XEXP (x, 0)); fprintf (file, "-"); - if (GET_CODE (XEXP (x, 1)) == CONST_INT - && INTVAL (XEXP (x, 1)) < 0) + if ((GET_CODE (XEXP (x, 1)) == CONST_INT + && INTVAL (XEXP (x, 1)) < 0) + || GET_CODE (XEXP (x, 1)) != CONST_INT) { fprintf (file, ASM_OPEN_PAREN); output_addr_const (file, XEXP (x, 1)); diff -ur gcc-2.95.3/gcc/function.c gcc-2.95.3-jtl1/gcc/function.c --- gcc-2.95.3/gcc/function.c 2001-01-25 14:03:15.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/function.c 2002-04-02 20:06:42.000000000 +0100 @@ -3053,6 +3053,105 @@ extracted by usage MEM with narrower mode. */ static rtx purge_addressof_replacements; +/* Return 1 if X and Y are identical-looking rtx's. + This is the Lisp function EQUAL for rtx arguments. */ + +int +rtx_equal_for_addressof_p (x, y) + rtx x, y; +{ + register int i; + register int j; + register enum rtx_code code; + register char *fmt; + + if (x == y) + return 1; + if (x == 0 || y == 0) + return 0; + + code = GET_CODE (x); + /* Rtx's of different codes cannot be equal. */ + if (code != GET_CODE (y)) + return 0; + + /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent. + (REG:SI x) and (REG:HI x) are NOT equivalent. + But (MEM:SI x) and (MEM:HI x) are equivalent for our purposes. */ + + if (code != MEM && (GET_MODE (x) != GET_MODE (y))) + return 0; + + /* REG, LABEL_REF, and SYMBOL_REF can be compared nonrecursively. */ + + if (code == REG) + return REGNO (x) == REGNO (y); + else if (code == LABEL_REF) + return XEXP (x, 0) == XEXP (y, 0); + else if (code == SYMBOL_REF) + return XSTR (x, 0) == XSTR (y, 0); + else if (code == SCRATCH || code == CONST_DOUBLE) + return 0; + + /* Compare the elements. If any pair of corresponding elements + fail to match, return 0 for the whole things. */ + + fmt = GET_RTX_FORMAT (code); + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + { + switch (fmt[i]) + { + case 'w': + if (XWINT (x, i) != XWINT (y, i)) + return 0; + break; + + case 'n': + case 'i': + if (XINT (x, i) != XINT (y, i)) + return 0; + break; + + case 'V': + case 'E': + /* Two vectors must have the same length. */ + if (XVECLEN (x, i) != XVECLEN (y, i)) + return 0; + + /* And the corresponding elements must match. */ + for (j = 0; j < XVECLEN (x, i); j++) + if (rtx_equal_p (XVECEXP (x, i, j), XVECEXP (y, i, j)) == 0) + return 0; + break; + + case 'e': + if (rtx_equal_p (XEXP (x, i), XEXP (y, i)) == 0) + return 0; + break; + + case 'S': + case 's': + if (strcmp (XSTR (x, i), XSTR (y, i))) + return 0; + break; + + case 'u': + /* These are just backpointers, so they don't matter. */ + break; + + case '0': + break; + + /* It is believed that rtx's at this level will never + contain anything but integers and other rtx's, + except for within LABEL_REFs and SYMBOL_REFs. */ + default: + abort (); + } + } + return 1; +} + /* Helper function for purge_addressof. See if the rtx expression at *LOC in INSN needs to be changed. If FORCE, always put any ADDRESSOFs into the stack. */ @@ -3133,7 +3232,7 @@ for (tem = purge_bitfield_addressof_replacements; tem != NULL_RTX; tem = XEXP (XEXP (tem, 1), 1)) - if (rtx_equal_p (x, XEXP (tem, 0))) + if (rtx_equal_for_addressof_p (x, XEXP (tem, 0))) { *loc = XEXP (XEXP (tem, 1), 0); return; @@ -3143,7 +3242,7 @@ for (tem = purge_addressof_replacements; tem != NULL_RTX; tem = XEXP (XEXP (tem, 1), 1)) - if (rtx_equal_p (XEXP (x, 0), XEXP (tem, 0))) + if (rtx_equal_for_addressof_p (XEXP (x, 0), XEXP (tem, 0))) { rtx z = XEXP (XEXP (tem, 1), 0); Only in gcc-2.95.3-jtl1/gcc: function.c~ diff -ur gcc-2.95.3/gcc/jump.c gcc-2.95.3-jtl1/gcc/jump.c --- gcc-2.95.3/gcc/jump.c 1999-10-21 07:24:03.000000000 +0100 +++ gcc-2.95.3-jtl1/gcc/jump.c 2002-04-02 20:06:42.000000000 +0100 @@ -115,7 +115,7 @@ static rtx delete_unreferenced_labels PROTO((rtx)); static void delete_noop_moves PROTO((rtx)); static int calculate_can_reach_end PROTO((rtx, int, int)); -static int duplicate_loop_exit_test PROTO((rtx)); +static int duplicate_loop_exit_test PROTO((rtx, int)); static void find_cross_jump PROTO((rtx, rtx, int, rtx *, rtx *)); static void do_cross_jump PROTO((rtx, rtx, rtx)); static int jump_back_p PROTO((rtx, rtx)); @@ -338,7 +338,7 @@ && simplejump_p (temp1)) { temp = PREV_INSN (insn); - if (duplicate_loop_exit_test (insn)) + if (duplicate_loop_exit_test (insn, after_regscan)) { changed = 1; next = NEXT_INSN (temp); @@ -2548,8 +2548,9 @@ values of regno_first_uid and regno_last_uid. */ static int -duplicate_loop_exit_test (loop_start) +duplicate_loop_exit_test (loop_start, after_regscan) rtx loop_start; + int after_regscan; { rtx insn, set, reg, p, link; rtx copy = 0, first_copy = 0; @@ -2663,6 +2664,9 @@ } } + if (after_regscan) + reg_scan_update (exitcode, lastexit, max_reg); + /* Now copy each insn. */ for (insn = exitcode; insn != lastexit; insn = NEXT_INSN (insn)) { Only in gcc-2.95.3-jtl1/gcc: jump.c~ diff -ur gcc-2.95.3/gcc/reload1.c gcc-2.95.3-jtl1/gcc/reload1.c --- gcc-2.95.3/gcc/reload1.c 2001-01-25 14:03:21.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/reload1.c 2002-04-02 20:06:42.000000000 +0100 @@ -5286,7 +5286,7 @@ if (! reload_in[i] || ! rtx_equal_p (reload_in[i], value) || reload_out[i] || out) { - int time2; + int j, time2; switch (reload_when_needed[i]) { case RELOAD_FOR_OTHER_ADDRESS: @@ -5385,7 +5385,8 @@ } if ((time1 >= time2 && (! reload_in[i] || reload_out[i] - || ! rtx_equal_p (reload_in[i], value))) + || ! rtx_equal_p (reload_in[i], value) + || out)) || (out && reload_out_reg[reloadnum] && time2 >= MAX_RECOG_OPERANDS * 4 + 3)) return 0; Only in gcc-2.95.3-jtl1/gcc: reload1.c~ Only in gcc-2.95.3-jtl1/gcc: reload1.c.rej diff -ur gcc-2.95.3/gcc/varasm.c gcc-2.95.3-jtl1/gcc/varasm.c --- gcc-2.95.3/gcc/varasm.c 2001-02-19 14:02:02.000000000 +0000 +++ gcc-2.95.3-jtl1/gcc/varasm.c 2002-04-02 20:06:42.000000000 +0100 @@ -3286,7 +3286,10 @@ value->un.addr.offset = - INTVAL (XEXP (x, 1)); } else - abort (); + { + value->un.addr.base = x; + value->un.addr.offset = 0; + } break; default: Only in gcc-2.95.3-jtl1/gcc: varasm.c~ diff -u --recursive --new-file egcs-19981109.macro/gcc/ch/chill.texi egcs-19981109/gcc/ch/chill.texi --- egcs-19981109.macro/gcc/ch/chill.texi Thu Aug 27 20:51:37 1998 +++ egcs-19981109/gcc/ch/chill.texi Thu Nov 12 21:22:11 1998 @@ -6,7 +6,7 @@ @ifinfo @format START-INFO-DIR-ENTRY -* Chill:: Chill compiler +* Chill: (chill). Chill compiler END-INFO-DIR-ENTRY @end format @end ifinfo diff -u --recursive --new-file gcc-2.95.1.macro/gcc/ch/Make-lang.in gcc-2.95.1/gcc/ch/Make-lang.in --- gcc-2.95.1.macro/gcc/ch/Make-lang.in Fri Jun 25 08:26:19 1999 +++ gcc-2.95.1/gcc/ch/Make-lang.in Tue Oct 5 10:27:11 1999 @@ -131,11 +131,11 @@ if [ -f chill.install ] ; then \ if [ -f gcc-cross$(exeext) ]; then \ rm -f $(bindir)/$(CHILL_CROSS_NAME); \ - $(INSTALL_PROGRAM) chill.install $(bindir)/$(CHILL_CROSS_NAME); \ + $(INSTALL_SCRIPT) chill.install $(bindir)/$(CHILL_CROSS_NAME); \ chmod a+x $(bindir)/$(CHILL_CROSS_NAME); \ else \ rm -f $(bindir)/$(CHILL_INSTALL_NAME); \ - $(INSTALL_PROGRAM) chill.install $(bindir)/$(CHILL_INSTALL_NAME); \ + $(INSTALL_SCRIPT) chill.install $(bindir)/$(CHILL_INSTALL_NAME); \ chmod a+x $(bindir)/$(CHILL_INSTALL_NAME); \ fi ; \ fi ; \ diff -u --recursive --new-file gcc-2.95.1.macro/config/mt-linux gcc-2.95.1/config/mt-linux --- gcc-2.95.1.macro/config/mt-linux Sun Aug 9 23:17:03 1998 +++ gcc-2.95.1/config/mt-linux Wed Oct 6 02:09:51 1999 @@ -1,2 +1,2 @@ # When using glibc 2 on Linux we must always use vtable thunks. -CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -fvtable-thunks -D_GNU_SOURCE +T_CXXFLAGS = -fvtable-thunks -D_GNU_SOURCE diff -u --recursive --new-file gcc-2.95.1.macro/config/mt-ospace gcc-2.95.1/config/mt-ospace --- gcc-2.95.1.macro/config/mt-ospace Tue Apr 28 04:33:46 1998 +++ gcc-2.95.1/config/mt-ospace Wed Oct 6 02:11:35 1999 @@ -1,3 +1,3 @@ # Build libraries optimizing for space, not speed. - CFLAGS_FOR_TARGET = -g -Os - CXXFLAGS_FOR_TARGET = -g -Os +T_CFLAGS = -g -Os +T_CXXFLAGS = -g -Os diff -u --recursive --new-file gcc-2.95.1.macro/configure gcc-2.95.1/configure --- gcc-2.95.1.macro/configure Mon Aug 16 09:16:39 1999 +++ gcc-2.95.1/configure Wed Oct 6 02:04:42 1999 @@ -824,6 +824,16 @@ rm -f Makefile.cc fi +if [ -z "${CFLAGS_FOR_TARGET}" ] && [ -r Makefile ]; then + sed -n -e ':loop +/\\$/ N +s/\\\n//g +t loop +/^CFLAGS_FOR_TARGET[ ]*=/ s/CFLAGS_FOR_TARGET[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc + CFLAGS_FOR_TARGET=`tail -1 Makefile.cc` + rm -f Makefile.cc +fi + if [ -z "${CXX}" ] && [ -r Makefile ]; then sed -n -e ':loop /\\$/ N @@ -844,6 +854,16 @@ rm -f Makefile.cc fi +if [ -z "${CXXFLAGS_FOR_TARGET}" ] && [ -r Makefile ]; then + sed -n -e ':loop +/\\$/ N +s/\\\n//g +t loop +/^CXXFLAGS_FOR_TARGET[ ]*=/ s/CXXFLAGS_FOR_TARGET[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc + CXXFLAGS_FOR_TARGET=`tail -1 Makefile.cc` + rm -f Makefile.cc +fi + # Generate a default definition for YACC. This is used if the makefile can't # locate bison or byacc in objdir. @@ -935,8 +955,10 @@ BISON=${BISON-bison} CC=${CC-${host_alias}-gcc} CFLAGS=${CFLAGS-"-g -O2"} + CFLAGS_FOR_TARGET=${CFLAGS_FOR_TARGET-'$(CFLAGS)'} CXX=${CXX-${host_alias}-c++} CXXFLAGS=${CXXFLAGS-"-g -O2"} + CXXFLAGS_FOR_TARGET=${CXXFLAGS_FOR_TARGET-'$(CXXFLAGS)'} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc} CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} @@ -1048,13 +1070,17 @@ CXX=${CXX-"c++"} CFLAGS=${CFLAGS-"-g"} + CFLAGS_FOR_TARGET=${CFLAGS_FOR_TARGET-'$(CFLAGS)'} CXXFLAGS=${CXXFLAGS-"-g -O2"} + CXXFLAGS_FOR_TARGET=${CXXFLAGS_FOR_TARGET-'$(CXXFLAGS)'} fi export CC export CXX export CFLAGS +export CFLAGS_FOR_TARGET export CXXFLAGS +export CXXFLAGS_FOR_TARGET # FIXME: This should be in configure.in, not configure case "$host" in @@ -1374,33 +1400,59 @@ -e "s|^oldincludedir[ ]*=.*$|oldincludedir = ${oldincludedir}|" \ -e "s|^infodir[ ]*=.*$|infodir = ${infodir}|" \ -e "s|^mandir[ ]*=.*$|mandir = ${mandir}|" \ - -e "/^CC[ ]*=/{ + -e "1,/^CC[ ]*=/{ + /^CC[ ]*=/{ :loop1 /\\\\$/ N s/\\\\\\n//g t loop1 s%^CC[ ]*=.*$%CC = ${CC}% + } }" \ - -e "/^CXX[ ]*=/{ + -e "1,/^CXX[ ]*=/{ + /^CXX[ ]*=/{ :loop2 /\\\\$/ N s/\\\\\\n//g t loop2 s%^CXX[ ]*=.*$%CXX = ${CXX}% + } }" \ - -e "/^CFLAGS[ ]*=/{ + -e "1,/^CFLAGS[ ]*=/{ + /^CFLAGS[ ]*=/{ :loop3 /\\\\$/ N s/\\\\\\n//g t loop3 - s%^CFLAGS[ ]*=.*$%CFLAGS = ${CFLAGS}% + s%^CFLAGS[ ]*=.*$%CFLAGS = ${CFLAGS} "'$(X_CFLAGS)'"% + } }" \ - -e "/^CXXFLAGS[ ]*=/{ + -e "1,/^CFLAGS_FOR_TARGET[ ]*=/{ + /^CFLAGS_FOR_TARGET[ ]*=/{ :loop4 /\\\\$/ N s/\\\\\\n//g t loop4 - s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS}% + s%^CFLAGS_FOR_TARGET[ ]*=.*$%CFLAGS_FOR_TARGET = ${CFLAGS_FOR_TARGET} "'$(T_CFLAGS)'"% + } + }" \ + -e "1,/^CXXFLAGS[ ]*=/{ + /^CXXFLAGS[ ]*=/{ + :loop5 + /\\\\$/ N + s/\\\\\\n//g + t loop5 + s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS} "'$(X_CXXFLAGS)'"% + } + }" \ + -e "1,/^CXXFLAGS_FOR_TARGET[ ]*=/{ + /^CXXFLAGS_FOR_TARGET[ ]*=/{ + :loop6 + /\\\\$/ N + s/\\\\\\n//g + t loop6 + s%^CXXFLAGS_FOR_TARGET[ ]*=.*$%CXXFLAGS_FOR_TARGET = ${CXXFLAGS_FOR_TARGET} "'$(T_CXXFLAGS)'"% + } }" \ -e "s|^SHELL[ ]*=.*$|SHELL = ${config_shell}|" \ -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" \ diff -u --recursive --new-file gcc-2.95.1.macro/gcc/Makefile.in gcc-2.95.1/gcc/Makefile.in --- gcc-2.95.1.macro/gcc/Makefile.in Fri Aug 13 07:46:55 1999 +++ gcc-2.95.1/gcc/Makefile.in Tue Oct 5 23:40:40 1999 @@ -70,6 +70,7 @@ TCFLAGS = # -W -Wall warnings are disabled for releases. CFLAGS = -g +CFLAGS_FOR_TARGET = $(CFLAGS) BOOT_CFLAGS = -O2 $(CFLAGS) #WARN_CFLAGS = -W -Wall # These exists to be overridden by the x-* and t-* files, respectively. @@ -172,7 +173,7 @@ # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. # It omits XCFLAGS, and specifies -B./. # It also specifies -I./include to find, e.g., stddef.h. -GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS) +GCC_CFLAGS=$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_TARGET) -I./include $(TCFLAGS) # Sed command to transform gcc to installed name. Overwritten by configure. program_transform_name = @program_transform_name@ @@ -550,7 +551,7 @@ # This is the variable actually used when we compile. # If you change this line, you probably also need to change the definition # of HOST_CFLAGS in build-make to match. -ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \ +ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) $(XCFLAGS) \ @DEFS@ # Likewise. @@ -623,6 +624,7 @@ "BISON=$(BISON)" \ "BISONFLAGS=$(BISONFLAGS)" \ "CFLAGS=$(CFLAGS)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ "CLIB=$(CLIB)" \ "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ "LDFLAGS=$(LDFLAGS)" \ diff -u --recursive --new-file gcc-2.95.1.macro/gcc/ch/Makefile.in gcc-2.95.1/gcc/ch/Makefile.in --- gcc-2.95.1.macro/gcc/ch/Makefile.in Wed Mar 31 07:47:58 1999 +++ gcc-2.95.1/gcc/ch/Makefile.in Tue Oct 5 23:42:01 1999 @@ -47,6 +47,7 @@ # XCFLAGS is used for most compilations but not when using the GCC just built. XCFLAGS = CFLAGS = -g +CFLAGS_FOR_TARGET = $(CFLAGS) BOOT_CFLAGS = -O $(CFLAGS) # These exists to be overridden by the x-* and t-* files, respectively. X_CFLAGS = @@ -74,7 +75,7 @@ # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. # It omits XCFLAGS, and specifies -B./. # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler. -GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) +GCC_CFLAGS=$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_TARGET) # Tools to use when building a cross-compiler. # These are used because `configure' appends `cross-make' @@ -133,7 +134,7 @@ INTERNAL_CFLAGS = $(CROSS) -DIN_GCC # This is the variable actually used when we compile. -ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) +ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) $(XCFLAGS) # Likewise. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) @@ -166,6 +167,7 @@ "BISONFLAGS=$(BISONFLAGS)" \ "CC=$(CC)" \ "CFLAGS=$(CFLAGS)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \ "LDFLAGS=$(LDFLAGS)" \ "LEX=$(LEX)" \ diff -u --recursive --new-file gcc-2.95.1.macro/gcc/cp/Make-lang.in gcc-2.95.1/gcc/cp/Make-lang.in --- gcc-2.95.1.macro/gcc/cp/Make-lang.in Mon Apr 26 23:50:36 1999 +++ gcc-2.95.1/gcc/cp/Make-lang.in Wed Oct 6 00:28:01 1999 @@ -40,7 +40,8 @@ CXX_FLAGS_TO_PASS = \ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ "CXXFLAGS=$(CXXFLAGS)" \ - "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" # Actual names to use when installing a native compiler. CXX_INSTALL_NAME = `t='$(program_transform_name)'; echo c++ | sed $$t` @@ -135,40 +136,40 @@ # C++ language-support library pieces for libgcc. tinfo.o: cc1plus$(exeext) $(srcdir)/cp/tinfo.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/tinfo.cc tinfo2.o: cc1plus$(exeext) $(srcdir)/cp/tinfo2.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/tinfo2.cc exception.o: cc1plus$(exeext) $(srcdir)/cp/exception.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c -fexceptions $(srcdir)/cp/exception.cc new.o: cc1plus$(exeext) $(srcdir)/cp/new.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new.cc opnew.o: cc1plus$(exeext) $(srcdir)/cp/new1.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new1.cc -DL_op_new -o opnew.o opnewnt.o: cc1plus$(exeext) $(srcdir)/cp/new1.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new1.cc -DL_op_newnt -o opnewnt.o opvnew.o: cc1plus$(exeext) $(srcdir)/cp/new2.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new2.cc -DL_op_vnew -o opvnew.o opvnewnt.o: cc1plus$(exeext) $(srcdir)/cp/new2.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new2.cc -DL_op_vnewnt -o opvnewnt.o opdel.o: cc1plus$(exeext) $(srcdir)/cp/new2.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new2.cc -DL_op_delete -o opdel.o opdelnt.o: cc1plus$(exeext) $(srcdir)/cp/new2.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new2.cc -DL_op_delnt -o opdelnt.o opvdel.o: cc1plus$(exeext) $(srcdir)/cp/new2.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new2.cc -DL_op_vdel -o opvdel.o opvdelnt.o: cc1plus$(exeext) $(srcdir)/cp/new2.cc - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS) $(INCLUDES) \ + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(CXXFLAGS_FOR_TARGET) $(INCLUDES) \ -c $(srcdir)/cp/new2.cc -DL_op_vdelnt -o opvdelnt.o # We want to update cplib2.txt if any of the source files change... diff -u --recursive --new-file gcc-2.95.1.macro/gcc/cp/Makefile.in gcc-2.95.1/gcc/cp/Makefile.in --- gcc-2.95.1.macro/gcc/cp/Makefile.in Sun Jul 25 21:27:38 1999 +++ gcc-2.95.1/gcc/cp/Makefile.in Tue Oct 5 23:10:00 1999 @@ -50,6 +50,7 @@ # XCFLAGS is used for most compilations but not when using the GCC just built. XCFLAGS = CFLAGS = -g +CFLAGS_FOR_TARGET = $(CFLAGS) BOOT_CFLAGS = -O $(CFLAGS) # These exists to be overridden by the x-* and t-* files, respectively. X_CFLAGS = @@ -81,7 +82,7 @@ # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. # It omits XCFLAGS, and specifies -B./. # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler. -GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) +GCC_CFLAGS=$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_TARGET) # Tools to use when building a cross-compiler. # These are used because `configure' appends `cross-make' @@ -147,7 +148,7 @@ INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@ # This is the variable actually used when we compile. -ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) +ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) $(XCFLAGS) # Likewise. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) diff -u --recursive --new-file gcc-2.95.1.macro/gcc/f/Makefile.in gcc-2.95.1/gcc/f/Makefile.in --- gcc-2.95.1.macro/gcc/f/Makefile.in Wed Dec 16 21:16:32 1998 +++ gcc-2.95.1/gcc/f/Makefile.in Tue Oct 5 23:13:20 1999 @@ -46,6 +46,7 @@ # XCFLAGS is used for most compilations but not when using the GCC just built. XCFLAGS = CFLAGS = -g +CFLAGS_FOR_TARGET = $(CFLAGS) BOOT_CFLAGS = -O $(CFLAGS) # These exists to be overridden by the x-* and t-* files, respectively. X_CFLAGS = @@ -77,7 +78,7 @@ # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. # It omits XCFLAGS, and specifies -B./. # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler. -GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) +GCC_CFLAGS=$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_TARGET) # Tools to use when building a cross-compiler. # These are used because `configure' appends `cross-make' @@ -129,7 +130,7 @@ INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@ # This is the variable actually used when we compile. -ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) -W -Wall +ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) $(XCFLAGS) -W -Wall # Likewise. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) diff -u --recursive --new-file gcc-2.95.1.macro/gcc/java/Makefile.in gcc-2.95.1/gcc/java/Makefile.in --- gcc-2.95.1.macro/gcc/java/Makefile.in Fri Apr 30 17:55:55 1999 +++ gcc-2.95.1/gcc/java/Makefile.in Tue Oct 5 23:14:34 1999 @@ -50,6 +50,7 @@ # XCFLAGS is used for most compilations but not when using the GCC just built. XCFLAGS = CFLAGS = -g +CFLAGS_FOR_TARGET = $(CFLAGS) BOOT_CFLAGS = -O $(CFLAGS) # These exists to be overridden by the x-* and t-* files, respectively. X_CFLAGS = @@ -80,7 +81,7 @@ # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET. # It omits XCFLAGS, and specifies -B./. # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler. -GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) +GCC_CFLAGS=$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_TARGET) # Tools to use when building a cross-compiler. # These are used because `configure' appends `cross-make' @@ -143,7 +144,7 @@ INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@ # This is the variable actually used when we compile. -ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) +ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) $(XCFLAGS) # Likewise. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) diff -up --recursive --new-file gcc-2.95.3.macro/gcc/Makefile.in gcc-2.95.3/gcc/Makefile.in --- gcc-2.95.3.macro/gcc/Makefile.in Thu Jan 25 14:02:58 2001 +++ gcc-2.95.3/gcc/Makefile.in Sat Mar 24 12:23:19 2001 @@ -485,6 +485,7 @@ GCOV_INSTALL_NAME = `t='$(program_transf # Actual name to use when installing a cross-compiler. GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t` +CPP_CROSS_NAME = `t='$(program_transform_cross_name)'; echo cpp | sed -e $$t` PROTOIZE_CROSS_NAME = `t='$(program_transform_cross_name)'; echo protoize | sed -e $$t` UNPROTOIZE_CROSS_NAME = `t='$(program_transform_cross_name)'; echo unprotoize | sed -e $$t` @@ -2450,17 +2451,31 @@ install-cross-rest: install-float-h-cros # Handle cpp installation. install-cpp: cpp$(exeext) - -rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext) - $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext) - if [ x$(cpp_install_dir) != x ]; then \ - rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ - $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ - else true; fi + -if [ -f gcc-cross$(exeext) ] ; then \ + rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext); \ + $(INSTALL_PROGRAM) cpp$(exeext) $(bindir)/$(CPP_CROSS_NAME)$(exeext); \ + if [ x$(cpp_install_dir) != x ]; then \ + rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ + $(INSTALL_PROGRAM) cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ + else true; fi; \ + else \ + rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ + $(INSTALL_PROGRAM) cpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ + rm -f $(bindir)/$(target_alias)-cpp-1$(exeext); \ + $(LN) $(bindir)/$(CPP_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-cpp-1$(exeext); \ + mv $(bindir)/$(target_alias)-cpp-1$(exeext) $(bindir)/$(target_alias)-cpp$(exeext); \ + if [ x$(cpp_install_dir) != x ]; then \ + rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ + $(INSTALL_PROGRAM) cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ + else true; fi; \ + fi uninstall-cpp: - -rm -f $(bindir)/cpp + -rm -f $(bindir)/$(CPP_INSTALL_NAME) + -rm -f $(bindir)/$(CPP_CROSS_NAME) -if [ x$(cpp_install_dir) != x ]; then \ - rm -f $(prefix)/$(cpp_install_dir)/cpp; \ + rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME); \ + rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME); \ else true; fi # Install float.h for cross compiler. diff -up --recursive --new-file gcc-2.95.2.macro/gcc/config/mips/linux.h gcc-2.95.2/gcc/config/mips/linux.h --- gcc-2.95.2.macro/gcc/config/mips/linux.h Wed Apr 14 10:46:45 1999 +++ gcc-2.95.2/gcc/config/mips/linux.h Thu Nov 16 07:25:03 2000 @@ -1,5 +1,5 @@ /* Definitions for MIPS running Linux-based GNU systems with ELF format. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU CC. @@ -18,16 +18,106 @@ along with GNU CC; see the file COPYING. the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Required to keep collect2.c happy */ -#undef OBJECT_FORMAT_COFF +#undef TARGET_VERSION +#if TARGET_ENDIAN_DEFAULT == 0 +#define TARGET_VERSION fprintf (stderr, " (MIPSel GNU/Linux with ELF)"); +#else +#define TARGET_VERSION fprintf (stderr, " (MIPS GNU/Linux with ELF)"); +#endif + +#undef MD_EXEC_PREFIX +#undef MD_STARTFILE_PREFIX + +/* Output at beginning of assembler file. */ +/* The .file command should always begin the output. */ +#undef ASM_FILE_START +#define ASM_FILE_START(FILE) \ + do { \ + mips_asm_file_start (FILE); \ + fprintf (FILE, "\t.version\t\"01.01\"\n"); \ + } while (0) + -#define HAVE_ATEXIT +/* Required to keep collect2.c happy */ +#undef OBJECT_FORMAT_COFF /* If we don't set MASK_ABICALLS, we can't default to PIC. */ #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_ABICALLS|MASK_GAS) +/* Handle #pragma weak and #pragma pack. */ +#define HANDLE_SYSV_PRAGMA 1 + +/* Use more efficient ``thunks'' to implement C++ vtables. */ +#undef DEFAULT_VTABLE_THUNKS +#define DEFAULT_VTABLE_THUNKS 1 + +/* Don't assume anything about the header files. */ +#define NO_IMPLICIT_EXTERN_C + +/* Generate calls to memcpy, etc., not bcopy, etc. */ +#define TARGET_MEM_FUNCTIONS + +/* Specify predefined symbols in preprocessor. */ +#undef CPP_PREDEFINES +#if TARGET_ENDIAN_DEFAULT == 0 +#define CPP_PREDEFINES "-DMIPSEL -D_MIPSEL -Dunix -Dmips -D_mips \ +-DR3000 -D_R3000 -Dlinux -Asystem(posix) -Acpu(mips) \ +-Amachine(mips) -D__ELF__ -D__PIC__ -D__pic__" +#else +#define CPP_PREDEFINES "-DMIPSEB -D_MIPSEB -Dunix -Dmips -D_mips \ +-DR3000 -D_R3000 -Dlinux -Asystem(posix) -Acpu(mips) \ +-Amachine(mips) -D__ELF__ -D__PIC__ -D__pic__" +#endif + +#undef SUBTARGET_CPP_SIZE_SPEC +#define SUBTARGET_CPP_SIZE_SPEC "\ +%{mabi=32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ +%{mabi=n32: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \ +%{mabi=64: -D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \ +%{!mabi*: -D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int}" + +/* We must make -mips3 do what -mlong64 used to do. */ +/* ??? If no mipsX option given, but a mabi=X option is, then should set + _MIPS_ISA based on the mabi=X option. */ +/* ??? If no mabi=X option give, but a mipsX option is, then should set + _MIPS_SIM based on the mipsX option. */ +/* ??? Same for _MIPS_SZINT. */ +/* ??? Same for _MIPS_SZPTR. */ +/* ??? Same for __SIZE_TYPE and __PTRDIFF_TYPE. */ +#undef SUBTARGET_CPP_SPEC +#define SUBTARGET_CPP_SPEC "\ +%{mfp32: -D_MIPS_FPSET=16} \ +%{mfp64: -D_MIPS_FPSET=32} \ +%{!mfp*: -D_MIPS_FPSET=32} \ +%{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \ +%{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \ +%{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \ +%{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \ +%{!mips*: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \ +%{mabi=32: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ +%{mabi=n32: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \ +%{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \ +%{!mabi*: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \ +%{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \ +%{mabi=32: -D_MIPS_SZLONG=32} \ +%{mabi=n32: -D_MIPS_SZLONG=32} \ +%{mabi=64: -D_MIPS_SZLONG=64} \ +%{!mabi*: -D_MIPS_SZLONG=32} \ +%{mabi=32: -D_MIPS_SZPTR=32} \ +%{mabi=n32: -D_MIPS_SZPTR=32} \ +%{mabi=64: -D_MIPS_SZPTR=64} \ +%{!mabi*: -D_MIPS_SZPTR=32} \ +%{!mips*: -U__mips -D__mips} \ +%{mabi=32: -U__mips64} \ +%{mabi=n32: -D__mips64} \ +%{mabi=64: -U__mips64} \ +%{!mabi*: -U__mips64} \ +%{fno-PIC:-U__PIC__ -U__pic__} %{fno-pic:-U__PIC__ -U__pic__} \ +%{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} \ +%{pthread:-D_REENTRANT}" + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add the GNU/Linux magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static @@ -55,9 +145,18 @@ Boston, MA 02111-1307, USA. */ #undef MIPS_DEFAULT_GVALUE #define MIPS_DEFAULT_GVALUE 0 +#undef LIB_SPEC +/* Taken from sparc/linux.h. */ +#define LIB_SPEC \ + "%{shared: -lc} \ + %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ + %{profile:-lc_p} %{!profile: -lc}}" + /* Borrowed from sparc/linux.h */ #undef LINK_SPEC -#define LINK_SPEC "-Y P,/usr/lib %{shared:-shared} \ +#define LINK_SPEC \ + "%(endian_spec) \ + %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ @@ -67,33 +166,7 @@ Boston, MA 02111-1307, USA. */ #undef SUBTARGET_ASM_SPEC -#define SUBTARGET_ASM_SPEC "-KPIC" - -/* Undefine the following which were defined in elf.h. This will cause the linux - port to continue to use collect2 for constructors/destructors. These may be removed - when .ctor/.dtor section support is desired. */ - -#undef CTORS_SECTION_ASM_OP -#undef DTORS_SECTION_ASM_OP - -#undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_sdata, in_rdata - -#undef INVOKE__main -#undef NAME__MAIN -#undef SYMBOL__MAIN - -#undef EXTRA_SECTION_FUNCTIONS -#define EXTRA_SECTION_FUNCTIONS \ - SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \ - SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) - -#undef ASM_OUTPUT_CONSTRUCTOR -#undef ASM_OUTPUT_DESTRUCTOR - -#undef CTOR_LIST_BEGIN -#undef CTOR_LIST_END -#undef DTOR_LIST_BEGIN -#undef DTOR_LIST_END - -/* End of undefines to turn off .ctor/.dtor section support */ +#define SUBTARGET_ASM_SPEC "\ +%{mabi=64: -64} \ +%{!fno-PIC:%{!fno-pic:-KPIC}} \ +%{fno-PIC:-non_shared} %{fno-pic:-non_shared}" diff -up --recursive --new-file gcc-2.95.2.macro/gcc/config/mips/mips.h gcc-2.95.2/gcc/config/mips/mips.h --- gcc-2.95.2.macro/gcc/config/mips/mips.h Wed May 19 23:05:45 1999 +++ gcc-2.95.2/gcc/config/mips/mips.h Tue Aug 15 18:40:42 2000 @@ -599,11 +599,11 @@ extern void mips_select_section (); linker will default to using big-endian output files. The OUTPUT_FORMAT line must be in the linker script, otherwise -EB/-EL will not work. */ -#ifndef LINKER_ENDIAN_SPEC +#ifndef ENDIAN_SPEC #if TARGET_ENDIAN_DEFAULT == 0 -#define LINKER_ENDIAN_SPEC "%{!EB:%{!meb:-EL}}" +#define ENDIAN_SPEC "%{!EB:%{!meb:-EL}} %{EL} %{EB}" #else -#define LINKER_ENDIAN_SPEC "" +#define ENDIAN_SPEC "%{!EL:%{!mel:-EB}} %{EB} %{EL}" #endif #endif @@ -871,7 +871,8 @@ while (0) /* ASM_SPEC is the set of arguments to pass to the assembler. */ #define ASM_SPEC "\ -%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \ +%(endian_spec) \ +%{G*} %{mips1} %{mips2} %{mips3} %{mips4} \ %{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} \ %(subtarget_asm_optimizing_spec) \ %(subtarget_asm_debugging_spec) \ @@ -925,9 +926,9 @@ while (0) #ifndef LINK_SPEC #define LINK_SPEC "\ -%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \ -%{bestGnum} %{shared} %{non_shared} \ -%(linker_endian_spec)" +%(endian_spec) \ +%{G*} %{mips1} %{mips2} %{mips3} %{mips4} \ +%{bestGnum} %{shared} %{non_shared}" #endif /* LINK_SPEC defined */ /* Specs for the compiler proper */ @@ -1035,7 +1036,7 @@ while (0) { "subtarget_asm_optimizing_spec", SUBTARGET_ASM_OPTIMIZING_SPEC }, \ { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \ { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ - { "linker_endian_spec", LINKER_ENDIAN_SPEC }, \ + { "endian_spec", ENDIAN_SPEC }, \ SUBTARGET_EXTRA_SPECS #ifndef SUBTARGET_EXTRA_SPECS diff -up --recursive --new-file gcc-2.95.2.macro/gcc/configure.in gcc-2.95.2/gcc/configure.in --- gcc-2.95.2.macro/gcc/configure.in Wed Oct 13 07:58:02 1999 +++ gcc-2.95.2/gcc/configure.in Mon May 29 22:16:31 2000 @@ -2356,16 +2356,23 @@ changequote([,])dnl # On NetBSD, the headers are already okay, except for math.h. tmake_file=t-netbsd ;; - mips*-*-linux*) # Linux MIPS, either endian. + mips*-*-linux*) # Linux MIPS, either endian. xmake_file=x-linux - xm_file="xm-siglist.h ${xm_file}" - case $machine in - mipsel-*) tm_file="mips/elfl.h mips/linux.h" ;; - *) tm_file="mips/elf.h mips/linux.h" ;; - esac - extra_parts="crtbegin.o crtend.o" + case $machine in + mips*el-*) + tm_file="mips/elfl.h mips/linux.h" + ;; + *) + tm_file="mips/elf.h mips/linux.h" + ;; + esac + tmake_file=t-linux + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes gas=yes + if test x$enable_threads = xyes; then + thread_file='posix' + fi ;; mips*el-*-openbsd*) # mips little endian target_cpu_default="MASK_GAS|MASK_ABICALLS" diff -u --recursive --new-file gcc-2.95.2.macro/gcc/cp/Make-lang.in gcc-2.95.2/gcc/cp/Make-lang.in --- gcc-2.95.2.macro/gcc/cp/Make-lang.in Mon Apr 26 23:50:36 1999 +++ gcc-2.95.2/gcc/cp/Make-lang.in Thu Nov 11 12:00:32 1999 @@ -219,12 +219,22 @@ chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \ $(LN) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext); \ + if [ -d $(gcc_tooldir)/bin/. ] ; then \ + rm -f $(gcc_tooldir)/bin/g++$(exeext); \ + $(INSTALL_PROGRAM) g++-cross$(exeext) $(gcc_tooldir)/bin/g++$(exeext); \ + rm -f $(gcc_tooldir)/bin/c++$(exeext); \ + $(LN) $(gcc_tooldir)/bin/g++$(exeext) $(gcc_tooldir)/bin/c++$(exeext); \ + else true; fi; \ else \ rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ $(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ + rm -f $(bindir)/$(target_alias)-g++$(exeext); \ + $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-g++$(exeext); \ + rm -f $(bindir)/$(target_alias)-c++$(exeext); \ + $(LN) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-c++$(exeext); \ fi ; \ if [ x$(DEMANGLER_PROG) != x ] && [ -x "$(DEMANGLER_PROG)" ]; then \ if [ -f g++-cross$(exeext) ] ; then \ diff -u --recursive --new-file gcc-2.95.2.macro/gcc/config/i386/i386.c gcc-2.95.2/gcc/config/i386/i386.c --- gcc-2.95.2.macro/gcc/config/i386/i386.c Tue Sep 7 07:38:56 1999 +++ gcc-2.95.2/gcc/config/i386/i386.c Fri Feb 4 23:44:07 2000 @@ -291,7 +291,7 @@ if (ix86_arch_string == 0) { - ix86_arch_string = PROCESSOR_PENTIUM_STRING; + ix86_arch_string = PROCESSOR_DEFAULT_STRING; if (ix86_cpu_string == 0) ix86_cpu_string = PROCESSOR_DEFAULT_STRING; } @@ -308,7 +308,7 @@ if (i == ptt_size) { error ("bad value (%s) for -march= switch", ix86_arch_string); - ix86_arch_string = PROCESSOR_PENTIUM_STRING; + ix86_arch_string = PROCESSOR_DEFAULT_STRING; ix86_arch = PROCESSOR_DEFAULT; } diff -u --recursive --new-file gcc-2.95.2.macro/gcc/calls.c gcc-2.95.2/gcc/calls.c --- gcc-2.95.2.macro/gcc/calls.c Sat May 8 01:58:39 1999 +++ gcc-2.95.2/gcc/calls.c Sat Feb 5 00:07:21 2000 @@ -1499,6 +1499,11 @@ validize_mem (args[i].value), nregs, args[i].mode); + /* Indicate two regs used to hold a short complex arg. */ + if (GET_MODE_CLASS (args[i].mode) == MODE_COMPLEX_FLOAT + && GET_MODE_SIZE (args[i].mode) <= UNITS_PER_WORD) + nregs = 2; + /* Handle calls that pass values in multiple non-contiguous locations. The Irix 6 ABI has examples of this. */ if (GET_CODE (reg) == PARALLEL) diff -u --recursive --new-file gcc-2.95.2.macro/gcc/config/alpha/alpha.h gcc-2.95.2/gcc/config/alpha/alpha.h --- gcc-2.95.2.macro/gcc/config/alpha/alpha.h Fri Jun 25 05:09:12 1999 +++ gcc-2.95.2/gcc/config/alpha/alpha.h Sat Feb 5 00:07:21 2000 @@ -622,7 +622,10 @@ but can be less for certain modes in special long registers. */ #define HARD_REGNO_NREGS(REGNO, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) +((GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \ + && GET_MODE_SIZE (MODE) <= UNITS_PER_WORD) \ + ? 2 \ + : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. On Alpha, the integer registers can hold any mode. The floating-point @@ -1070,12 +1073,16 @@ #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) (CUM) = 0 /* Define intermediate macro to compute the size (in registers) of an argument - for the Alpha. */ + for the Alpha. + A short complex arg takes two registers. */ #define ALPHA_ARG_SIZE(MODE, TYPE, NAMED) \ -((MODE) != BLKmode \ - ? (GET_MODE_SIZE (MODE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD \ - : (int_size_in_bytes (TYPE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD) +((GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \ + && GET_MODE_SIZE (MODE) <= UNITS_PER_WORD) \ + ? 2 \ + : ((MODE) != BLKmode \ + ? (GET_MODE_SIZE (MODE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD \ + : (int_size_in_bytes (TYPE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)) /* Update the data in CUM to advance over an argument of mode MODE and data type TYPE. diff -u --recursive --new-file gcc-2.95.2.macro/gcc/emit-rtl.c gcc-2.95.2/gcc/emit-rtl.c --- gcc-2.95.2.macro/gcc/emit-rtl.c Wed Aug 11 07:28:52 1999 +++ gcc-2.95.2/gcc/emit-rtl.c Sat Feb 5 00:07:21 2000 @@ -749,6 +749,17 @@ && ! HARD_REGNO_MODE_OK (REGNO (x) + word, mode) && HARD_REGNO_MODE_OK (REGNO (x), GET_MODE (x))) return 0; + + else if (GET_MODE_CLASS (GET_MODE (x)) == MODE_COMPLEX_FLOAT + && GET_MODE_SIZE (GET_MODE (x)) <= UNITS_PER_WORD + && REGNO (x) < FIRST_PSEUDO_REGISTER) + { + if (REG_FUNCTION_VALUE_P (x)) + return gen_rtx (SUBREG, mode, x, 0); + else + return gen_rtx (REG, mode, REGNO (x)); + } + else if (REGNO (x) < FIRST_PSEUDO_REGISTER /* integrate.c can't handle parts of a return value register. */ && (! REG_FUNCTION_VALUE_P (x) @@ -972,11 +983,6 @@ { if (GET_CODE (x) == CONCAT && GET_MODE (XEXP (x, 0)) == mode) return XEXP (x, 0); - else if (WORDS_BIG_ENDIAN - && GET_MODE_BITSIZE (mode) < BITS_PER_WORD - && REG_P (x) - && REGNO (x) < FIRST_PSEUDO_REGISTER) - fatal ("Unable to access real part of complex value in a hard register on this target"); else if (WORDS_BIG_ENDIAN) return gen_highpart (mode, x); else @@ -995,11 +1001,6 @@ return XEXP (x, 1); else if (WORDS_BIG_ENDIAN) return gen_lowpart (mode, x); - else if (!WORDS_BIG_ENDIAN - && GET_MODE_BITSIZE (mode) < BITS_PER_WORD - && REG_P (x) - && REGNO (x) < FIRST_PSEUDO_REGISTER) - fatal ("Unable to access imaginary part of complex value in a hard register on this target"); else return gen_highpart (mode, x); } @@ -1134,6 +1135,16 @@ word = ((GET_MODE_SIZE (GET_MODE (x)) - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)) / UNITS_PER_WORD); + + if (GET_MODE_CLASS (GET_MODE (x)) == MODE_COMPLEX_FLOAT + && GET_MODE_SIZE (GET_MODE (x)) <= UNITS_PER_WORD + && REGNO (x) < FIRST_PSEUDO_REGISTER) + { + if (REG_FUNCTION_VALUE_P (x)) + return gen_rtx (SUBREG, mode, x, 1); + else + return gen_rtx (REG, mode, REGNO (x) + 1); + } if (REGNO (x) < FIRST_PSEUDO_REGISTER /* integrate.c can't handle parts of a return value register. */ diff -u --recursive --new-file gcc-2.95.2.macro/gcc/flow.c gcc-2.95.2/gcc/flow.c --- gcc-2.95.2.macro/gcc/flow.c Wed Aug 4 07:09:48 1999 +++ gcc-2.95.2/gcc/flow.c Sat Feb 5 00:07:21 2000 @@ -2995,6 +2995,10 @@ while (--n > 0) if (REGNO_REG_SET_P (needed, regno+n)) return 0; + + /* Don't allow part of a complex number to be deleted. */ + if (GET_MODE_CLASS (GET_MODE (r)) == MODE_COMPLEX_FLOAT) + return 0; } return 1; diff -u --recursive --new-file binutils.macro/configure binutils/configure --- binutils.macro/configure Tue Aug 10 12:46:33 1999 +++ binutils/configure Sun Oct 3 22:05:30 1999 @@ -579,7 +579,7 @@ # default exec_prefix case "${exec_prefixoption}" in -"") exec_prefix="\$(prefix)" ;; +"") exec_prefix="\${prefix}" ;; *) ;; esac @@ -779,7 +779,7 @@ # Some systems (e.g., one of the i386-aix systems the gas testers are # using) don't handle "\$" correctly, so don't use it here. -tooldir='$(exec_prefix)'/${target_alias} +tooldir='${exec_prefix}'/${target_alias} if [ "${host_alias}" != "${target_alias}" ] ; then if [ "${program_prefixoption}" = "" ] ; then diff -u --recursive --new-file gcc-2.95.2.macro/Makefile.in gcc-2.95.2/Makefile.in --- gcc-2.95.2.macro/Makefile.in Tue Jun 22 22:44:42 1999 +++ gcc-2.95.2/Makefile.in Sun Feb 13 03:05:44 2000 @@ -219,7 +219,7 @@ echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ fi; \ else \ - echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \ + echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $(build_tooldir)/include; \ fi; \ else \ if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ @@ -255,7 +255,7 @@ echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ fi; \ else \ - echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \ + echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $(build_tooldir)/include; \ fi; \ else \ if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ diff -u --recursive --new-file gcc-2.95.2.macro/configure.in gcc-2.95.2/configure.in --- gcc-2.95.2.macro/configure.in Tue Jun 22 22:44:40 1999 +++ gcc-2.95.2/configure.in Sun Feb 13 04:49:00 2000 @@ -1107,7 +1107,11 @@ gxx_include_dir='${libsubdir}/include/g++' else . ${topsrcdir}/config.if - gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface} + if [ x${is_cross_compiler} = xno ]; then + gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface} + else + gxx_include_dir='${prefix}/'${target_subdir}'/include/g++'-${libstdcxx_interface} + fi fi else gxx_include_dir=${gxx_include_dir} diff -u --recursive --new-file gcc-2.95.2.macro/gcc/configure.in gcc-2.95.2/gcc/configure.in --- gcc-2.95.2.macro/gcc/configure.in Wed Oct 13 07:58:02 1999 +++ gcc-2.95.2/gcc/configure.in Sun Feb 13 04:35:53 2000 @@ -169,7 +169,7 @@ else topsrcdir=${srcdir}/.. . ${srcdir}/../config.if changequote(<<, >>)dnl - gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface} + gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/\$(target_subdir)include/g++"-${libstdcxx_interface} changequote([, ])dnl fi fi @@ -4267,7 +4267,7 @@ host_canonical=${host} target_subdir= if test "${host}" != "${target}" ; then - target_subdir=${target}/ + target_subdir=${target_alias}/ fi AC_SUBST(build_canonical) AC_SUBST(host_canonical) diff -u --recursive --new-file gcc-2.95.2.macro/gcc/Makefile.in gcc-2.95.2/gcc/Makefile.in --- gcc-2.95.2.macro/gcc/Makefile.in Fri Aug 13 07:46:55 1999 +++ gcc-2.95.2/gcc/Makefile.in Sat May 20 17:24:08 2000 @@ -218,6 +218,7 @@ # Dir to search for system headers. Overridden by cross-make. SYSTEM_HEADER_DIR = /usr/include +CROSS_SYSTEM_HEADER_DIR = $(tooldir)/sys-include # Control whether to run fixproto. STMP_FIXPROTO = stmp-fixproto diff -u --recursive --new-file gcc-2.95.2.macro/gcc/config/t-linux gcc-2.95.2/gcc/config/t-linux --- gcc-2.95.2.macro/gcc/config/t-linux Wed Dec 16 21:00:09 1998 +++ gcc-2.95.2/gcc/config/t-linux Sat May 20 17:25:57 2000 @@ -14,3 +14,6 @@ LIBGCC1 = CROSS_LIBGCC1 = LIBGCC1_TEST = + +# Dir to search for system headers for cross-make. +CROSS_SYSTEM_HEADER_DIR = $(tooldir)/include diff -u --recursive --new-file gcc-2.95.2.macro/gcc/cross-make gcc-2.95.2/gcc/cross-make --- gcc-2.95.2.macro/gcc/cross-make Mon Mar 1 19:15:45 1999 +++ gcc-2.95.2/gcc/cross-make Sat May 20 17:24:44 2000 @@ -5,7 +5,7 @@ # Dir to search for system headers. Normally /usr/include. # Use CROSS_INCLUDE_DIR not TOOL_INCLUDE_DIR for other vendor's headers. -SYSTEM_HEADER_DIR = $(tooldir)/sys-include +SYSTEM_HEADER_DIR = $(CROSS_SYSTEM_HEADER_DIR) # Don't try to compile the things we can't compile. ALL = all.cross diff -u --recursive --new-file gcc-2.95.2.macro/Makefile.in gcc-2.95.2/Makefile.in --- gcc-2.95.2.macro/Makefile.in Tue Jun 22 22:44:42 1999 +++ gcc-2.95.2/Makefile.in Mon Jul 3 07:22:41 2000 @@ -56,6 +56,9 @@ includedir = $(prefix)/include # Directory in which the compiler finds executables, libraries, etc. libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) + +local_prefix = /usr/local + GDB_NLM_DEPS = SHELL = /bin/sh @@ -420,6 +423,7 @@ "gxx_include_dir=$(gxx_include_dir)" \ "gcc_version=$(gcc_version)" \ "gcc_version_trigger=$(gcc_version_trigger)" \ + "local_prefix=$(local_prefix)" \ "target_alias=$(target_alias)" \ "libsubdir=$(libsubdir)" diff -u --recursive --new-file gcc-2.95.2.macro/configure gcc-2.95.2/configure --- gcc-2.95.2.macro/configure Fri Apr 2 14:17:40 1999 +++ gcc-2.95.2/configure Tue Aug 15 14:14:10 2000 @@ -62,6 +62,7 @@ gcc_version_trigger= host_alias=NOHOST host_makefile_frag= +local_prefix=/usr/local moveifchange= norecursion= other_options= @@ -604,6 +605,22 @@ fi fi +# provide a proper local_prefix. +# Check whether --with-local-prefix or --without-local-prefix was given. +if test -n "${with_local_prefix}"; then + case "${with_local_prefix}" in + yes ) + echo "configure.in: error: bad value ${withval} given for local prefix" 1>&2 + exit 1 + ;; + no ) + ;; + * ) + local_prefix=${with_local_prefix} + ;; + esac +fi + ### break up ${srcdir}/configure.in. case "`grep '^# per\-host:' ${srcdir}/configure.in`" in "") @@ -1362,6 +1379,7 @@ fi sed -e "s|^prefix[ ]*=.*$|prefix = ${prefix}|" \ -e "s|^exec_prefix[ ]*=.*$|exec_prefix = ${exec_prefix}|" \ + -e "s|^local_prefix[ ]*=.*$|local_prefix = ${local_prefix}|" \ -e "s|^bindir[ ]*=.*$|bindir = ${bindir}|" \ -e "s|^sbindir[ ]*=.*$|sbindir = ${sbindir}|" \ -e "s|^libexecdir[ ]*=.*$|libexecdir = ${libexecdir}|" \ diff -u --recursive --new-file gcc-2.95.2.macro/gcc/Makefile.in gcc-2.95.2/gcc/Makefile.in --- gcc-2.95.2.macro/gcc/Makefile.in Fri Aug 13 07:46:55 1999 +++ gcc-2.95.2/gcc/Makefile.in Mon Jul 3 20:14:34 2000 @@ -105,6 +105,7 @@ # These permit overriding just for certain files. INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +mkinstalldirs = $(SHELL) $(srcdir)/mkinstalldirs MAKEINFO = `if [ -f $(objdir)/../texinfo/makeinfo/Makefile ] ; \ then echo $(objdir)/../texinfo/makeinfo/makeinfo ; \ else echo makeinfo ; fi` @@ -282,7 +283,7 @@ # Directory in which the compiler finds g++ includes. gcc_gxx_include_dir= @gcc_gxx_include_dir@ # Directory to search for site-specific includes. -includedir = $(local_prefix)/include +local_includedir = $(local_prefix)/include # assertdir is overridden in cross-make. # (But this currently agrees with what is in cross-make.) assertdir = $(gcc_tooldir)/include @@ -1971,7 +1972,7 @@ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ - -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \ + -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \ -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'` @@ -2005,7 +2006,7 @@ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ - -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \ + -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \ -c `echo $(srcdir)/cppinit.c | sed 's,^\./,,'` @@ -2030,7 +2031,7 @@ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \ - -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \ + -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ -DSTD_PROTO_DIR=\"$(libsubdir)\" \ $(srcdir)/protoize.c @@ -2041,7 +2042,7 @@ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \ -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \ - -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \ + -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \ -DSTD_PROTO_DIR=\"$(libsubdir)\" \ $(srcdir)/unprotoize.c @@ -2253,7 +2254,7 @@ else \ : This line works around a 'make' bug in BSDI 1.1.; \ FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \ - mkinstalldirs="$(SHELL) $(srcdir)/mkinstalldirs"; \ + mkinstalldirs="$(mkinstalldirs)"; \ export mkinstalldirs; \ if [ -d $(SYSTEM_HEADER_DIR) ] ; then \ $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \ @@ -2476,27 +2477,19 @@ # Create the installation directories. installdirs: - -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi - -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi - -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi - -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi + -$(mkinstalldirs) $(prefix) + -$(mkinstalldirs) $(exec_prefix) + -$(mkinstalldirs) $(libdir) + -$(mkinstalldirs) $(libdir)/gcc-lib # This dir isn't currently searched by cpp. -# -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi - -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \ - fdir=$${fdir}/$${dir}; \ - if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \ - done - -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi - -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi - -if [ -d $(gcc_tooldir) ] ; then true ; else mkdir $(gcc_tooldir) ; chmod a+rx $(gcc_tooldir) ; fi - -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi - -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi -# We don't use mkdir -p to create the parents of man1dir, -# because some systems don't support it. -# Instead, we use this technique to create the immediate parent of man1dir. - -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ - if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi - -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi +# -$(mkinstalldirs) $(libdir)/gcc-lib/include + -$(mkinstalldirs) $(libsubdir) + -$(mkinstalldirs) $(bindir) + -$(mkinstalldirs) $(local_includedir) + -$(mkinstalldirs) $(gcc_tooldir) + -$(mkinstalldirs) $(assertdir) + -$(mkinstalldirs) $(infodir) + -$(mkinstalldirs) $(man1dir) # Install the compiler executables built during cross compilation. install-common: native installdirs $(EXTRA_PARTS) lang.install-common diff -up --recursive --new-file gcc-2.95.3.macro/libstdc++/Makefile.in gcc-2.95.3/libstdc++/Makefile.in --- gcc-2.95.3.macro/libstdc++/Makefile.in Mon Apr 24 17:34:25 2000 +++ gcc-2.95.3/libstdc++/Makefile.in Thu Apr 5 20:06:51 2001 @@ -17,6 +17,8 @@ VERSION = 2.10.0 INTERFACE = 3 +cross_host = ${host_alias} + gxx_include_dir=${includedir}/g++ OBJS = cstringi.o stdexcepti.o cstdlibi.o cmathi.o stlinst.o valarray.o @@ -294,22 +296,22 @@ install: if [ $${INSTALLLINKDIR}$(MULTISUBDIR) = $${INSTALLDIR}$(MULTISUBDIR) ]; then \ RELINSTALLDIR=; \ elif [ x$(MULTISUBDIR) = x ]; then \ - if [ $(build_alias) = $(target_alias) ]; then \ + if [ $(cross_host) = $(host_alias) ]; then \ RELINSTALLDIR=../../../; \ else \ - RELINSTALLDIR=../../../../$(target_alias)/lib/; \ + RELINSTALLDIR=../../../../$(host_alias)/lib/; \ fi; \ else \ - if [ $(build_alias) = $(target_alias) ]; then \ + if [ $(cross_host) = $(host_alias) ]; then \ RELINSTALLDIR=../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`$(MULTISUBDIR)/; \ else \ - RELINSTALLDIR=../../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`/$(target_alias)/lib$(MULTISUBDIR)/; \ + RELINSTALLDIR=../../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`/$(host_alias)/lib$(MULTISUBDIR)/; \ fi; \ fi; \ - if [ $(build_alias) != $(target_alias) ]; then \ + if [ $(cross_host) != $(host_alias) ]; then \ case $$RELINSTALLDIR in \ ../../../|../../../../) \ - RELINSTALLDIR=../$${RELINSTALLDIR}$(target_alias)/lib/;; \ + RELINSTALLDIR=../$${RELINSTALLDIR}$(host_alias)/lib/;; \ esac; \ fi; \ rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(SHLINK) ; \ diff -up --recursive --new-file gcc-2.95.3.macro/libstdc++/configure.in gcc-2.95.3/libstdc++/configure.in --- gcc-2.95.3.macro/libstdc++/configure.in Mon Jun 7 23:28:10 1999 +++ gcc-2.95.3/libstdc++/configure.in Sat Apr 7 08:52:23 2001 @@ -163,6 +163,7 @@ if [ -n "${with_cross_host}" ] ; then rm -f Makefile.tem sed \ -e 's|^\([ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \ + -e "s%^cross_host[ ]*=.*$%cross_host=${with_cross_host}%" \ Makefile >Makefile.tem mv -f Makefile.tem Makefile fi diff -up --recursive --new-file gcc-2.95.2.macro/gcc/config/mips/linux.h gcc-2.95.2/gcc/config/mips/linux.h --- gcc-2.95.2.macro/gcc/config/mips/linux.h Thu Nov 16 07:25:03 2000 +++ gcc-2.95.2/gcc/config/mips/linux.h Sat Nov 18 20:22:42 2000 @@ -170,3 +170,20 @@ Boston, MA 02111-1307, USA. */ %{mabi=64: -64} \ %{!fno-PIC:%{!fno-pic:-KPIC}} \ %{fno-PIC:-non_shared} %{fno-pic:-non_shared}" + +/* On svr4, we *do* have support for the .init and .fini sections, and we + can put stuff in there to be executed before and after `main'. We let + crtstuff.c and other files know this by defining the following symbols. + The definitions say how to change sections to the .init and .fini + sections. This is the same for all known svr4 assemblers. */ + +#define INIT_SECTION_ASM_OP "\t.section\t.init" +#define FINI_SECTION_ASM_OP "\t.section\t.fini" + +/* Undef junk imported from mips/elf.h. */ +#undef CTOR_LIST_BEGIN +#undef CTOR_LIST_END +#undef DTOR_LIST_BEGIN +#undef DTOR_LIST_END + +#undef INVOKE__main diff -up --recursive --new-file gcc-2.95.2.macro/gcc/config/mips/mips.h gcc-2.95.2/gcc/config/mips/mips.h --- gcc-2.95.2.macro/gcc/config/mips/mips.h Tue Aug 15 18:40:42 2000 +++ gcc-2.95.2/gcc/config/mips/mips.h Sat Nov 18 17:53:39 2000 @@ -1935,7 +1935,7 @@ extern enum reg_class mips_regno_to_clas extern enum reg_class mips_char_to_class[]; -#define REG_CLASS_FROM_LETTER(C) mips_char_to_class[ (C) ] +#define REG_CLASS_FROM_LETTER(C) mips_char_to_class[(unsigned char)(C)] /* The letters I, J, K, L, M, N, O, and P in a register constraint string can be used to stand for particular ranges of immediate diff -up --recursive --new-file gcc-2.95.2.macro/gcc/gcse.c gcc-2.95.2/gcc/gcse.c --- gcc-2.95.2.macro/gcc/gcse.c Sat Oct 16 21:20:32 1999 +++ gcc-2.95.2/gcc/gcse.c Sat Nov 18 17:42:50 2000 @@ -1856,7 +1856,9 @@ hash_scan_set (pat, insn, set_p) /* Don't GCSE something if we can't do a reg/reg copy. */ && can_copy_p [GET_MODE (dest)] /* Is SET_SRC something we want to gcse? */ - && want_to_gcse_p (src)) + && want_to_gcse_p (src) + /* Copy between modes is prohibited */ + && GET_MODE (src) == GET_MODE (dest)) { /* An expression is not anticipatable if its operands are modified before this insn. */ From ralf@gnu.org Mon Oct 30 11:51:34 2000 Message-ID: <20001029163828.A18989@bacchus.dhis.org> Date: Sun, 29 Oct 2000 16:38:28 +0100 From: Ralf Baechle To: gcc@gcc.gnu.org Cc: "Maciej W. Rozycki" , Andreas Jaeger , Keith M Wesolowski , Ulf Carlsson Subject: PATCH: Linux/MIPS CPP_SPECs fix. mips{,el}-linux default to the 32 bit ABI but we were predefining _ABIN32 indicating we're N32. Below patch fixes this. Please apply, Ralf 2000-10-29 Ralf Baechle * config/mips/linux.h (SUBTARGET_CPP_SPEC): Default ABI is 32; change SUBTARGET_CPP_SPEC apropriatly. diff -urN gcc-cygnus/gcc/config/mips/linux.h gcc/gcc/config/mips/linux.h --- gcc-cygnus/gcc/config/mips/linux.h Tue Aug 29 02:46:28 2000 +++ gcc/gcc/config/mips/linux.h Sun Oct 29 16:32:55 2000 @@ -99,7 +99,7 @@ %{mabi=32: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ %{mabi=n32: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \ %{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \ -%{!mabi*: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \ +%{!mabi*: -D_MIPS_SIM=_MIPS_SIM_ABI32} \ %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \ %{mabi=32: -D_MIPS_SZLONG=32} \ %{mabi=n32: -D_MIPS_SZLONG=32} \ diff -up --recursive --new-file gcc-2.95.3.macro/gcc/combine.c gcc-2.95.3/gcc/combine.c --- gcc-2.95.3.macro/gcc/combine.c Thu Jan 25 14:03:01 2001 +++ gcc-2.95.3/gcc/combine.c Mon Mar 26 21:08:09 2001 @@ -2569,11 +2569,12 @@ try_combine (i3, i2, i1) } /* Update reg_nonzero_bits et al for any changes that may have been made - to this insn. */ + to this insn. The order of set_nonzero_bits_and_sign_copies() is + important, because newi2pat can affect nonzero_bits of newpat. */ - note_stores (newpat, set_nonzero_bits_and_sign_copies); if (newi2pat) note_stores (newi2pat, set_nonzero_bits_and_sign_copies); + note_stores (newpat, set_nonzero_bits_and_sign_copies); /* If I3 is now an unconditional jump, ensure that it has a BARRIER following it since it may have initially been a diff -up --recursive --new-file gcc-2.95.3.macro/config.if gcc-2.95.3/config.if --- gcc-2.95.3.macro/config.if Sun Oct 18 17:37:10 1998 +++ gcc-2.95.3/config.if Thu Apr 5 07:49:27 2001 @@ -76,8 +76,13 @@ EOF exit 1 fi else - # Cross compiling. Assume glibc 2.1. - libc_interface=-libc6.1- + # Cross compiling. + # Try to extract the version with cpp or fall back to glibc 2.1. + libc_minor="`{ echo "#include "; + echo "@@@ __GLIBC_MINOR__"; } | + ${CC-cc} -E - 2>/dev/null | sed -n 's/^@@@ //gp' | sed 's/[ ]//g'`" + test "${libc_minor}" -ge 0 2>/dev/null || libc_minor=1 + libc_interface=-libc6.${libc_minor}- fi ;; *) diff -up --recursive --new-file gcc-2.95.3.macro/gcc/config/mips/mips.md gcc-2.95.3/gcc/config/mips/mips.md --- gcc-2.95.3.macro/gcc/config/mips/mips.md Tue Jun 29 01:59:20 1999 +++ gcc-2.95.3/gcc/config/mips/mips.md Mon Apr 23 17:16:12 2001 @@ -2441,17 +2441,11 @@ { if (GENERATE_BRANCHLIKELY) { - if (GET_CODE (operands[1]) == CONST_INT) - return \"%(beql\\t%0,$0,1f\\n\\tbreak\\t%2\\n1:%)\"; - else - return \"%(beql\\t%0,%1,1f\\n\\tbreak\\t%2\\n1:%)\"; + return \"%(beql\\t%0,%z1,1f\\n\\tbreak\\t%2\\n1:%)\"; } else { - if (GET_CODE (operands[1]) == CONST_INT) - return \"%(bne\\t%0,$0,1f\\n\\tnop\\n\\tbreak\\t%2\\n1:%)\"; - else - return \"%(bne\\t%0,%1,1f\\n\\tnop\\n\\tbreak\\t%2\\n1:%)\"; + return \"%(bne\\t%0,%z1,1f\\n\\tnop\\n\\tbreak\\t%2\\n1:%)\"; } } return \"\"; @@ -2485,10 +2479,7 @@ if (! have_dep_anti) { /* No branch delay slots on mips16. */ - if (GET_CODE (operands[1]) == CONST_INT) - return \"%(bnez\\t%0,1f\\n\\tbreak\\t%2\\n1:%)\"; - else - return \"%(bne\\t%0,%1,1f\\n\\tbreak\\t%2\\n1:%)\"; + return \"%(bne\\t%0,%z1,1f\\n\\tbreak\\t%2\\n1:%)\"; } return \"\"; }" @@ -4678,7 +4669,7 @@ move\\t%0,%z4\\n\\ if ((INTVAL (offset) & 3) == 0 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx)) - return \"sw\\t%1,%0\"; + return \"sw\\t%z1,%0\"; return \"usw\\t%z1,%0\"; }" @@ -4737,7 +4728,7 @@ move\\t%0,%z4\\n\\ if ((INTVAL (offset) & 7) == 0 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx)) - return \"sd\\t%1,%0\"; + return \"sd\\t%z1,%0\"; return \"usd\\t%z1,%0\"; }" diff -up --recursive --new-file gcc-2.95.3.macro/gcc/config/mips/linux.h gcc-2.95.3/gcc/config/mips/linux.h --- gcc-2.95.3.macro/gcc/config/mips/linux.h Thu Feb 7 17:07:16 2002 +++ gcc-2.95.3/gcc/config/mips/linux.h Thu Feb 7 17:10:44 2002 @@ -171,6 +171,9 @@ Boston, MA 02111-1307, USA. */ %{!fno-PIC:%{!fno-pic:-KPIC}} \ %{fno-PIC:-non_shared} %{fno-pic:-non_shared}" +#undef SUBTARGET_ASM_DEBUGGING_SPEC +#define SUBTARGET_ASM_DEBUGGING_SPEC "-g0" + /* On svr4, we *do* have support for the .init and .fini sections, and we can put stuff in there to be executed before and after `main'. We let crtstuff.c and other files know this by defining the following symbols. --- gcc-2.95.3/libstdc++/string~ 1999-02-20 12:21:49.000000000 +0000 +++ gcc-2.95.3/libstdc++/string 2002-12-09 12:17:13.000000000 +0000 @@ -7,7 +7,7 @@ extern "C++" { typedef basic_string string; -// typedef basic_string wstring; +typedef basic_string wstring; } // extern "C++" #endif --- gcc-2.95.3/libstdc++/std/bastring.h~ 2000-03-12 16:36:14.000000000 +0000 +++ gcc-2.95.3/libstdc++/std/bastring.h 2002-12-09 12:18:45.000000000 +0000 @@ -335,7 +335,7 @@ private: public: const charT* c_str () const - { if (length () == 0) return ""; terminate (); return data (); } + { static const charT nil = traits::eos(); if (length () == 0) return &nil; terminate (); return data (); } void resize (size_type n, charT c); void resize (size_type n) { resize (n, eos ()); }