Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 40959
Product:  
Component:  
Status: UNCONFIRMED
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Anton Shterenlikht <mexas@bristol.ac.uk>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 40959 depends on: Show dependency tree
Show dependency graph
Bug 40959 blocks:

Additional Comments:






Mark bug as waiting for feedback



    

    

View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2009-08-04 09:15
building gcc4.3.4 from ports on FreeBSD 8.0-BETA2 ia64 I get this error:

[skip]

gmake[4]: Leaving directory
`/usr/ports/lang/gcc43/work/build/ia64-portbld-freebsd8.0/libgcc'
gmake[4]: Entering directory `/usr/ports/lang/gcc43/work/build/gcc'
gmake[4]: *** No rule to make target
`/usr/ports/lang/gcc43/work/build/ia64-portbld-freebsd8.0/libgcc/crtfastmath.o',
needed by `T_TARGET'.  Stop.
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory `/usr/ports/lang/gcc43/work/build/gcc'
gmake[3]: *** [gcc-extra-parts] Error 2
gmake[3]: Leaving directory
`/usr/ports/lang/gcc43/work/build/ia64-portbld-freebsd8.0/libgcc'
gmake[2]: *** [all-stage1-target-libgcc] Error 2
gmake[2]: Leaving directory `/usr/ports/lang/gcc43/work/build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc43/work/build'
gmake: *** [bootstrap-lean] Error 2
*** Error code 1

Stop in /usr/ports/lang/gcc43.
*** Error code 1

------- Comment #1 From Anton Shterenlikht 2009-08-04 10:00 -------
the same happens for gcc4.4.2:

[skip]

gmake[4]: Leaving directory
`/usr/ports/lang/gcc44/work/build/ia64-portbld-freebsd8.0/libgcc'
gmake[4]: Entering directory `/usr/ports/lang/gcc44/work/build/gcc'
gmake[4]: *** No rule to make target
`/usr/ports/lang/gcc44/work/build/ia64-portbld-freebsd8.0/libgcc/crtfastmath.o',
needed by `T_TARGET'.  Stop.
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory `/usr/ports/lang/gcc44/work/build/gcc'
gmake[3]: *** [gcc-extra-parts] Error 2
gmake[3]: Leaving directory
`/usr/ports/lang/gcc44/work/build/ia64-portbld-freebsd8.0/libgcc'
gmake[2]: *** [all-stage1-target-libgcc] Error 2
gmake[2]: Leaving directory `/usr/ports/lang/gcc44/work/build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc44/work/build'
gmake: *** [bootstrap-lean] Error 2
*** Error code 1

Stop in /usr/ports/lang/gcc44.
*** Error code 1

------- Comment #2 From Anton Shterenlikht 2009-08-04 10:16 -------
and the same error happens with gcc4.5.0:

gmake[4]: Entering directory `/usr/ports/lang/gcc45/work/build/gcc'
gmake[4]: *** No rule to make target
`/usr/ports/lang/gcc45/work/build/ia64-portbld-freebsd8.0/libgcc/crtfastmath.o',
needed by `T_TARGET'.  Stop.
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory `/usr/ports/lang/gcc45/work/build/gcc'
gmake[3]: *** [gcc-extra-parts] Error 2
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: Leaving directory
`/usr/ports/lang/gcc45/work/build/ia64-portbld-freebsd8.0/libgcc'
gmake[2]: *** [all-stage1-target-libgcc] Error 2
gmake[2]: Leaving directory `/usr/ports/lang/gcc45/work/build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc45/work/build'
gmake: *** [bootstrap-lean] Error 2
*** Error code 1

Stop in /usr/ports/lang/gcc45.
*** Error code 1

------- Comment #3 From Anton Shterenlikht 2009-08-11 11:14 -------
Some very basic analysis.
gcc43 builds on alpha, but not on ia64,
so I was trying to spot the difference.

# pwd
/usr/ports/lang/gcc43
# grep -C3 crtfastmath ./work/build/gcc/Makefile

# List of extra object files that should be compiled for this target machine.
# The rules for compiling them should be in the t-* file for the machine.
EXTRA_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o

so I had a search for t-* files on alpha and ia64, and it seems
some t-* files are missing from ia64:

#################
on alpha
#################

# uname -srm
FreeBSD 6.4-STABLE alpha
# pwd
/usr/ports/lang/gcc43
# find . -name "t-crt*"|grep alpha
./work/gcc-4.3-20090726/gcc/config/alpha/t-crtfm
./work/gcc-4.3-20090726/libgcc/config/alpha/t-crtfm
# 

#################
on ia64
#################

# uname -srm
FreeBSD 8.0-BETA2 ia64
# pwd
/usr/ports/lang/gcc43
# find . -name "t-crt*" | grep ia64
#

so I copied the above 2 t-crtfm files from alpha to ia64
config directory and substituted "alpha" for "ia64":

# cat ./work/gcc-4.3-20090726/gcc/config/ia64/t-crtfm
EXTRA_PARTS += crtfastmath.o

$(T)crtfastmath.o: $(srcdir)/config/ia64/crtfastmath.c $(GCC_PASSES)
        $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -frandom-seed=gcc-crtfastmath -c \
                -o $(T)crtfastmath.o $(srcdir)/config/ia64/crtfastmath.c

# cat ./work/gcc-4.3-20090726/libgcc/config/ia64/t-crtfm
# FIXME drow/20061228 - I have preserved this -frandom-seed option
# while migrating this rule from the GCC directory, but I do not
# know why it is necessary if no other crt file uses it.
crtfastmath.o: $(gcc_srcdir)/config/ia64/crtfastmath.c
        $(gcc_compile) -frandom-seed=gcc-crtfastmath -c \
                $(gcc_srcdir)/config/ia64/crtfastmath.c
#

But the error is still there. 

gmake[4]: *** No rule to make target
`/usr/ports/lang/gcc43/work/build/ia64-portbld-freebsd8.0/libgcc/crtfastmath.o',
needed by `T_TARGET'.  Stop.

------- Comment #4 From Steve Ellcey 2009-08-26 22:58 -------
In addition to copying the t-* files over, you also need to modify config.gcc.

If you look at the 'alpha*-*-freebsd*' entry in that file you will see where
tmake_file is set to a list of files including t-crtfm.  The 'ia46*-*-freebsd*'
entry needs the same thing.

------- Comment #5 From Andrew Pinski 2009-09-26 19:53 -------
the target for crtfastmath.o should come from libgcc/config/ia64/t-ia64.
Does this patch fix it:
Index: libgcc/config.host
===================================================================
--- libgcc/config.host  (revision 152205)
+++ libgcc/config.host  (working copy)
@@ -342,6 +342,8 @@ ia64*-*-elf*)
        tmake_file="ia64/t-ia64"
        ;;
 ia64*-*-freebsd*)
+       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
+       tmake_file="ia64/t-ia64"
        ;;
 ia64*-*-linux*)
        extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"

------- Comment #6 From Anton Shterenlikht 2009-11-16 09:50 -------
The suggested patch seems to fail.
Perhaps it's out of sync now.


# patch ./libgcc/config.host patch 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: libgcc/config.host
|===================================================================
|--- libgcc/config.host  (revision 152205)
|+++ libgcc/config.host  (working copy)
--------------------------
Patching file ./libgcc/config.host using Plan A...
Hunk #1 failed at 342.
1 out of 1 hunks failed--saving rejects to ./libgcc/config.host.rej
Hmm...  Ignoring the trailing garbage.
done
#

------- Comment #7 From Steve Ellcey 2009-11-16 18:14 -------
The patch worked for me after changing some leading spaces to tabs  If you
grabbed it with a cut-n-paste the patch may have had spaces in it instead of
tabs (or perhaps it was put in the report that way).  You can either change the
spaces to tabs by hand and use patch or you could just apply the patch by hand,
there is only one instance of ia64*freebsd in the libgcc/config.host file and
all you need to do is add the two new lines to the file at that location.

------- Comment #8 From Anton Shterenlikht 2009-11-18 12:30 -------
this seems to help to pass that error, now I'm stopped with this:

[skip]

# @multilib_dir@ is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/sh ../.././../gcc-4.4-20091110/libgcc/../mkinstalldirs .
/usr/ports/lang/gcc44/work/build/./gcc/xgcc
-B/usr/ports/lang/gcc44/work/build/./gcc/
-B/usr/local/ia64-portbld-freebsd9.0/bin/
-B/usr/local/ia64-portbld-freebsd9.0/lib/ -isystem
/usr/local/ia64-portbld-freebsd9.0/include -isystem
/usr/local/ia64-portbld-freebsd9.0/sys-include -O2  -g -O2 -pipe
-I/usr/local/include -fno-strict-aliasing -DIN_GCC   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition 
-isystem ./include   -fPIC -pthread -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1
-Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -pipe
-I/usr/local/include -fno-strict-aliasing -B./ __divxf3_s.o __divdf3_s.o
__divsf3_s.o __divdi3_s.o __moddi3_s.o __udivdi3_s.o __umoddi3_s.o __divsi3_s.o
__modsi3_s.o __udivsi3_s.o __umodsi3_s.o __save_stack_nonlocal_s.o
__nonlocal_goto_s.o __restore_stack_nonlocal_s.o __trampoline_s.o _fixtfdi_s.o
_fixunstfdi_s.o _floatditf_s.o _muldi3_s.o _negdi2_s.o _lshrdi3_s.o
_ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o
_enable_execute_stack_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o
_addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o
_negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o
_clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o
_popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o
_powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o
_multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o
_bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o
_fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o
_floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o
_floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o
_umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o unwind-ia64_s.o unwind-sjlj_s.o
unwind-c_s.o emutls_s.o -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1
]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv
./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so
unwind-ia64_s.o(.text+0x1b62): In function `_Unwind_FindEnclosingFunction':
../.././../gcc-4.4-20091110/libgcc/../gcc/config/ia64/unwind-ia64.c:1736:
undefined reference to `_Unwind_FindTableEntry'
unwind-ia64_s.o(.text+0x1e32): In function `uw_frame_state_for':
../.././../gcc-4.4-20091110/libgcc/../gcc/config/ia64/unwind-ia64.c:1779:
undefined reference to `_Unwind_FindTableEntry'
/usr/bin/ld: ./libgcc_s.so.1.tmp: hidden symbol `_Unwind_FindTableEntry' isn't
defined
collect2: ld returned 1 exit status
gmake[3]: *** [libgcc_s.so] Error 1
gmake[3]: Leaving directory
`/usr/ports/lang/gcc44/work/build/ia64-portbld-freebsd9.0/libgcc'
gmake[2]: *** [all-stage1-target-libgcc] Error 2
gmake[2]: Leaving directory `/usr/ports/lang/gcc44/work/build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc44/work/build'
gmake: *** [bootstrap-lean] Error 2
*** Error code 1

Stop in /usr/ports/lang/gcc44.
*** Error code 1

Stop in /usr/ports/lang/gcc44.
TZAV# 

------- Comment #9 From Anton Shterenlikht 2009-11-18 12:50 -------
and the same for gcc45:

[skip]

unwind-ia64_s.o(.text+0x30b2): In function `uw_frame_state_for':
../.././../gcc-4.5-20091112/libgcc/../gcc/config/ia64/unwind-ia64.c:1788:
undefined reference to `_Unwind_FindTableEntry'
unwind-ia64_s.o(.text+0x7632): In function `_Unwind_FindEnclosingFunction':
../.././../gcc-4.5-20091112/libgcc/../gcc/config/ia64/unwind-ia64.c:1745:
undefined reference to `_Unwind_FindTableEntry'
/usr/bin/ld: ./libgcc_s.so.1.tmp: hidden symbol `_Unwind_FindTableEntry' isn't
defined
collect2: ld returned 1 exit status
gmake[3]: *** [libgcc_s.so] Error 1
gmake[3]: Leaving directory
`/usr/ports/lang/gcc45/work/build/ia64-portbld-freebsd9.0/libgcc'
gmake[2]: *** [all-stage1-target-libgcc] Error 2
gmake[2]: Leaving directory `/usr/ports/lang/gcc45/work/build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/usr/ports/lang/gcc45/work/build'
gmake: *** [bootstrap-lean] Error 2
*** Error code 1

------- Comment #10 From Steve Ellcey 2009-11-20 16:59 -------
Does freebsd use glibc?  Does freebsd have a system libunwind?  I am going to
guess yes to the first question and no to the second in which case you need to
edit gcc/config.gcc and modify the 'ia64*-*-freebsd*' entry to include the
t-libunwind-elf and ia64/t-glibc-libunwind makefile fragments to the tm_file
list.  That is what 'ia64*-*-linux* does when 'with_system_libunwind' is set to
no.

------- Comment #11 From kargl@gcc.gnu.org 2009-11-20 18:10 -------
(In reply to comment #10)
> Does freebsd use glibc?  Does freebsd have a system libunwind?  I am going to
> guess yes to the first question and no to the second in which case you need to
> edit gcc/config.gcc and modify the 'ia64*-*-freebsd*' entry to include the
> t-libunwind-elf and ia64/t-glibc-libunwind makefile fragments to the tm_file
> list.  That is what 'ia64*-*-linux* does when 'with_system_libunwind' is set to
> no.
> 

FreeBSD does not use glibc; never has and never will.
FreeBSD does not have a libunwind.

------- Comment #12 From Anton Shterenlikht 2009-11-21 11:47 -------
I see..
So what is the way forward?

------- Comment #13 From Steve Ellcey 2009-11-23 15:43 -------
I think you will need to create a fde-freebsd.c file in gcc/config/ia64 to
define Unwind_FindTableEntry.  See fde-glibc.c and fde-vms.c for examples.

------- Comment #14 From Anton Shterenlikht 2009-11-23 16:12 -------
can I add a FBSD ia64 developer email to the CC list (xcllnt@mac.com)?
I tried to do this before, but was refused.

I'm just reporting the bug. I've neigher skill not time
to deal with this.

------- Comment #15 From Anton Shterenlikht 2009-11-23 21:47 -------
> Hi Marcel, sorry to bother you with this again.
> Are you happy to be on my Cc list for this "bug"?

Sure. sje@ doesn't quite know what he's talking about
because he doesn't know FreeBSD.

See also below.

> ------- Comment #13 from sje at cup dot hp dot com  2009-11-23 15:43 -------
> I think you will need to create a fde-freebsd.c file in gcc/config/ia64 to
> define Unwind_FindTableEntry.  See fde-glibc.c and fde-vms.c for examples.

_Unwind_FindTableEntry is defined in libc.
FYI,

--
Marcel Moolenaar
xcllnt@mac.com

------- Comment #16 From Anton Shterenlikht 2009-12-17 23:00 -------
I just checked that gcc4.2.5 installs fine on ia64 FreeBSD 9.0 current, but
all newer versions fail to build. Is it possible/feasible to debug this
by comparing gcc42 and gcc43? Unfortunately it's beyond my skills, but
I'll be happy to try any patch or something.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug