Message ID | B82B0AF3-2525-41DD-82E2-93AA7D5FB0B3@adacore.com |
---|---|
State | New |
Headers | show |
Ping for this patch. Tristan. On Dec 21, 2011, at 12:04 PM, Tristan Gingold wrote: > Hi, > > this patch fixes two build libgcc issues on VMS/ia64. > > * Because VMS doesn't define LIBGCC2_HAS_TF_MODE, compatibility thunks shouldn't be compiled. Otherwise, the shared libgcc library fails to build due to undefined symbols. > > * As VMS isn't fully compliant with ELF, crtstuff.c is used for crtbegin/crtend. This fact was last during the move from gcc/config/ia64 to libgcc/config/ia64. > > Tested only on ia64-hp-openvms. > > Ok for trunk ? > > Tristan. > > libgcc/ > 2011-12-21 Tristan Gingold <gingold@adacore.com> > > * config/ia64/t-ia64 (LIB1ASMFUNCS): Move backward > compatibility thunks... > (CUSTOM_CRTSTUFF, crtbegin.o, crtend.o) > (crtbeginS.o, crtendS.o): ... and these to ... > * config/ia64/t-ia64-elf: ... this new file. > * config.host (ia64*-*-elf*, ia64*-*-freebsd*, ia64*-*-linux*) > (ia64*-*-hpux*): Add ia64/t-ia64-elf in tmake_file. > > index a30bf52..13b71b7 100644 > --- a/libgcc/config.host > +++ b/libgcc/config.host > @@ -639,23 +639,23 @@ i[34567]86-*-interix3*) > ;; > ia64*-*-elf*) > extra_parts="$extra_parts crtbeginS.o crtendS.o crtfastmath.o" > - tmake_file="ia64/t-ia64 ia64/t-eh-ia64 t-crtfm" > + tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm" > ;; > ia64*-*-freebsd*) > extra_parts="$extra_parts crtfastmath.o" > - tmake_file="$tmake_file ia64/t-ia64 ia64/t-eh-ia64 t-crtfm" > + tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm" > ;; > ia64*-*-linux*) > # Don't use crtbeginT.o from *-*-linux* default. > extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" > - tmake_file="$tmake_file ia64/t-ia64 t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat ia64/t-eh-ia64 t-libunwind ia64/t-linux" > + tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat ia64/t-eh-ia64 t-libunwind ia64/t-linux" > if test x$with_system_libunwind != xyes ; then > tmake_file="${tmake_file} t-libunwind-elf ia64/t-linux-libunwind" > fi > md_unwind_header=ia64/linux-unwind.h > ;; > ia64*-*-hpux*) > - tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux" > + tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux" > ;; > ia64-hp-*vms*) > tmake_file="$tmake_file ia64/t-ia64 ia64/t-eh-ia64 ia64/t-vms t-slibgcc-vms" > diff --git a/libgcc/config/ia64/t-ia64 b/libgcc/config/ia64/t-ia64 > index d1ec353..1776ddd 100644 > --- a/libgcc/config/ia64/t-ia64 > +++ b/libgcc/config/ia64/t-ia64 > @@ -8,8 +8,7 @@ LIB1ASMSRC = ia64/lib1funcs.S > LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \ > __divdi3 __moddi3 __udivdi3 __umoddi3 \ > __divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \ > - __nonlocal_goto __restore_stack_nonlocal __trampoline \ > - _fixtfdi _fixunstfdi _floatditf > + __nonlocal_goto __restore_stack_nonlocal __trampoline > > # ??? Hack to get -P option used when compiling lib1funcs.S, because Intel > # assembler does not accept # line number as a comment. > @@ -17,20 +16,3 @@ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \ > # C++ part of libgcc2, hence it had to be disabled. Must find some other way > # to support the Intel assembler. > #LIBGCC2_DEBUG_CFLAGS = -g1 -P > - > -CUSTOM_CRTSTUFF = yes > - > -# Assemble startup files. > -# FIXME: -I$(gcc_objdir) is necessary to find auto-host.h. Really? > -crtbegin.o: $(srcdir)/config/ia64/crtbegin.S > - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp $< > -crtend.o: $(srcdir)/config/ia64/crtend.S > - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp $< > -crtbeginS.o: $(srcdir)/config/ia64/crtbegin.S > - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ > - -o $@ -DSHARED $< > -crtendS.o: $(srcdir)/config/ia64/crtend.S > - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ > - -o $@ -DSHARED $< > - > -SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64.ver > diff --git a/libgcc/config/ia64/t-ia64-elf b/libgcc/config/ia64/t-ia64-elf > new file mode 100644 > index 0000000..08784df > --- /dev/null > +++ b/libgcc/config/ia64/t-ia64-elf > @@ -0,0 +1,20 @@ > +LIB1ASMFUNCS += _fixtfdi _fixunstfdi _floatditf > + > +CUSTOM_CRTSTUFF = yes > + > +# Assemble startup files. > +# FIXME: -I$(gcc_objdir) is necessary to find auto-host.h. Really? > +crtbegin.o: $(srcdir)/config/ia64/crtbegin.S > + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ > + -o $@ $< > +crtend.o: $(srcdir)/config/ia64/crtend.S > + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ > + -o $@ $< > +crtbeginS.o: $(srcdir)/config/ia64/crtbegin.S > + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ > + -o $@ -DSHARED $< > +crtendS.o: $(srcdir)/config/ia64/crtend.S > + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ > + -o $@ -DSHARED $< > + > +SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64.ver >
On 12/21/2011 10:04 PM, Tristan Gingold wrote: > * config/ia64/t-ia64 (LIB1ASMFUNCS): Move backward > compatibility thunks... > (CUSTOM_CRTSTUFF, crtbegin.o, crtend.o) > (crtbeginS.o, crtendS.o): ... and these to ... > * config/ia64/t-ia64-elf: ... this new file. > * config.host (ia64*-*-elf*, ia64*-*-freebsd*, ia64*-*-linux*) > (ia64*-*-hpux*): Add ia64/t-ia64-elf in tmake_file. Ok. r~
On Jan 6, 2012, at 12:40 AM, Richard Henderson wrote: > On 12/21/2011 10:04 PM, Tristan Gingold wrote: >> * config/ia64/t-ia64 (LIB1ASMFUNCS): Move backward >> compatibility thunks... >> (CUSTOM_CRTSTUFF, crtbegin.o, crtend.o) >> (crtbeginS.o, crtendS.o): ... and these to ... >> * config/ia64/t-ia64-elf: ... this new file. >> * config.host (ia64*-*-elf*, ia64*-*-freebsd*, ia64*-*-linux*) >> (ia64*-*-hpux*): Add ia64/t-ia64-elf in tmake_file. > > Ok. > Thanks, committed after rebuilding gcc for ia64-linux (C only). Tristan.
--- a/libgcc/config.host +++ b/libgcc/config.host @@ -639,23 +639,23 @@ i[34567]86-*-interix3*) ;; ia64*-*-elf*) extra_parts="$extra_parts crtbeginS.o crtendS.o crtfastmath.o" - tmake_file="ia64/t-ia64 ia64/t-eh-ia64 t-crtfm" + tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm" ;; ia64*-*-freebsd*) extra_parts="$extra_parts crtfastmath.o" - tmake_file="$tmake_file ia64/t-ia64 ia64/t-eh-ia64 t-crtfm" + tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm" ;; ia64*-*-linux*) # Don't use crtbeginT.o from *-*-linux* default. extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" - tmake_file="$tmake_file ia64/t-ia64 t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat ia64/t-eh-ia64 t-libunwind ia64/t-linux" + tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat ia64/t-eh-ia64 t-libunwind ia64/t-linux" if test x$with_system_libunwind != xyes ; then tmake_file="${tmake_file} t-libunwind-elf ia64/t-linux-libunwind" fi md_unwind_header=ia64/linux-unwind.h ;; ia64*-*-hpux*) - tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux" + tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux" ;; ia64-hp-*vms*) tmake_file="$tmake_file ia64/t-ia64 ia64/t-eh-ia64 ia64/t-vms t-slibgcc-vms" diff --git a/libgcc/config/ia64/t-ia64 b/libgcc/config/ia64/t-ia64 index d1ec353..1776ddd 100644 --- a/libgcc/config/ia64/t-ia64 +++ b/libgcc/config/ia64/t-ia64 @@ -8,8 +8,7 @@ LIB1ASMSRC = ia64/lib1funcs.S LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \ __divdi3 __moddi3 __udivdi3 __umoddi3 \ __divsi3 __modsi3 __udivsi3 __umodsi3 __save_stack_nonlocal \ - __nonlocal_goto __restore_stack_nonlocal __trampoline \ - _fixtfdi _fixunstfdi _floatditf + __nonlocal_goto __restore_stack_nonlocal __trampoline # ??? Hack to get -P option used when compiling lib1funcs.S, because Intel # assembler does not accept # line number as a comment. @@ -17,20 +16,3 @@ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf3 \ # C++ part of libgcc2, hence it had to be disabled. Must find some other way # to support the Intel assembler. #LIBGCC2_DEBUG_CFLAGS = -g1 -P - -CUSTOM_CRTSTUFF = yes - -# Assemble startup files. -# FIXME: -I$(gcc_objdir) is necessary to find auto-host.h. Really? -crtbegin.o: $(srcdir)/config/ia64/crtbegin.S - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp $< -crtend.o: $(srcdir)/config/ia64/crtend.S - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp $< -crtbeginS.o: $(srcdir)/config/ia64/crtbegin.S - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ - -o $@ -DSHARED $< -crtendS.o: $(srcdir)/config/ia64/crtend.S - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ - -o $@ -DSHARED $< - -SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64.ver diff --git a/libgcc/config/ia64/t-ia64-elf b/libgcc/config/ia64/t-ia64-elf new file mode 100644 index 0000000..08784df --- /dev/null +++ b/libgcc/config/ia64/t-ia64-elf @@ -0,0 +1,20 @@ +LIB1ASMFUNCS += _fixtfdi _fixunstfdi _floatditf + +CUSTOM_CRTSTUFF = yes + +# Assemble startup files. +# FIXME: -I$(gcc_objdir) is necessary to find auto-host.h. Really? +crtbegin.o: $(srcdir)/config/ia64/crtbegin.S + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ + -o $@ $< +crtend.o: $(srcdir)/config/ia64/crtend.S + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ + -o $@ $< +crtbeginS.o: $(srcdir)/config/ia64/crtbegin.S + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ + -o $@ -DSHARED $< +crtendS.o: $(srcdir)/config/ia64/crtend.S + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ + -o $@ -DSHARED $< + +SHLIB_MAPFILES += $(srcdir)/config/ia64/libgcc-ia64.ver