Package: gcc-3.2 Version: 1:3.2.2-0pre8 Severity: important Tags: patch the attached patch from Dave Anglin will address the kde-related build issues people have been seeing on hppa. It is extracted from gcc 3.2 cvs
2003-02-07 John David Anglin <[EMAIL PROTECTED]> * pa.c (output_millicode_call): Use $PIC_pcrel$0 for long PIC millicode calls when !TARGET_SOM and TARGET_GAS is true. * pa.md (jump): Likewise. thanks randolph -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/
#! /bin/sh -e # All lines beginning with `# DPATCH:' are a description of the patch. # DP: Use $PIC_pcrel$0 for long PIC millicode calls when !TARGET_SOM and TARGET_GAS is true dir= if [ $# -eq 3 -a "$2" = '-d' ]; then pdir="-d $3" dir="$3/" elif [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0 #cd ${dir}gcc && autoconf ;; -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 #rm ${dir}gcc/configure ;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 2003-02-07 John David Anglin <[EMAIL PROTECTED]> * pa.c (output_millicode_call): Use $PIC_pcrel$0 for long PIC millicode calls when !TARGET_SOM and TARGET_GAS is true. * pa.md (jump): Likewise. =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v retrieving revision 1.148.2.7.2.3 retrieving revision 1.148.2.7.2.4 diff -u -r1.148.2.7.2.3 -r1.148.2.7.2.4 --- gcc/gcc/config/pa/pa.c 2003/02/01 04:50:32 1.148.2.7.2.3 +++ gcc/gcc/config/pa/pa.c 2003/02/07 22:59:30 1.148.2.7.2.4 @@ -5926,10 +5926,19 @@ output_asm_insn ("{bl|b,l} .+8,%%r1", xoperands); /* Add %r1 to the offset of our target from the next insn. */ - output_asm_insn ("addil L%%%0-%1,%%r1", xoperands); - ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", - CODE_LABEL_NUMBER (xoperands[1])); - output_asm_insn ("ldo R%%%0-%1(%%r1),%%r1", xoperands); + if (TARGET_SOM || !TARGET_GAS) + { + output_asm_insn ("addil L%%%0-%1,%%r1", xoperands); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (xoperands[1])); + output_asm_insn ("ldo R%%%0-%1(%%r1),%%r1", xoperands); + } + else + { + output_asm_insn ("addil L'%0-$PIC_pcrel$0+8,%%r1", xoperands); + output_asm_insn ("ldo R'%0-$PIC_pcrel$0+12(%%r1),%%r1", + xoperands); + } /* Get the return address into %r31. */ output_asm_insn ("blr 0,%3", xoperands); =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.md,v retrieving revision 1.101.2.1.2.2 retrieving revision 1.101.2.1.2.3 diff -u -r1.101.2.1.2.2 -r1.101.2.1.2.3 --- gcc/gcc/config/pa/pa.md 2003/01/24 15:51:23 1.101.2.1.2.2 +++ gcc/gcc/config/pa/pa.md 2003/02/07 22:59:30 1.101.2.1.2.3 @@ -5681,12 +5681,21 @@ xoperands[0] = operands[0]; xoperands[1] = gen_label_rtx (); - output_asm_insn (\"{bl|b,l} .+8,%%r1\\n\\taddil L'%l0-%l1,%%r1\", - xoperands); - ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", - CODE_LABEL_NUMBER (xoperands[1])); - output_asm_insn (\"ldo R'%l0-%l1(%%r1),%%r1\\n\\tbv %%r0(%%r1)\", - xoperands); + if (TARGET_SOM || !TARGET_GAS) + { + output_asm_insn (\"{bl|b,l} .+8,%%r1\\n\\taddil L'%l0-%l1,%%r1\", + xoperands); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", + CODE_LABEL_NUMBER (xoperands[1])); + output_asm_insn (\"ldo R'%l0-%l1(%%r1),%%r1\\n\\tbv %%r0(%%r1)\", + xoperands); + } + else + { + output_asm_insn (\"{bl|b,l} .+8,%%r1\", xoperands); + output_asm_insn (\"addil L'%l0-$PIC_pcrel$0+4,%%r1\", xoperands); + output_asm_insn (\"ldo R'%l0-$PIC_pcrel$0+8(%%r1),%%r1\", xoperands); + } } else output_asm_insn (\"ldil L'%l0,%%r1\\n\\tbe R'%l0(%%sr4,%%r1)\", operands);;