bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/12305] New: undefined reference to '__udivdi3' with -flto -fus


From: dann at ics dot uci.edu
Subject: [Bug gold/12305] New: undefined reference to '__udivdi3' with -flto -fuse-linker-plugin
Date: Wed, 8 Dec 2010 23:44:25 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12305

           Summary: undefined reference to '__udivdi3' with -flto
                    -fuse-linker-plugin
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: address@hidden
        ReportedBy: address@hidden


[This was originally filed as a GCC bug#46652, comment #4 there said that it
should be filed as a gold bug, which I do here]

When compiling emacs trunk using -O2 -flto -fuse-linker-plugin
(gcc configured to use gold)

This errors are emitted: 


gcc -nostdlib -Demacs -DHAVE_CONFIG_H  -I. -I/local/dann/emacs/src  
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include   -I/usr/include/freetype2    -I/usr/include/alsa  
-I/usr/include/librsvg-2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/gtk-2.0    -I/usr/include/libxml2    -DORBIT2=1 -pthread
-I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include       -MMD -MF deps/.d  
-Wimplicit-function-declaration -Wold-style-definition
-Wdeclaration-after-statement -Wno-pointer-sign  -O2 -g -flto
-fuse-linker-plugin   -Wl,-znocombreloc  \
  -o temacs pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o dispnew.o frame.o
scroll.o xdisp.o menu.o xmenu.o window.o charset.o coding.o category.o ccl.o
character.o chartab.o bidi.o cm.o term.o terminal.o xfaces.o xterm.o xfns.o
xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o
gtkutil.o  emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o
insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casetab.o
casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o
callint.o eval.o floatfns.o fns.o font.o print.o lread.o syntax.o unexelf.o
bytecode.o process.o gnutls.o callproc.o region-cache.o sound.o atimer.o
doprnt.o strftime.o intervals.o textprop.o composite.o md5.o xml.o     xfont.o
ftfont.o xftfont.o ftxfont.o terminfo.o lastfile.o    vm-limit.o  mktime.o   
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0
-lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0   -lpthread
-lSM -lICE -ltiff -ljpeg -lpng -lz -lm  -lXpm -lX11 -lXrender -lXft -lXrender
-lfontconfig -lfreetype -lz -lX11   -lasound -lm -ldl -lpthread   -lrsvg-2
-lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0     -lxml2 -lz
-lm   -lgpm   -lncurses  -pthread -lgconf-2 -lORBit-2 -lm -lgmodule-2.0 -ldl
-lgthread-2.0 -lglib-2.0   -lselinux       -lm -lgcc -lc -lgcc /usr/lib/crtn.o 
/local/dann/GCC/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/bin/ld:
/tmp/cc2kS2mG.ltrans6.ltrans.o: in function
system_process_attributes.7144:/local/dann/emacs/src/sysdep.c:2534: error:
undefined reference to '__udivdi3'
/local/dann/GCC/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/bin/ld:
/tmp/cc2kS2mG.ltrans6.ltrans.o: in function
system_process_attributes.7144:/local/dann/emacs/src/sysdep.c:2539: error:
undefined reference to '__udivdi3'
/local/dann/GCC/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/bin/ld:
/tmp/cc2kS2mG.ltrans6.ltrans.o: in function
system_process_attributes.7144:/local/dann/emacs/src/sysdep.c:2534: error:
undefined reference to '__udivdi3'
/local/dann/GCC/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/bin/ld:
/tmp/cc2kS2mG.ltrans6.ltrans.o: in function
system_process_attributes.7144:/local/dann/emacs/src/sysdep.c:2539: error:
undefined reference to '__udivdi3'
collect2: ld returned 1 exit status
make: *** [temacs] Error 1

The function in question is:

static void
time_from_jiffies (unsigned long long tval, long hz,
           time_t *sec, unsigned *usec)
{
  unsigned long long ullsec;

  *sec = tval / hz; <---- this is line 2534
  ullsec = *sec;
  tval -= ullsec * hz;
  /* Careful: if HZ > 1 million, then integer division by it yields zero.  */
  if (hz <= 1000000)
    *usec = tval * 1000000 / hz;
  else
    *usec = tval / (hz / 1000000);
}

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]